Created
January 23, 2016 01:20
-
-
Save ranma42/2a82c5d8f1f774bd003f 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
test.o: file format elf32-i386 | |
Disassembly of section .text: | |
00000000 <add>: | |
0: dd 44 24 04 fldl 0x4(%esp) | |
4: dc 44 24 0c faddl 0xc(%esp) | |
8: c3 ret | |
9: 90 nop | |
a: 90 nop | |
b: 90 nop | |
c: 90 nop | |
d: 90 nop | |
e: 90 nop | |
f: 90 nop | |
00000010 <addv>: | |
10: 56 push %esi | |
11: 8b 44 24 10 mov 0x10(%esp),%eax | |
15: 85 c0 test %eax,%eax | |
17: 7e 24 jle 3d <addv+0x2d> | |
19: 8b 4c 24 0c mov 0xc(%esp),%ecx | |
1d: 8b 54 24 08 mov 0x8(%esp),%edx | |
21: 90 nop | |
22: 90 nop | |
23: 90 nop | |
24: 90 nop | |
25: 90 nop | |
26: 90 nop | |
27: 90 nop | |
28: 90 nop | |
29: 90 nop | |
2a: 90 nop | |
2b: 90 nop | |
2c: 90 nop | |
2d: 90 nop | |
2e: 90 nop | |
2f: 90 nop | |
30: 8b 31 mov (%ecx),%esi | |
32: 01 32 add %esi,(%edx) | |
34: 83 c1 04 add $0x4,%ecx | |
37: 83 c2 04 add $0x4,%edx | |
3a: 48 dec %eax | |
3b: 75 f3 jne 30 <addv+0x20> | |
3d: 5e pop %esi | |
3e: c3 ret |
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
test.o: file format elf32-i386 | |
Disassembly of section .text: | |
00000000 <add>: | |
0: 83 ec 0c sub $0xc,%esp | |
3: f2 0f 10 44 24 10 movsd 0x10(%esp),%xmm0 | |
9: f2 0f 58 44 24 18 addsd 0x18(%esp),%xmm0 | |
f: f2 0f 11 04 24 movsd %xmm0,(%esp) | |
14: dd 04 24 fldl (%esp) | |
17: 83 c4 0c add $0xc,%esp | |
1a: c3 ret | |
1b: 0f 1f 44 00 00 nopl 0x0(%eax,%eax,1) | |
00000020 <addv>: | |
20: 57 push %edi | |
21: 56 push %esi | |
22: 8b 44 24 14 mov 0x14(%esp),%eax | |
26: 85 c0 test %eax,%eax | |
28: 7e 63 jle 8d <addv+0x6d> | |
2a: 8b 54 24 10 mov 0x10(%esp),%edx | |
2e: 8b 4c 24 0c mov 0xc(%esp),%ecx | |
32: 31 ff xor %edi,%edi | |
34: 89 c6 mov %eax,%esi | |
36: 83 e6 f8 and $0xfffffff8,%esi | |
39: 74 37 je 72 <addv+0x52> | |
3b: 31 ff xor %edi,%edi | |
3d: 0f 1f 00 nopl (%eax) | |
40: f3 0f 6f 04 ba movdqu (%edx,%edi,4),%xmm0 | |
45: f3 0f 6f 4c ba 10 movdqu 0x10(%edx,%edi,4),%xmm1 | |
4b: f3 0f 6f 14 b9 movdqu (%ecx,%edi,4),%xmm2 | |
50: f3 0f 6f 5c b9 10 movdqu 0x10(%ecx,%edi,4),%xmm3 | |
56: 66 0f fe d0 paddd %xmm0,%xmm2 | |
5a: 66 0f fe d9 paddd %xmm1,%xmm3 | |
5e: f3 0f 7f 14 b9 movdqu %xmm2,(%ecx,%edi,4) | |
63: f3 0f 7f 5c b9 10 movdqu %xmm3,0x10(%ecx,%edi,4) | |
69: 83 c7 08 add $0x8,%edi | |
6c: 39 fe cmp %edi,%esi | |
6e: 75 d0 jne 40 <addv+0x20> | |
70: 89 f7 mov %esi,%edi | |
72: 39 c7 cmp %eax,%edi | |
74: 74 17 je 8d <addv+0x6d> | |
76: 8d 14 ba lea (%edx,%edi,4),%edx | |
79: 8d 0c b9 lea (%ecx,%edi,4),%ecx | |
7c: 29 f8 sub %edi,%eax | |
7e: 66 90 xchg %ax,%ax | |
80: 8b 32 mov (%edx),%esi | |
82: 01 31 add %esi,(%ecx) | |
84: 83 c2 04 add $0x4,%edx | |
87: 83 c1 04 add $0x4,%ecx | |
8a: 48 dec %eax | |
8b: 75 f3 jne 80 <addv+0x60> | |
8d: 5e pop %esi | |
8e: 5f pop %edi | |
8f: c3 ret |
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
test.o: file format elf32-i386 | |
Disassembly of section .text: | |
00000000 <add>: | |
0: 83 ec 0c sub $0xc,%esp | |
3: f2 0f 10 44 24 18 movsd 0x18(%esp),%xmm0 | |
9: f2 0f 58 44 24 10 addsd 0x10(%esp),%xmm0 | |
f: f2 0f 11 04 24 movsd %xmm0,(%esp) | |
14: dd 04 24 fldl (%esp) | |
17: 83 c4 0c add $0xc,%esp | |
1a: c3 ret | |
0000001b <addv>: | |
1b: 55 push %ebp | |
1c: 57 push %edi | |
1d: 56 push %esi | |
1e: 53 push %ebx | |
1f: 83 ec 1c sub $0x1c,%esp | |
22: 8b 44 24 30 mov 0x30(%esp),%eax | |
26: 8b 4c 24 34 mov 0x34(%esp),%ecx | |
2a: 8b 54 24 38 mov 0x38(%esp),%edx | |
2e: 85 d2 test %edx,%edx | |
30: 0f 8e eb 00 00 00 jle 121 <addv+0x106> | |
36: 89 c3 mov %eax,%ebx | |
38: 83 e3 0f and $0xf,%ebx | |
3b: c1 eb 02 shr $0x2,%ebx | |
3e: f7 db neg %ebx | |
40: 83 e3 03 and $0x3,%ebx | |
43: 39 d3 cmp %edx,%ebx | |
45: 89 de mov %ebx,%esi | |
47: 0f 47 f2 cmova %edx,%esi | |
4a: 89 d3 mov %edx,%ebx | |
4c: 83 fa 04 cmp $0x4,%edx | |
4f: 0f 87 d4 00 00 00 ja 129 <addv+0x10e> | |
55: 8b 31 mov (%ecx),%esi | |
57: 01 30 add %esi,(%eax) | |
59: 83 fb 01 cmp $0x1,%ebx | |
5c: 0f 86 de 00 00 00 jbe 140 <addv+0x125> | |
62: 8b 71 04 mov 0x4(%ecx),%esi | |
65: 01 70 04 add %esi,0x4(%eax) | |
68: 83 fb 02 cmp $0x2,%ebx | |
6b: 0f 86 d9 00 00 00 jbe 14a <addv+0x12f> | |
71: 8b 71 08 mov 0x8(%ecx),%esi | |
74: 01 70 08 add %esi,0x8(%eax) | |
77: 83 fb 03 cmp $0x3,%ebx | |
7a: 0f 86 b6 00 00 00 jbe 136 <addv+0x11b> | |
80: 8b 71 0c mov 0xc(%ecx),%esi | |
83: 01 70 0c add %esi,0xc(%eax) | |
86: be 04 00 00 00 mov $0x4,%esi | |
8b: 39 da cmp %ebx,%edx | |
8d: 0f 84 8e 00 00 00 je 121 <addv+0x106> | |
93: 89 d7 mov %edx,%edi | |
95: 29 df sub %ebx,%edi | |
97: 89 7c 24 08 mov %edi,0x8(%esp) | |
9b: 89 fd mov %edi,%ebp | |
9d: c1 ed 02 shr $0x2,%ebp | |
a0: 89 2c 24 mov %ebp,(%esp) | |
a3: 89 fd mov %edi,%ebp | |
a5: 83 e5 fc and $0xfffffffc,%ebp | |
a8: 89 6c 24 0c mov %ebp,0xc(%esp) | |
ac: 74 46 je f4 <addv+0xd9> | |
ae: 01 db add %ebx,%ebx | |
b0: 01 db add %ebx,%ebx | |
b2: 8d 2c 18 lea (%eax,%ebx,1),%ebp | |
b5: 8d 3c 19 lea (%ecx,%ebx,1),%edi | |
b8: 89 7c 24 04 mov %edi,0x4(%esp) | |
bc: 31 db xor %ebx,%ebx | |
be: 31 ff xor %edi,%edi | |
c0: 89 44 24 30 mov %eax,0x30(%esp) | |
c4: 8b 44 24 04 mov 0x4(%esp),%eax | |
c8: f3 0f 6f 04 18 movdqu (%eax,%ebx,1),%xmm0 | |
cd: 66 0f fe 44 1d 00 paddd 0x0(%ebp,%ebx,1),%xmm0 | |
d3: 66 0f 7f 44 1d 00 movdqa %xmm0,0x0(%ebp,%ebx,1) | |
d9: 83 c7 01 add $0x1,%edi | |
dc: 83 c3 10 add $0x10,%ebx | |
df: 39 3c 24 cmp %edi,(%esp) | |
e2: 77 e4 ja c8 <addv+0xad> | |
e4: 8b 44 24 30 mov 0x30(%esp),%eax | |
e8: 8b 7c 24 0c mov 0xc(%esp),%edi | |
ec: 01 fe add %edi,%esi | |
ee: 39 7c 24 08 cmp %edi,0x8(%esp) | |
f2: 74 2d je 121 <addv+0x106> | |
f4: 8d 1c 36 lea (%esi,%esi,1),%ebx | |
f7: 01 db add %ebx,%ebx | |
f9: 8b 3c 19 mov (%ecx,%ebx,1),%edi | |
fc: 01 3c 18 add %edi,(%eax,%ebx,1) | |
ff: 8d 5e 01 lea 0x1(%esi),%ebx | |
102: 39 da cmp %ebx,%edx | |
104: 7e 1b jle 121 <addv+0x106> | |
106: 01 db add %ebx,%ebx | |
108: 01 db add %ebx,%ebx | |
10a: 8b 3c 19 mov (%ecx,%ebx,1),%edi | |
10d: 01 3c 18 add %edi,(%eax,%ebx,1) | |
110: 83 c6 02 add $0x2,%esi | |
113: 39 f2 cmp %esi,%edx | |
115: 7e 0a jle 121 <addv+0x106> | |
117: 01 f6 add %esi,%esi | |
119: 01 f6 add %esi,%esi | |
11b: 8b 14 31 mov (%ecx,%esi,1),%edx | |
11e: 01 14 30 add %edx,(%eax,%esi,1) | |
121: 83 c4 1c add $0x1c,%esp | |
124: 5b pop %ebx | |
125: 5e pop %esi | |
126: 5f pop %edi | |
127: 5d pop %ebp | |
128: c3 ret | |
129: 85 f6 test %esi,%esi | |
12b: 75 27 jne 154 <addv+0x139> | |
12d: 31 db xor %ebx,%ebx | |
12f: 31 f6 xor %esi,%esi | |
131: e9 5d ff ff ff jmp 93 <addv+0x78> | |
136: be 03 00 00 00 mov $0x3,%esi | |
13b: e9 4b ff ff ff jmp 8b <addv+0x70> | |
140: be 01 00 00 00 mov $0x1,%esi | |
145: e9 41 ff ff ff jmp 8b <addv+0x70> | |
14a: be 02 00 00 00 mov $0x2,%esi | |
14f: e9 37 ff ff ff jmp 8b <addv+0x70> | |
154: 89 f3 mov %esi,%ebx | |
156: e9 fa fe ff ff jmp 55 <addv+0x3a> |
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
test.o: file format elf32-i386 | |
Disassembly of section .text: | |
00000000 <add>: | |
0: 83 ec 0c sub $0xc,%esp | |
3: dd 44 24 18 fldl 0x18(%esp) | |
7: dc 44 24 10 faddl 0x10(%esp) | |
b: dd 1c 24 fstpl (%esp) | |
e: dd 04 24 fldl (%esp) | |
11: 83 c4 0c add $0xc,%esp | |
14: c3 ret | |
00000015 <addv>: | |
15: 55 push %ebp | |
16: 57 push %edi | |
17: 56 push %esi | |
18: 53 push %ebx | |
19: 83 ec 1c sub $0x1c,%esp | |
1c: 8b 44 24 30 mov 0x30(%esp),%eax | |
20: 8b 4c 24 34 mov 0x34(%esp),%ecx | |
24: 8b 54 24 38 mov 0x38(%esp),%edx | |
28: 85 d2 test %edx,%edx | |
2a: 0f 8e eb 00 00 00 jle 11b <addv+0x106> | |
30: 89 c3 mov %eax,%ebx | |
32: 83 e3 0f and $0xf,%ebx | |
35: c1 eb 02 shr $0x2,%ebx | |
38: f7 db neg %ebx | |
3a: 83 e3 03 and $0x3,%ebx | |
3d: 39 d3 cmp %edx,%ebx | |
3f: 89 de mov %ebx,%esi | |
41: 0f 47 f2 cmova %edx,%esi | |
44: 89 d3 mov %edx,%ebx | |
46: 83 fa 04 cmp $0x4,%edx | |
49: 0f 87 d4 00 00 00 ja 123 <addv+0x10e> | |
4f: 8b 31 mov (%ecx),%esi | |
51: 01 30 add %esi,(%eax) | |
53: 83 fb 01 cmp $0x1,%ebx | |
56: 0f 86 de 00 00 00 jbe 13a <addv+0x125> | |
5c: 8b 71 04 mov 0x4(%ecx),%esi | |
5f: 01 70 04 add %esi,0x4(%eax) | |
62: 83 fb 02 cmp $0x2,%ebx | |
65: 0f 86 d9 00 00 00 jbe 144 <addv+0x12f> | |
6b: 8b 71 08 mov 0x8(%ecx),%esi | |
6e: 01 70 08 add %esi,0x8(%eax) | |
71: 83 fb 03 cmp $0x3,%ebx | |
74: 0f 86 b6 00 00 00 jbe 130 <addv+0x11b> | |
7a: 8b 71 0c mov 0xc(%ecx),%esi | |
7d: 01 70 0c add %esi,0xc(%eax) | |
80: be 04 00 00 00 mov $0x4,%esi | |
85: 39 da cmp %ebx,%edx | |
87: 0f 84 8e 00 00 00 je 11b <addv+0x106> | |
8d: 89 d7 mov %edx,%edi | |
8f: 29 df sub %ebx,%edi | |
91: 89 7c 24 08 mov %edi,0x8(%esp) | |
95: 89 fd mov %edi,%ebp | |
97: c1 ed 02 shr $0x2,%ebp | |
9a: 89 2c 24 mov %ebp,(%esp) | |
9d: 89 fd mov %edi,%ebp | |
9f: 83 e5 fc and $0xfffffffc,%ebp | |
a2: 89 6c 24 0c mov %ebp,0xc(%esp) | |
a6: 74 46 je ee <addv+0xd9> | |
a8: 01 db add %ebx,%ebx | |
aa: 01 db add %ebx,%ebx | |
ac: 8d 2c 18 lea (%eax,%ebx,1),%ebp | |
af: 8d 3c 19 lea (%ecx,%ebx,1),%edi | |
b2: 89 7c 24 04 mov %edi,0x4(%esp) | |
b6: 31 db xor %ebx,%ebx | |
b8: 31 ff xor %edi,%edi | |
ba: 89 44 24 30 mov %eax,0x30(%esp) | |
be: 8b 44 24 04 mov 0x4(%esp),%eax | |
c2: f3 0f 6f 04 18 movdqu (%eax,%ebx,1),%xmm0 | |
c7: 66 0f fe 44 1d 00 paddd 0x0(%ebp,%ebx,1),%xmm0 | |
cd: 66 0f 7f 44 1d 00 movdqa %xmm0,0x0(%ebp,%ebx,1) | |
d3: 83 c7 01 add $0x1,%edi | |
d6: 83 c3 10 add $0x10,%ebx | |
d9: 39 3c 24 cmp %edi,(%esp) | |
dc: 77 e4 ja c2 <addv+0xad> | |
de: 8b 44 24 30 mov 0x30(%esp),%eax | |
e2: 8b 7c 24 0c mov 0xc(%esp),%edi | |
e6: 01 fe add %edi,%esi | |
e8: 39 7c 24 08 cmp %edi,0x8(%esp) | |
ec: 74 2d je 11b <addv+0x106> | |
ee: 8d 1c 36 lea (%esi,%esi,1),%ebx | |
f1: 01 db add %ebx,%ebx | |
f3: 8b 3c 19 mov (%ecx,%ebx,1),%edi | |
f6: 01 3c 18 add %edi,(%eax,%ebx,1) | |
f9: 8d 5e 01 lea 0x1(%esi),%ebx | |
fc: 39 da cmp %ebx,%edx | |
fe: 7e 1b jle 11b <addv+0x106> | |
100: 01 db add %ebx,%ebx | |
102: 01 db add %ebx,%ebx | |
104: 8b 3c 19 mov (%ecx,%ebx,1),%edi | |
107: 01 3c 18 add %edi,(%eax,%ebx,1) | |
10a: 83 c6 02 add $0x2,%esi | |
10d: 39 f2 cmp %esi,%edx | |
10f: 7e 0a jle 11b <addv+0x106> | |
111: 01 f6 add %esi,%esi | |
113: 01 f6 add %esi,%esi | |
115: 8b 14 31 mov (%ecx,%esi,1),%edx | |
118: 01 14 30 add %edx,(%eax,%esi,1) | |
11b: 83 c4 1c add $0x1c,%esp | |
11e: 5b pop %ebx | |
11f: 5e pop %esi | |
120: 5f pop %edi | |
121: 5d pop %ebp | |
122: c3 ret | |
123: 85 f6 test %esi,%esi | |
125: 75 27 jne 14e <addv+0x139> | |
127: 31 db xor %ebx,%ebx | |
129: 31 f6 xor %esi,%esi | |
12b: e9 5d ff ff ff jmp 8d <addv+0x78> | |
130: be 03 00 00 00 mov $0x3,%esi | |
135: e9 4b ff ff ff jmp 85 <addv+0x70> | |
13a: be 01 00 00 00 mov $0x1,%esi | |
13f: e9 41 ff ff ff jmp 85 <addv+0x70> | |
144: be 02 00 00 00 mov $0x2,%esi | |
149: e9 37 ff ff ff jmp 85 <addv+0x70> | |
14e: 89 f3 mov %esi,%ebx | |
150: e9 fa fe ff ff jmp 4f <addv+0x3a> | |
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
test.o: file format elf32-i386 | |
Disassembly of section .text: | |
00000000 <add>: | |
0: 83 ec 0c sub $0xc,%esp | |
3: dd 44 24 18 fldl 0x18(%esp) | |
7: dc 44 24 10 faddl 0x10(%esp) | |
b: dd 1c 24 fstpl (%esp) | |
e: dd 04 24 fldl (%esp) | |
11: 83 c4 0c add $0xc,%esp | |
14: c3 ret | |
15: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi | |
19: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi | |
00000020 <addv>: | |
20: 56 push %esi | |
21: 31 c0 xor %eax,%eax | |
23: 53 push %ebx | |
24: 8b 5c 24 14 mov 0x14(%esp),%ebx | |
28: 8b 54 24 0c mov 0xc(%esp),%edx | |
2c: 8b 74 24 10 mov 0x10(%esp),%esi | |
30: 85 db test %ebx,%ebx | |
32: 7e 11 jle 45 <addv+0x25> | |
34: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi | |
38: 8b 0c 86 mov (%esi,%eax,4),%ecx | |
3b: 01 0c 82 add %ecx,(%edx,%eax,4) | |
3e: 83 c0 01 add $0x1,%eax | |
41: 39 d8 cmp %ebx,%eax | |
43: 75 f3 jne 38 <addv+0x18> | |
45: 5b pop %ebx | |
46: 5e pop %esi | |
47: c3 ret |
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
double add(double x, double y) | |
{ | |
return x+y; | |
} | |
void addv(int *restrict x, int *restrict y, int n) | |
{ | |
for (int i = 0; i < n; i++) | |
x[i] += y[i]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment