Created
March 20, 2011 14:23
-
-
Save Themaister/878347 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
#include <stdio.h> | |
int main (void) { | |
0: 55 push %rbp | |
1: 48 89 e5 mov %rsp,%rbp | |
4: 48 83 ec 20 sub $0x20,%rsp | |
8: 48 b8 c0 bd f0 ff ff movabs $0xfffffffffff0bdc0,%rax | |
f: ff ff ff | |
12: f2 48 0f 2a c0 cvtsi2sd %rax,%xmm0 | |
17: 48 b8 00 b8 17 fe ff movabs $0xfffffffffe17b800,%rax | |
1e: ff ff ff | |
21: f3 48 0f 2a c8 cvtsi2ss %rax,%xmm1 | |
26: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%rbp) | |
float q = -32e6; | |
2d: f3 0f 11 4d f8 movss %xmm1,-0x8(%rbp) | |
32: 30 c0 xor %al,%al | |
printf("before.\n"); | |
34: bf 00 00 00 00 mov $0x0,%edi | |
39: f2 0f 11 45 f0 movsd %xmm0,-0x10(%rbp) | |
3e: e8 00 00 00 00 callq 43 <main+0x43> | |
if ( q > -1e6 ) { | |
43: f3 0f 10 45 f8 movss -0x8(%rbp),%xmm0 | |
48: f3 0f 5a c0 cvtss2sd %xmm0,%xmm0 | |
4c: f2 0f 10 4d f0 movsd -0x10(%rbp),%xmm1 | |
51: 66 0f 2e c1 ucomisd %xmm1,%xmm0 | |
55: 89 45 ec mov %eax,-0x14(%rbp) | |
58: 76 11 jbe 6b <main+0x6b> | |
5a: 30 c0 xor %al,%al | |
printf("q > -1e6 is true\n"); | |
5c: bf 00 00 00 00 mov $0x0,%edi | |
61: e8 00 00 00 00 callq 66 <main+0x66> | |
} else { | |
66: 89 45 e8 mov %eax,-0x18(%rbp) | |
69: eb 0f jmp 7a <main+0x7a> | |
6b: 30 c0 xor %al,%al | |
printf("q > -1e6 is false\n"); | |
6d: bf 00 00 00 00 mov $0x0,%edi | |
72: e8 00 00 00 00 callq 77 <main+0x77> | |
77: 89 45 e4 mov %eax,-0x1c(%rbp) | |
7a: 30 c0 xor %al,%al | |
} | |
printf("after\n"); | |
7c: bf 00 00 00 00 mov $0x0,%edi | |
81: e8 00 00 00 00 callq 86 <main+0x86> | |
} | |
86: 89 45 e0 mov %eax,-0x20(%rbp) | |
89: 8b 45 fc mov -0x4(%rbp),%eax | |
8c: 48 83 c4 20 add $0x20,%rsp | |
90: 5d pop %rbp | |
91: c3 retq |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment