Created
January 6, 2015 20:44
-
-
Save main--/59e6b71d21783bad9c36 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ clang++-3.5 -O3 -c look_boy_why_you_so_mad.cpp -o lbwysm.o | |
$ objdump -CdMintel lbwysm.o | |
lbwysm.o: Dateiformat elf64-x86-64 | |
Disassembly of section .text: | |
0000000000000000 <findStuff(int)>: | |
0: 89 f8 mov eax,edi | |
2: c1 e8 1f shr eax,0x1f | |
5: 01 f8 add eax,edi | |
7: 83 e0 fe and eax,0xfffffffe | |
a: 39 f8 cmp eax,edi | |
c: 0f 95 c0 setne al | |
f: c3 ret | |
$ g++ -O3 -c look_boy_why_you_so_mad.cpp -o lbwysm2.o | |
$ objdump -CdMintel lbwysm2.o | |
lbwysm2.o: Dateiformat elf64-x86-64 | |
Disassembly of section .text: | |
0000000000000000 <findStuff(int)>: | |
0: 89 f8 mov eax,edi | |
2: 83 e0 01 and eax,0x1 | |
5: c3 ret | |
$ cat look_boy_why_you_so_mad.cpp | |
bool findStuff(int x) | |
{ | |
return x - ((x / 2) * 2); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment