-
-
Save 7shi/06c1493f332569cc0c5e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
void inc(int &x) { | |
++x; | |
} | |
void inc(int *x) { | |
++*x; | |
} |
This file contains hidden or 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
param.o: ファイル形式 pe-x86-64 | |
セクション .text の逆アセンブル: | |
0000000000000000 <_Z3incRi>: | |
void inc(int &x) { | |
++x; | |
0: 83 01 01 add DWORD PTR [rcx],0x1 | |
3: c3 ret | |
0000000000000004 <_Z3incPi>: | |
} | |
void inc(int *x) { | |
++*x; | |
4: 83 01 01 add DWORD PTR [rcx],0x1 | |
7: c3 ret |
This file contains hidden or 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
g++ -O -fomit-frame-pointer -m64 -c -g param.cpp | |
objdump -S param.o -M intel > param.o.objdump |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment