Created
September 25, 2014 21:15
-
-
Save nkurz/b1c3e01498dd11fda42f to your computer and use it in GitHub Desktop.
Objdump of different compilers for constant_division.c
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
GCC 4.8.1 | |
4019f0: 66 0f 6f 00 movdqa (%rax),%xmm0 | |
4019f4: 48 83 c0 10 add $0x10,%rax | |
4019f8: 48 39 c5 cmp %rax,%rbp | |
4019fb: 66 0f 6f c8 movdqa %xmm0,%xmm1 | |
4019ff: 66 0f 6f e0 movdqa %xmm0,%xmm4 | |
401a03: 66 0f 62 c8 punpckldq %xmm0,%xmm1 | |
401a07: 66 0f 6a e0 punpckhdq %xmm0,%xmm4 | |
401a0b: 66 0f f4 cb pmuludq %xmm3,%xmm1 | |
401a0f: 66 0f f4 e3 pmuludq %xmm3,%xmm4 | |
401a13: 0f c6 cc dd shufps $0xdd,%xmm4,%xmm1 | |
401a17: 66 0f fa c1 psubd %xmm1,%xmm0 | |
401a1b: 66 0f 72 d0 01 psrld $0x1,%xmm0 | |
401a20: 66 0f fe c1 paddd %xmm1,%xmm0 | |
401a24: 66 0f 72 d0 02 psrld $0x2,%xmm0 | |
401a29: 66 0f fe d0 paddd %xmm0,%xmm2 | |
401a2d: 75 c1 jne 4019f0 <main+0xb0> | |
ICC 14.0.3 | |
4020a1: b8 25 49 92 24 mov $0x24924925,%eax | |
4020a6: 8b 5c 8c 20 mov 0x20(%rsp,%rcx,4),%ebx | |
4020aa: 48 ff c1 inc %rcx | |
4020ad: f7 e3 mul %ebx | |
4020af: 2b da sub %edx,%ebx | |
4020b1: d1 eb shr %ebx | |
4020b3: 03 da add %edx,%ebx | |
4020b5: c1 eb 02 shr $0x2,%ebx | |
4020b8: 44 03 fb add %ebx,%r15d | |
4020bb: 48 81 f9 40 42 0f 00 cmp $0xf4240,%rcx | |
4020c2: 7c dd jl 4020a1 <main+0xa1> | |
Clang 3.4.1 | |
401b20: 66 42 0f 6f 54 84 20 movdqa 0x20(%rsp,%r8,4),%xmm2 | |
401b27: 66 0f 70 c2 03 pshufd $0x3,%xmm2,%xmm0 | |
401b2c: 66 41 0f 7e c7 movd %xmm0,%r15d | |
401b31: 49 69 cf 25 49 92 24 imul $0x24924925,%r15,%rcx | |
401b38: 66 41 0f 7e d2 movd %xmm2,%r10d | |
401b3d: 4d 69 ca 25 49 92 24 imul $0x24924925,%r10,%r9 | |
401b44: 48 c1 e9 20 shr $0x20,%rcx | |
401b48: 42 0f 28 4c 84 10 movaps 0x10(%rsp,%r8,4),%xmm1 | |
401b4e: 49 83 c0 08 add $0x8,%r8 | |
401b52: 0f 28 c1 movaps %xmm1,%xmm0 | |
401b55: 0f 12 c0 movhlps %xmm0,%xmm0 | |
401b58: 41 29 cf sub %ecx,%r15d | |
401b5b: 66 0f 70 da 01 pshufd $0x1,%xmm2,%xmm3 | |
401b60: 49 c1 e9 20 shr $0x20,%r9 | |
401b58: 41 29 cf sub %ecx,%r15d | |
401b5b: 66 0f 70 da 01 pshufd $0x1,%xmm2,%xmm3 | |
401b60: 49 c1 e9 20 shr $0x20,%r9 | |
401b64: 0f 12 d2 movhlps %xmm2,%xmm2 | |
401b67: 66 41 0f 7e d5 movd %xmm2,%r13d | |
401b6c: 4d 69 dd 25 49 92 24 imul $0x24924925,%r13,%r11 | |
401b73: 49 c1 eb 20 shr $0x20,%r11 | |
401b77: 66 0f 7e df movd %xmm3,%edi | |
401b7b: 48 69 d7 25 49 92 24 imul $0x24924925,%rdi,%rdx | |
401b82: 48 c1 ea 20 shr $0x20,%rdx | |
401b86: 41 d1 ef shr %r15d | |
401b89: 29 d7 sub %edx,%edi | |
401b8b: 45 29 ca sub %r9d,%r10d | |
401b8e: 45 29 dd sub %r11d,%r13d | |
401b91: 66 0f 70 d1 03 pshufd $0x3,%xmm1,%xmm2 | |
401b96: 66 0f 7e d3 movd %xmm2,%ebx | |
401b9a: 66 0f 70 d1 01 pshufd $0x1,%xmm1,%xmm2 | |
401b9f: 4c 69 f3 25 49 92 24 imul $0x24924925,%rbx,%r14 | |
401ba6: 49 c1 ee 20 shr $0x20,%r14 | |
401baa: 41 d1 ed shr %r13d | |
401bad: 41 d1 ea shr %r10d | |
401bb0: d1 ef shr %edi | |
401bb2: 44 29 f3 sub %r14d,%ebx | |
401bb5: 66 0f 7e d0 movd %xmm2,%eax | |
401bb9: 41 01 cf add %ecx,%r15d | |
401bbc: 4c 69 e0 25 49 92 24 imul $0x24924925,%rax,%r12 | |
401bc3: 49 c1 ec 20 shr $0x20,%r12 | |
401bc7: 44 29 e0 sub %r12d,%eax | |
401bca: d1 e8 shr %eax | |
401bcc: d1 eb shr %ebx | |
401bce: 01 d7 add %edx,%edi | |
401bd0: 66 0f 7e c9 movd %xmm1,%ecx | |
401bd4: 45 01 ca add %r9d,%r10d | |
401bd7: 45 01 dd add %r11d,%r13d | |
401bda: 48 69 f1 25 49 92 24 imul $0x24924925,%rcx,%rsi | |
401be1: 48 c1 ee 20 shr $0x20,%rsi | |
401be5: 29 f1 sub %esi,%ecx | |
401be7: d1 e9 shr %ecx | |
401be9: 41 c1 ed 02 shr $0x2,%r13d | |
401bed: 41 c1 ea 02 shr $0x2,%r10d | |
401bf1: c1 ef 02 shr $0x2,%edi | |
401bf4: 41 c1 ef 02 shr $0x2,%r15d | |
401bf8: 66 0f 7e c2 movd %xmm0,%edx | |
401bfc: 44 01 f3 add %r14d,%ebx | |
401bff: 44 01 e0 add %r12d,%eax | |
401c02: 01 f1 add %esi,%ecx | |
401c04: 48 69 f2 25 49 92 24 imul $0x24924925,%rdx,%rsi | |
401c0b: 48 c1 ee 20 shr $0x20,%rsi | |
401c0f: 29 f2 sub %esi,%edx | |
401c11: d1 ea shr %edx | |
401c13: 01 f2 add %esi,%edx | |
401c15: c1 ea 02 shr $0x2,%edx | |
401c18: c1 e9 02 shr $0x2,%ecx | |
401c1b: c1 e8 02 shr $0x2,%eax | |
401c1e: c1 eb 02 shr $0x2,%ebx | |
401c21: 49 81 f8 44 42 0f 00 cmp $0xf4244,%r8 | |
401c28: 66 41 0f 6e cf movd %r15d,%xmm1 | |
401c2d: 66 0f 6e c7 movd %edi,%xmm0 | |
401c31: 66 0f 62 c1 punpckldq %xmm1,%xmm0 | |
401c35: 66 41 0f 6e ca movd %r10d,%xmm1 | |
401c3a: 66 41 0f 6e d5 movd %r13d,%xmm2 | |
401c3f: 66 0f 62 ca punpckldq %xmm2,%xmm1 | |
401c43: 66 0f 62 c8 punpckldq %xmm0,%xmm1 | |
401c47: 66 0f fe e1 paddd %xmm1,%xmm4 | |
401c4b: 66 0f 6e cb movd %ebx,%xmm1 | |
401c4f: 66 0f 6e c0 movd %eax,%xmm0 | |
401c53: 66 0f 62 c1 punpckldq %xmm1,%xmm0 | |
401c57: 66 0f 6e c9 movd %ecx,%xmm1 | |
401c5b: 66 0f 6e d2 movd %edx,%xmm2 | |
401c5f: 66 0f 62 ca punpckldq %xmm2,%xmm1 | |
401c63: 66 0f 62 c8 punpckldq %xmm0,%xmm1 | |
401c67: 66 0f fe e9 paddd %xmm1,%xmm5 | |
401c6b: 0f 85 af fe ff ff jne 401b20 <main+0xa0> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment