Skip to content

Instantly share code, notes, and snippets.

--- libfirm/ir/be/ia32/ia32_common_transform.c 2009-12-22 18:14:45.000000000 +0100
+++ libfirm.new/ir/be/ia32/ia32_common_transform.c 2010-03-01 19:28:58.000000000 +0100
@@ -1062,16 +1062,6 @@
if (cnst != NULL) {
offset = get_Const_tarval(cnst);
- if (tarval_is_long(offset)) {
- val = get_tarval_long(offset);
- } else {
- ir_fprintf(stderr, "Optimisation Warning: tarval from %+F is not a "
@flgr
flgr / memcpy-speed.c
Last active December 18, 2015 18:09
Simplistic way of measuring memcpy() performance on Unix systems.
#include <sys/time.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
int main() {
struct timeval t0, t1;
unsigned int i;
unsigned int mb_size = 64;
unsigned int rep = 200;
@flgr
flgr / socketpair.c
Created July 2, 2013 12:55
Program which creates a half-open socketpair, then sits around endlessly, doing nothing
#include <sys/socket.h>
#include <stdio.h>
#include <unistd.h>
int main(int argc, char** argv) {
int sp[2];
if (socketpair(PF_UNIX, SOCK_STREAM, 0, sp) < 0) {
perror("Failed to get socketpair");
}
### Keybase proof
I hereby claim:
* I am flgr on github.
* I am flgr (https://keybase.io/flgr) on keybase.
* I have a public key whose fingerprint is 8404 06A0 CBE6 8BEA B88D A3CD D95D EE3C 8B7E FB1B
To claim this, I am signing this object: