/*
* Command line: opannotate --source --assembly test
*
* Interpretation of command line:
* Output annotated assembly listing with samples
*
* CPU: Core 2, speed 1601 MHz (estimated)
* Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a unit mask of 0x00 (Unhalted core cycles) count 800500
* Counted RAT_STALLS events (Partial register stall cycles) with a unit mask of 0x0f (All RAT) count 1000000
*/
:
:/home/user/prog/tri/test: file format elf32-i386
:
:
:Disassembly of section .text:
:
080488fa <triAsm2.loop>: /* triAsm2.loop total: 21090 27.3325 10658 52.4508 */
: mov esi, [ebp+0x14] ; cg
: mov edi, [ebp+0x18] ; cb
:
:.loop:
:
: add esi, dcg
1957 2.5363 1583 7.7904 : 80488fa: add 0x20(%ebp),%esi
: mov eax, esi
76 0.0985 20 0.0984 : 80488fd: mov %esi,%eax
: shr eax, 8
15 0.0194 17 0.0837 : 80488ff: shr $0x8,%eax
:
: add edi, dcb
415 0.5378 354 1.7421 : 8048902: add 0x24(%ebp),%edi
: mov ebx, edi
1604 2.0788 1235 6.0778 : 8048905: mov %edi,%ebx
: shr ebx, 16
742 0.9616 580 2.8543 : 8048907: shr $0x10,%ebx
: mov bh, ah
1171 1.5176 323 1.5896 : 804890a: mov %ah,%bh
:
: mov eax, cr
1289 1.6705 661 3.2530 : 804890c: mov 0x10(%ebp),%eax
: add eax, dcr
430 0.5573 194 0.9547 : 804890f: add 0x1c(%ebp),%eax
: mov cr, eax
592 0.7672 146 0.7185 : 8048912: mov %eax,0x10(%ebp)
:
: mov ax, bx ; slower
998 1.2934 209 1.0285 : 8048915: mov %bx,%ax
:
: mov DWORD [edx], eax
3659 4.7420 512 2.5197 : 8048918: mov %eax,(%edx)
:
: add edx, 4
7976 10.3368 4775 23.4990 : 804891a: add $0x4,%edx
:
: dec ecx
1 0.0013 1 0.0049 : 804891d: dec %ecx
: jge .loop
: 804891e: jge 80488fa <triAsm2.loop>
:
: popa
: 8048920: popa
:
: pop ebp
157 0.2035 48 0.2362 : 8048921: pop %ebp
: ret
8 0.0104 0 0 : 8048922: ret
:
:/home/user/prog/tri/test: file format elf32-i386
:
:
:Disassembly of section .text:
:
08048850 <triC>: /* triC total: 16137 20.9134 4810 23.6713 */
:#include <stdlib.h>
:#include <stdint.h>
:
:// a5afb9
:// ./test 1,46s user 0,00s system 99% cpu 1,471 total
:void triC(uint32_t* dest, uint32_t cnt, uint32_t cr, uint32_t cg, uint32_t cb, uint32_t dcr, uint32_t dcg, uint32_t dcb) {
14 0.0181 0 0 : 8048850: push %ebp
: 8048851: mov %esp,%ebp
: 8048853: push %edi
: while (cnt--) {
7 0.0091 0 0 : 8048854: mov 0xc(%ebp),%eax
:#include <stdlib.h>
:#include <stdint.h>
:
:// a5afb9
:// ./test 1,46s user 0,00s system 99% cpu 1,471 total
:void triC(uint32_t* dest, uint32_t cnt, uint32_t cr, uint32_t cg, uint32_t cb, uint32_t dcr, uint32_t dcg, uint32_t dcb) {
: 8048857: push %esi
: 8048858: mov 0x14(%ebp),%ecx
: 804885b: push %ebx
5 0.0065 0 0 : 804885c: mov 0x8(%ebp),%esi
1 0.0013 0 0 : 804885f: mov 0x10(%ebp),%ebx
: 8048862: mov 0x18(%ebp),%edx
: while (cnt--) {
: 8048865: test %eax,%eax
: 8048867: je 80488a1 <triC+0x51>
7 0.0091 0 0 : 8048869: lea 0x0(%esi,%eiz,1),%esi
: cr += dcr;
1962 2.5427 316 1.5551 : 8048870: add 0x1c(%ebp),%ebx
: cg += dcg;
11 0.0143 1 0.0049 : 8048873: add 0x20(%ebp),%ecx
: cb += dcb;
11 0.0143 4 0.0197 : 8048876: add 0x24(%ebp),%edx
: *dest++ = (cr & 0xffff0000) | ((cg >> 8) & 0xff00) | ((cb >> 16) & 0xff);
116 0.1503 3 0.0148 : 8048879: mov %ecx,%eax
2102 2.7242 91 0.4478 : 804887b: mov %edx,%edi
19 0.0246 5 0.0246 : 804887d: shr $0x8,%eax
587 0.7607 0 0 : 8048880: shr $0x10,%edi
1072 1.3893 69 0.3396 : 8048883: and $0xff00,%eax
2079 2.6944 605 2.9774 : 8048888: and $0xff,%edi
379 0.4912 66 0.3248 : 804888e: or %edi,%eax
1748 2.2654 658 3.2382 : 8048890: mov %ebx,%edi
: 8048892: xor %di,%di
526 0.6817 423 2.0817 : 8048895: or %edi,%eax
1517 1.9660 682 3.3563 : 8048897: mov %eax,(%esi)
1825 2.3652 969 4.7687 : 8048899: add $0x4,%esi
:#include <stdint.h>
:
:// a5afb9
:// ./test 1,46s user 0,00s system 99% cpu 1,471 total
:void triC(uint32_t* dest, uint32_t cnt, uint32_t cr, uint32_t cg, uint32_t cb, uint32_t dcr, uint32_t dcg, uint32_t dcb) {
: while (cnt--) {
168 0.2177 79 0.3888 : 804889c: decl 0xc(%ebp)
1884 2.4416 821 4.0404 : 804889f: jne 8048870 <triC+0x20>
: cr += dcr;
: cg += dcg;
: cb += dcb;
: *dest++ = (cr & 0xffff0000) | ((cg >> 8) & 0xff00) | ((cb >> 16) & 0xff);
: }
:}
: 80488a1: pop %ebx
71 0.0920 18 0.0886 : 80488a2: pop %esi
2 0.0026 0 0 : 80488a3: pop %edi
12 0.0156 0 0 : 80488a4: leave
12 0.0156 0 0 : 80488a5: ret
: 80488a6: nop
: 80488a7: nop
: 80488a8: nop
: 80488a9: nop
: 80488aa: nop
: 80488ab: nop
: 80488ac: nop
: 80488ad: nop
: 80488ae: nop
: 80488af: nop
:
:/home/user/prog/tri/test: file format elf32-i386
:
:
:Disassembly of section .text:
:
080488c0 <triAsm1.loop>: /* triAsm1.loop total: 14534 18.8359 4834 23.7894 */
: mov esi, [ebp+0x14] ; cg
: mov edi, [ebp+0x18] ; cb
:
:.loop:
:
: add esi, dcg
2036 2.6386 774 3.8091 : 80488c0: add 0x20(%ebp),%esi
: mov eax, esi
72 0.0933 4 0.0197 : 80488c3: mov %esi,%eax
: shr eax, 8
9 0.0117 0 0 : 80488c5: shr $0x8,%eax
:
: add edi, dcb
43 0.0557 21 0.1033 : 80488c8: add 0x24(%ebp),%edi
: mov ebx, edi
1971 2.5544 364 1.7913 : 80488cb: mov %edi,%ebx
: shr ebx, 16
350 0.4536 101 0.4970 : 80488cd: shr $0x10,%ebx
: mov bh, ah
1119 1.4502 42 0.2067 : 80488d0: mov %ah,%bh
:
: mov eax, cr
1011 1.3102 147 0.7234 : 80488d2: mov 0x10(%ebp),%eax
: add eax, dcr
729 0.9448 162 0.7972 : 80488d5: add 0x1c(%ebp),%eax
: mov cr, eax
4 0.0052 3 0.0148 : 80488d8: mov %eax,0x10(%ebp)
:
: mov ah, bh ; faster
472 0.6117 98 0.4823 : 80488db: mov %bh,%ah
: mov al, bl
951 1.2325 168 0.8268 : 80488dd: mov %bl,%al
:
: mov DWORD [edx], eax
1170 1.5163 545 2.6821 : 80488df: mov %eax,(%edx)
:
: add edx, 4
4287 5.5559 2294 11.2894 : 80488e1: add $0x4,%edx
:
: dec ecx
193 0.2501 89 0.4380 : 80488e4: dec %ecx
: jge .loop
3 0.0039 1 0.0049 : 80488e5: jge 80488c0 <triAsm1.loop>
:
: popa
: 80488e7: popa
:
: pop ebp
107 0.1387 21 0.1033 : 80488e8: pop %ebp
: ret
7 0.0091 0 0 : 80488e9: ret
:
:/home/user/prog/tri/test: file format elf32-i386
:
:
:Disassembly of section .text:
:
08048933 <triAsm3.loop>: /* triAsm3.loop total: 12617 16.3515 0 0 */
: mov ecx, [ebp+0x0c] ; cnt
: mov esi, [ebp+0x14] ; cg
: mov edi, [ebp+0x18] ; cb
:
:.loop:
: mov eax, cr
1948 2.5246 0 0 : 8048933: mov 0x10(%ebp),%eax
: add eax, dcr
26 0.0337 0 0 : 8048936: add 0x1c(%ebp),%eax
: mov cr, eax
367 0.4756 0 0 : 8048939: mov %eax,0x10(%ebp)
:
: and eax, 0xffff0000
840 1.0886 0 0 : 804893c: and $0xffff0000,%eax
:
: add esi, dcg
1348 1.7470 0 0 : 8048941: add 0x20(%ebp),%esi
: mov ebx, esi
9 0.0117 0 0 : 8048944: mov %esi,%ebx
: shr ebx, 8
45 0.0583 0 0 : 8048946: shr $0x8,%ebx
: and ebx, 0x0000ff00
819 1.0614 0 0 : 8048949: and $0xff00,%ebx
: or eax, ebx
1426 1.8481 0 0 : 804894f: or %ebx,%eax
:
: add edi, dcb
576 0.7465 0 0 : 8048951: add 0x24(%ebp),%edi
: mov ebx, edi
16 0.0207 0 0 : 8048954: mov %edi,%ebx
: shr ebx, 16
474 0.6143 0 0 : 8048956: shr $0x10,%ebx
: and ebx, 0x000000ff
1075 1.3932 0 0 : 8048959: and $0xff,%ebx
: or eax, ebx
663 0.8592 0 0 : 804895f: or %ebx,%eax
:
: mov DWORD [edx], eax
838 1.0860 0 0 : 8048961: mov %eax,(%edx)
:
: add edx, 4
1566 2.0295 0 0 : 8048963: add $0x4,%edx
:
: dec ecx
449 0.5819 0 0 : 8048966: dec %ecx
: jge .loop
: 8048967: jge 8048933 <triAsm3.loop>
:
: popa
: 8048969: popa
:
: pop ebp
124 0.1607 0 0 : 804896a: pop %ebp
: ret
8 0.0104 0 0 : 804896b: ret
:
:/home/user/prog/tri/test: file format elf32-i386
:
:
:Disassembly of section .text:
:
08048985 <triAsm4.loop>: /* triAsm4.loop total: 12241 15.8642 12 0.0591 */
: mov edx, [ebp+0x10] ; cr
: mov esi, [ebp+0x14] ; cg
: mov esp, [ebp+0x18] ; cb
:
:.loop:
: add edx, dcr
2062 2.6723 0 0 : 8048985: add 0x1c(%ebp),%edx
: add esi, dcg
50 0.0648 0 0 : 8048988: add 0x20(%ebp),%esi
: add esp, dcb
10 0.0130 0 0 : 804898b: add 0x24(%ebp),%esp
:
: ;*dest++ = (cr & 0xffff0000) | ((cg >> 8) & 0xff00) | ((cb >> 16) & 0xff);
: mov eax, edx ; eax=cr
22 0.0285 1 0.0049 : 804898e: mov %edx,%eax
: and eax, 0xffff0000
2004 2.5972 4 0.0197 : 8048990: and $0xffff0000,%eax
:
: mov ebx, esi ; ebx=cg
88 0.1140 0 0 : 8048995: mov %esi,%ebx
: shr ebx, 8
46 0.0596 0 0 : 8048997: shr $0x8,%ebx
: and ebx, 0xff00
171 0.2216 0 0 : 804899a: and $0xff00,%ebx
: or eax, ebx
2105 2.7281 2 0.0098 : 80489a0: or %ebx,%eax
: ;mov ah, bh
:
: mov ebx, esp
825 1.0692 0 0 : 80489a2: mov %esp,%ebx
: shr ebx, 16
24 0.0311 0 0 : 80489a4: shr $0x10,%ebx
: and ebx, 0xff
54 0.0700 0 0 : 80489a7: and $0xff,%ebx
: or eax, ebx
1474 1.9103 2 0.0098 : 80489ad: or %ebx,%eax
: ;mov al, bl
:
: mov DWORD [edi], eax
1128 1.4619 0 0 : 80489af: mov %eax,(%edi)
: add edi, 4
1438 1.8636 3 0.0148 : 80489b1: add $0x4,%edi
:
: dec ecx
: 80489b4: dec %ecx
: jge .loop
598 0.7750 0 0 : 80489b5: jge 8048985 <triAsm4.loop>
:
: mov esp, [stackptr]
: 80489b7: mov 0x804a020,%esp
:
: popa
65 0.0842 0 0 : 80489bd: popa
:
: pop ebp
69 0.0894 0 0 : 80489be: pop %ebp
: ret
8 0.0104 0 0 : 80489bf: ret
:
:/home/user/prog/tri/test: file format elf32-i386
:
:
:Disassembly of section .text:
:
08048470 <main>: /* main total: 281 0.3642 0 0 */
: tri(scanline, rand() % 640, 10<<16, 20<<16, 30<<16, 1<<14, 1<<14, 1<<14);\
: }\
: printf(#tri ": %f ms, %x\n",(clock()-start)*1000.0/CLOCKS_PER_SEC,scanline[620]);\
: }
:
:int main() {
: 8048470: push %ebp
: 8048471: mov %esp,%ebp
: 8048473: and $0xfffffff0,%esp
: 8048476: push %edi
: 8048477: push %esi
: test(triC);
: 8048478: mov $0x66666667,%esi
: tri(scanline, rand() % 640, 10<<16, 20<<16, 30<<16, 1<<14, 1<<14, 1<<14);\
: }\
: printf(#tri ": %f ms, %x\n",(clock()-start)*1000.0/CLOCKS_PER_SEC,scanline[620]);\
: }
:
:int main() {
: 804847d: push %ebx
: test(triC);
: 804847e: mov $0x4c4b40,%ebx
: tri(scanline, rand() % 640, 10<<16, 20<<16, 30<<16, 1<<14, 1<<14, 1<<14);\
: }\
: printf(#tri ": %f ms, %x\n",(clock()-start)*1000.0/CLOCKS_PER_SEC,scanline[620]);\
: }
:
:int main() {
: 8048483: sub $0x34,%esp
: test(triC);
: 8048486: call 8048390 <clock@plt>
: 804848b: movl $0x3c,(%esp)
: 8048492: mov %eax,%edi
: 8048494: call 8048350 <srand@plt>
: 8048499: lea 0x0(%esi,%eiz,1),%esi
5 0.0065 0 0 : 80484a0: call 80483a0 <rand@plt>
18 0.0233 0 0 : 80484a5: movl $0x4000,0x1c(%esp)
: 80484ad: mov %eax,%ecx
: 80484af: movl $0x4000,0x18(%esp)
4 0.0052 0 0 : 80484b7: imul %esi
: 80484b9: movl $0x4000,0x14(%esp)
7 0.0091 0 0 : 80484c1: sar $0x8,%edx
: 80484c4: mov %ecx,%eax
: 80484c6: movl $0x1e0000,0x10(%esp)
: 80484ce: sar $0x1f,%eax
4 0.0052 0 0 : 80484d1: movl $0x140000,0xc(%esp)
: 80484d9: sub %eax,%edx
: 80484db: movl $0xa0000,0x8(%esp)
: 80484e3: lea (%edx,%edx,4),%eax
6 0.0078 0 0 : 80484e6: movl $0x804a060,(%esp)
: 80484ed: shl $0x7,%eax
: 80484f0: sub %eax,%ecx
: 80484f2: mov %ecx,0x4(%esp)
6 0.0078 0 0 : 80484f6: call 8048850 <triC>
13 0.0168 0 0 : 80484fb: dec %ebx
: 80484fc: jne 80484a0 <main+0x30>
: 80484fe: mov 0x804aa10,%ebx
: test(triAsm1);
: 8048504: mov $0x66666667,%esi
: }\
: printf(#tri ": %f ms, %x\n",(clock()-start)*1000.0/CLOCKS_PER_SEC,scanline[620]);\
: }
:
:int main() {
: test(triC);
: 8048509: call 8048390 <clock@plt>
:}
:
:__extern_always_inline int
:printf (__const char *__restrict __fmt, ...)
:{
: return __printf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ());
: 804850e: mov %ebx,0x10(%esp)
: 8048512: sub %edi,%eax
: 8048514: movl $0x8048a80,0x4(%esp)
: 804851c: mov %eax,0x24(%esp)
: 8048520: movl $0x1,(%esp)
: 8048527: fildl 0x24(%esp)
: test(triAsm1);
: 804852b: mov $0x4c4b40,%ebx
: }\
: printf(#tri ": %f ms, %x\n",(clock()-start)*1000.0/CLOCKS_PER_SEC,scanline[620]);\
: }
:
:int main() {
: test(triC);
: 8048530: fmuls 0x8048ae4
: 8048536: fdivs 0x8048ae8
: 804853c: fstpl 0x8(%esp)
: 8048540: call 8048370 <__printf_chk@plt>
: test(triAsm1);
: 8048545: call 8048390 <clock@plt>
: 804854a: movl $0x3c,(%esp)
: 8048551: mov %eax,%edi
: 8048553: call 8048350 <srand@plt>
: 8048558: nop
: 8048559: lea 0x0(%esi,%eiz,1),%esi
4 0.0052 0 0 : 8048560: call 80483a0 <rand@plt>
5 0.0065 0 0 : 8048565: movl $0x4000,0x1c(%esp)
: 804856d: mov %eax,%ecx
: 804856f: movl $0x4000,0x18(%esp)
3 0.0039 0 0 : 8048577: imul %esi
: 8048579: movl $0x4000,0x14(%esp)
12 0.0156 0 0 : 8048581: sar $0x8,%edx
: 8048584: mov %ecx,%eax
: 8048586: movl $0x1e0000,0x10(%esp)
: 804858e: sar $0x1f,%eax
8 0.0104 0 0 : 8048591: movl $0x140000,0xc(%esp)
: 8048599: sub %eax,%edx
: 804859b: movl $0xa0000,0x8(%esp)
: 80485a3: lea (%edx,%edx,4),%eax
2 0.0026 0 0 : 80485a6: movl $0x804a060,(%esp)
: 80485ad: shl $0x7,%eax
: 80485b0: sub %eax,%ecx
: 80485b2: mov %ecx,0x4(%esp)
4 0.0052 0 0 : 80485b6: call 80488b0 <triAsm1>
16 0.0207 0 0 : 80485bb: dec %ebx
3 0.0039 0 0 : 80485bc: jne 8048560 <main+0xf0>
: 80485be: mov 0x804aa10,%ebx
: test(triAsm2);
: 80485c4: mov $0x66666667,%esi
: printf(#tri ": %f ms, %x\n",(clock()-start)*1000.0/CLOCKS_PER_SEC,scanline[620]);\
: }
:
:int main() {
: test(triC);
: test(triAsm1);
: 80485c9: call 8048390 <clock@plt>
: 80485ce: mov %ebx,0x10(%esp)
: 80485d2: sub %edi,%eax
: 80485d4: movl $0x8048a91,0x4(%esp)
: 80485dc: mov %eax,0x24(%esp)
: 80485e0: movl $0x1,(%esp)
: 80485e7: fildl 0x24(%esp)
: test(triAsm2);
: 80485eb: mov $0x4c4b40,%ebx
: printf(#tri ": %f ms, %x\n",(clock()-start)*1000.0/CLOCKS_PER_SEC,scanline[620]);\
: }
:
:int main() {
: test(triC);
: test(triAsm1);
: 80485f0: fmuls 0x8048ae4
: 80485f6: fdivs 0x8048ae8
: 80485fc: fstpl 0x8(%esp)
: 8048600: call 8048370 <__printf_chk@plt>
: test(triAsm2);
: 8048605: call 8048390 <clock@plt>
: 804860a: movl $0x3c,(%esp)
: 8048611: mov %eax,%edi
: 8048613: call 8048350 <srand@plt>
: 8048618: nop
: 8048619: lea 0x0(%esi,%eiz,1),%esi
8 0.0104 0 0 : 8048620: call 80483a0 <rand@plt>
5 0.0065 0 0 : 8048625: movl $0x4000,0x1c(%esp)
: 804862d: mov %eax,%ecx
: 804862f: movl $0x4000,0x18(%esp)
7 0.0091 0 0 : 8048637: imul %esi
: 8048639: movl $0x4000,0x14(%esp)
3 0.0039 0 0 : 8048641: sar $0x8,%edx
: 8048644: mov %ecx,%eax
: 8048646: movl $0x1e0000,0x10(%esp)
: 804864e: sar $0x1f,%eax
8 0.0104 0 0 : 8048651: movl $0x140000,0xc(%esp)
: 8048659: sub %eax,%edx
: 804865b: movl $0xa0000,0x8(%esp)
: 8048663: lea (%edx,%edx,4),%eax
7 0.0091 0 0 : 8048666: movl $0x804a060,(%esp)
: 804866d: shl $0x7,%eax
: 8048670: sub %eax,%ecx
: 8048672: mov %ecx,0x4(%esp)
5 0.0065 0 0 : 8048676: call 80488ea <triAsm2>
5 0.0065 0 0 : 804867b: dec %ebx
6 0.0078 0 0 : 804867c: jne 8048620 <main+0x1b0>
: 804867e: mov 0x804aa10,%ebx
: test(triAsm3);
: 8048684: mov $0x66666667,%esi
: }
:
:int main() {
: test(triC);
: test(triAsm1);
: test(triAsm2);
: 8048689: call 8048390 <clock@plt>
: 804868e: mov %ebx,0x10(%esp)
: 8048692: sub %edi,%eax
: 8048694: movl $0x8048aa5,0x4(%esp)
: 804869c: mov %eax,0x24(%esp)
: 80486a0: movl $0x1,(%esp)
: 80486a7: fildl 0x24(%esp)
: test(triAsm3);
: 80486ab: mov $0x4c4b40,%ebx
: }
:
:int main() {
: test(triC);
: test(triAsm1);
: test(triAsm2);
: 80486b0: fmuls 0x8048ae4
: 80486b6: fdivs 0x8048ae8
: 80486bc: fstpl 0x8(%esp)
: 80486c0: call 8048370 <__printf_chk@plt>
: test(triAsm3);
: 80486c5: call 8048390 <clock@plt>
: 80486ca: movl $0x3c,(%esp)
: 80486d1: mov %eax,%edi
: 80486d3: call 8048350 <srand@plt>
: 80486d8: nop
: 80486d9: lea 0x0(%esi,%eiz,1),%esi
3 0.0039 0 0 : 80486e0: call 80483a0 <rand@plt>
5 0.0065 0 0 : 80486e5: movl $0x4000,0x1c(%esp)
: 80486ed: mov %eax,%ecx
: 80486ef: movl $0x4000,0x18(%esp)
7 0.0091 0 0 : 80486f7: imul %esi
: 80486f9: movl $0x4000,0x14(%esp)
6 0.0078 0 0 : 8048701: sar $0x8,%edx
: 8048704: mov %ecx,%eax
: 8048706: movl $0x1e0000,0x10(%esp)
: 804870e: sar $0x1f,%eax
6 0.0078 0 0 : 8048711: movl $0x140000,0xc(%esp)
: 8048719: sub %eax,%edx
: 804871b: movl $0xa0000,0x8(%esp)
1 0.0013 0 0 : 8048723: lea (%edx,%edx,4),%eax
5 0.0065 0 0 : 8048726: movl $0x804a060,(%esp)
: 804872d: shl $0x7,%eax
: 8048730: sub %eax,%ecx
: 8048732: mov %ecx,0x4(%esp)
12 0.0156 0 0 : 8048736: call 8048923 <triAsm3>
10 0.0130 0 0 : 804873b: dec %ebx
: 804873c: jne 80486e0 <main+0x270>
: 804873e: mov 0x804aa10,%ebx
: test(triAsm4);
: 8048744: mov $0x66666667,%esi
:
:int main() {
: test(triC);
: test(triAsm1);
: test(triAsm2);
: test(triAsm3);
: 8048749: call 8048390 <clock@plt>
: 804874e: mov %ebx,0x10(%esp)
: 8048752: sub %edi,%eax
: 8048754: movl $0x8048ab9,0x4(%esp)
: 804875c: mov %eax,0x24(%esp)
: 8048760: movl $0x1,(%esp)
: 8048767: fildl 0x24(%esp)
: test(triAsm4);
: 804876b: mov $0x4c4b40,%ebx
:
:int main() {
: test(triC);
: test(triAsm1);
: test(triAsm2);
: test(triAsm3);
: 8048770: fmuls 0x8048ae4
: 8048776: fdivs 0x8048ae8
: 804877c: fstpl 0x8(%esp)
: 8048780: call 8048370 <__printf_chk@plt>
: test(triAsm4);
: 8048785: call 8048390 <clock@plt>
: 804878a: movl $0x3c,(%esp)
: 8048791: mov %eax,%edi
: 8048793: call 8048350 <srand@plt>
: 8048798: nop
: 8048799: lea 0x0(%esi,%eiz,1),%esi
4 0.0052 0 0 : 80487a0: call 80483a0 <rand@plt>
8 0.0104 0 0 : 80487a5: movl $0x4000,0x1c(%esp)
: 80487ad: mov %eax,%ecx
: 80487af: movl $0x4000,0x18(%esp)
3 0.0039 0 0 : 80487b7: imul %esi
: 80487b9: movl $0x4000,0x14(%esp)
8 0.0104 0 0 : 80487c1: sar $0x8,%edx
: 80487c4: mov %ecx,%eax
: 80487c6: movl $0x1e0000,0x10(%esp)
: 80487ce: sar $0x1f,%eax
: 80487d1: movl $0x140000,0xc(%esp)
: 80487d9: sub %eax,%edx
: 80487db: movl $0xa0000,0x8(%esp)
: 80487e3: lea (%edx,%edx,4),%eax
8 0.0104 0 0 : 80487e6: movl $0x804a060,(%esp)
: 80487ed: shl $0x7,%eax
: 80487f0: sub %eax,%ecx
: 80487f2: mov %ecx,0x4(%esp)
5 0.0065 0 0 : 80487f6: call 804896c <triAsm4>
13 0.0168 0 0 : 80487fb: dec %ebx
3 0.0039 0 0 : 80487fc: jne 80487a0 <main+0x330>
: 80487fe: mov 0x804aa10,%ebx
: 8048804: call 8048390 <clock@plt>
: 8048809: mov %ebx,0x10(%esp)
: 804880d: sub %edi,%eax
: 804880f: movl $0x8048acd,0x4(%esp)
: 8048817: mov %eax,0x24(%esp)
: 804881b: movl $0x1,(%esp)
: 8048822: fildl 0x24(%esp)
: 8048826: fmuls 0x8048ae4
: 804882c: fdivs 0x8048ae8
: 8048832: fstpl 0x8(%esp)
: 8048836: call 8048370 <__printf_chk@plt>
: return 0;
:}
: 804883b: add $0x34,%esp
: 804883e: xor %eax,%eax
: 8048840: pop %ebx
: 8048841: pop %esi
: 8048842: pop %edi
: 8048843: leave
: 8048844: ret
: 8048845: nop
: 8048846: nop
: 8048847: nop
: 8048848: nop
: 8048849: nop
: 804884a: nop
: 804884b: nop
: 804884c: nop
: 804884d: nop
: 804884e: nop
: 804884f: nop
:
:/home/user/prog/tri/test: file format elf32-i386
:
:
:Disassembly of section .text:
:
0804896c <triAsm4>: /* triAsm4 total: 72 0.0933 0 0 */
:
: pop ebp
: ret
:
:triAsm4:
: push ebp
17 0.0220 0 0 : 804896c: push %ebp
: mov ebp, esp
: 804896d: mov %esp,%ebp
:
: pusha
: 804896f: pusha
:
: mov [stackptr], esp
31 0.0402 0 0 : 8048970: mov %esp,0x804a020
:
: mov edi, [ebp+0x08] ; dest
: 8048976: mov 0x8(%ebp),%edi
: mov ecx, [ebp+0x0c] ; cnt
1 0.0013 0 0 : 8048979: mov 0xc(%ebp),%ecx
: mov edx, [ebp+0x10] ; cr
6 0.0078 0 0 : 804897c: mov 0x10(%ebp),%edx
: mov esi, [ebp+0x14] ; cg
12 0.0156 0 0 : 804897f: mov 0x14(%ebp),%esi
: mov esp, [ebp+0x18] ; cb
5 0.0065 0 0 : 8048982: mov 0x18(%ebp),%esp
:
:/home/user/prog/tri/test: file format elf32-i386
:
:
:Disassembly of section .text:
:
08048923 <triAsm3>: /* triAsm3 total: 67 0.0868 0 0 */
:
: pop ebp
: ret
:
:triAsm3:
: push ebp
10 0.0130 0 0 : 8048923: push %ebp
: mov ebp, esp
: 8048924: mov %esp,%ebp
:
: pusha
: 8048926: pusha
:
: mov edx, [ebp+0x08] ; dest
36 0.0467 0 0 : 8048927: mov 0x8(%ebp),%edx
: mov ecx, [ebp+0x0c] ; cnt
1 0.0013 0 0 : 804892a: mov 0xc(%ebp),%ecx
: mov esi, [ebp+0x14] ; cg
13 0.0168 0 0 : 804892d: mov 0x14(%ebp),%esi
: mov edi, [ebp+0x18] ; cb
7 0.0091 0 0 : 8048930: mov 0x18(%ebp),%edi
:
:/home/user/prog/tri/test: file format elf32-i386
:
:
:Disassembly of section .text:
:
080488b0 <triAsm1>: /* triAsm1 total: 63 0.0816 3 0.0148 */
:%define dcr DWORD [ebp+0x1c]
:%define dcg DWORD [ebp+0x20]
:%define dcb DWORD [ebp+0x24]
:
:triAsm1:
: push ebp
16 0.0207 0 0 : 80488b0: push %ebp
: mov ebp, esp
: 80488b1: mov %esp,%ebp
:
: pusha
: 80488b3: pusha
:
: mov edx, [ebp+0x08] ; dest
37 0.0480 0 0 : 80488b4: mov 0x8(%ebp),%edx
: mov ecx, [ebp+0x0c] ; cnt
: 80488b7: mov 0xc(%ebp),%ecx
: mov esi, [ebp+0x14] ; cg
6 0.0078 1 0.0049 : 80488ba: mov 0x14(%ebp),%esi
: mov edi, [ebp+0x18] ; cb
4 0.0052 2 0.0098 : 80488bd: mov 0x18(%ebp),%edi
:
:/home/user/prog/tri/test: file format elf32-i386
:
:
:Disassembly of section .text:
:
080488ea <triAsm2>: /* triAsm2 total: 59 0.0765 3 0.0148 */
: pop ebp
: ret
:
:
:triAsm2:
: push ebp
19 0.0246 0 0 : 80488ea: push %ebp
: mov ebp, esp
: 80488eb: mov %esp,%ebp
:
: pusha
: 80488ed: pusha
:
: mov edx, [ebp+0x08] ; dest
31 0.0402 0 0 : 80488ee: mov 0x8(%ebp),%edx
: mov ecx, [ebp+0x0c] ; cnt
: 80488f1: mov 0xc(%ebp),%ecx
: mov esi, [ebp+0x14] ; cg
: 80488f4: mov 0x14(%ebp),%esi
: mov edi, [ebp+0x18] ; cb
9 0.0117 3 0.0148 : 80488f7: mov 0x18(%ebp),%edi