Tagged: el3010 Toggle Comment Threads | Keyboard Shortcuts

  • CG 6:50 pm on October 13, 2010 Permalink | Reply
    Tags: , , el3010, linux,   

    Compiling assembly on Linux (Ubuntu on Virtual Box) 

    gcc -S logical.c

    gcc -O1 -S logical.c

    gcc -O2 -S logical.c

    objdump -d logical.o

    Advertisements
     
  • CG 6:53 pm on October 12, 2010 Permalink | Reply
    Tags: computer architectures, el3010,   

    Registers in Snow Leopard 64-bit 

    Snow Leopard has different architecture and different register names.


    [image taken from http://www.sealiesoftware.com/blog/archive/2008/09/22/objc_explain_So_you_crashed_in_objc_msgSend.html%5D

     
  • CG 3:39 pm on October 12, 2010 Permalink | Reply
    Tags: , , , el3010, mac os x,   

    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

     
c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel