Compiling assembly on Snow Leopard

Comparing the compiling result with compiling assembly with Leopard (Mac OS X 10.5)

code in c

int logical(int x, int y){
   int t1 = x^y;
   int t2 = t1 >> 17;
   int mask = (1<<13)-7;
   int rval = t2 & mask;
   return rval;
}

gcc -S logical.c

gcc -O1 -S logical.c

gcc -O2 -S logical.c

dumping object file
gcc -c logical.c
otool -tv logical.o

Advertisements