Skip to content

Instantly share code, notes, and snippets.

@shirosaki
Created April 30, 2013 13:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shirosaki/5488699 to your computer and use it in GitHub Desktop.
Save shirosaki/5488699 to your computer and use it in GitHub Desktop.
(gdb) disas set_optimize_info_from_tree
(snip)
0x6d2e8d67 <+1207>: pop %ebp
0x6d2e8d68 <+1208>: ret
0x6d2e8d69 <+1209>: lea 0x0(%esi,%eiz,1),%esi
0x6d2e8d70 <+1216>: movl $0xffffffff,0x2c(%ebx)
0x6d2e8d77 <+1223>: jmp 0x6d2e8afb <onig_compile+587>
0x6d2e8d7c <+1228>: mov $0xfffffffb,%eax
0x6d2e8d81 <+1233>: jmp 0x6d2e8d57 <onig_compile+1191>
0x6d2e8d83 <+1235>: mov -0x12c(%ebp),%edx
0x6d2e8d89 <+1241>: mov -0x128(%ebp),%eax
0x6d2e8d8f <+1247>: cmp $0xffffffff,%edx
=> 0x6d2e8d92 <+1250>: movdqa -0x118(%ebp),%xmm0
0x6d2e8d9a <+1258>: movdqu %xmm0,0x70(%ebx)
0x6d2e8d9f <+1263>: movl $0x5,0x50(%ebx)
0x6d2e8da6 <+1270>: movdqa -0x108(%ebp),%xmm0
0x6d2e8dae <+1278>: movdqu %xmm0,0x80(%ebx)
0x6d2e8db6 <+1286>: movdqa -0xf8(%ebp),%xmm0
0x6d2e8dbe <+1294>: movdqu %xmm0,0x90(%ebx)
0x6d2e8dc6 <+1302>: movdqa -0xe8(%ebp),%xmm0
0x6d2e8dce <+1310>: movdqu %xmm0,0xa0(%ebx)
0x6d2e8dd6 <+1318>: movdqa -0xd8(%ebp),%xmm0
0x6d2e8dde <+1326>: movdqu %xmm0,0xb0(%ebx)
0x6d2e8de6 <+1334>: movdqa -0xc8(%ebp),%xmm0
(snip)
(gdb) info register ebp
ebp 0x376ea64 0x376ea64
--------------
0x376ea64 - 0x118
not 16 byte aligned
--------------
With volatile, movdqa(require 16byte aligned) is not used.
0x6d2e8d61 <+1201>: pop %ebp
0x6d2e8d62 <+1202>: ret
0x6d2e8d63 <+1203>: movl $0xffffffff,0x2c(%ebx)
0x6d2e8d6a <+1210>: jmp 0x6d2e8afb <onig_compile+587>
0x6d2e8d6f <+1215>: mov $0xfffffffb,%eax
0x6d2e8d74 <+1220>: jmp 0x6d2e8d51 <onig_compile+1185>
0x6d2e8d76 <+1222>: mov -0x12c(%ebp),%ecx
0x6d2e8d7c <+1228>: mov -0x128(%ebp),%eax
0x6d2e8d82 <+1234>: movl $0x0,-0x28c(%ebp)
0x6d2e8d8c <+1244>: mov -0x28c(%ebp),%edx
0x6d2e8d92 <+1250>: cmp $0xff,%edx
0x6d2e8d98 <+1256>: jg 0x6d2e8dd5 <onig_compile+1317>
0x6d2e8d9a <+1258>: lea 0x0(%esi),%esi
=> 0x6d2e8da0 <+1264>: mov -0x28c(%ebp),%esi
0x6d2e8da6 <+1270>: mov -0x28c(%ebp),%edx
0x6d2e8dac <+1276>: movzbl -0x118(%ebp,%edx,1),%edx
0x6d2e8db4 <+1284>: mov %dl,0x70(%ebx,%esi,1)
0x6d2e8db8 <+1288>: mov -0x28c(%ebp),%edx
0x6d2e8dbe <+1294>: add $0x1,%edx
0x6d2e8dc1 <+1297>: mov %edx,-0x28c(%ebp)
0x6d2e8dc7 <+1303>: mov -0x28c(%ebp),%edx
0x6d2e8dcd <+1309>: cmp $0xff,%edx
0x6d2e8dd3 <+1315>: jle 0x6d2e8da0 <onig_compile+1264>
0x6d2e8dd5 <+1317>: cmp $0xffffffff,%ecx
0x6d2e8dd8 <+1320>: movl $0x5,0x50(%ebx)
0x6d2e8ddf <+1327>: mov %ecx,0x178(%ebx)
--------------
With -mstackrealign
0x6d2e8bb4 <+1172>: pop %ebp
0x6d2e8bb5 <+1173>: ret
0x6d2e8bb6 <+1174>: movl $0xffffffff,0x2c(%ebx)
0x6d2e8bbd <+1181>: jmp 0x6d2e8959 <onig_compile+569>
0x6d2e8bc2 <+1186>: mov $0xfffffffb,%eax
0x6d2e8bc7 <+1191>: jmp 0x6d2e8ba7 <onig_compile+1159>
0x6d2e8bc9 <+1193>: mov 0x19c(%esp),%edx
0x6d2e8bd0 <+1200>: mov 0x1a0(%esp),%eax
0x6d2e8bd7 <+1207>: cmp $0xffffffff,%edx
=> 0x6d2e8bda <+1210>: movdqa 0x1b0(%esp),%xmm0
0x6d2e8be3 <+1219>: movdqu %xmm0,0x70(%ebx)
0x6d2e8be8 <+1224>: movl $0x5,0x50(%ebx)
0x6d2e8bef <+1231>: movdqa 0x1c0(%esp),%xmm0
0x6d2e8bf8 <+1240>: movdqu %xmm0,0x80(%ebx)
0x6d2e8c00 <+1248>: movdqa 0x1d0(%esp),%xmm0
0x6d2e8c09 <+1257>: movdqu %xmm0,0x90(%ebx)
0x6d2e8c11 <+1265>: movdqa 0x1e0(%esp),%xmm0
0x6d2e8c1a <+1274>: movdqu %xmm0,0xa0(%ebx)
0x6d2e8c22 <+1282>: movdqa 0x1f0(%esp),%xmm0
0x6d2e8c2b <+1291>: movdqu %xmm0,0xb0(%ebx)
0x6d2e8c33 <+1299>: movdqa 0x200(%esp),%xmm0
0x6d2e8c3c <+1308>: movdqu %xmm0,0xc0(%ebx)
0x6d2e8c44 <+1316>: movdqa 0x210(%esp),%xmm0
0x6d2e8c4d <+1325>: movdqu %xmm0,0xd0(%ebx)
(snip)
(gdb) info register esp
esp 0x28e430 0x28e430
16 byte aligned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment