[Bug target/34256] mmx and movd/movq on x86_64

dean at arctic dot org gcc-bugzilla@gcc.gnu.org
Wed Nov 28 01:44:00 GMT 2007



------- Comment #1 from dean at arctic dot org  2007-11-28 01:43 -------
this appears to be a regression between gcc 4.1.x and 4.2.x.  i had to switch
the intrinsic to _mm_cvtsi64_si64x but it otherwise generates the same code on
4.3.x...

ubuntu 4.1.2:

% objdump -dr movq.o

movq.o:     file format elf64-x86-64

Disassembly of section .text:

0000000000000000 <foo>:
   0:   0f 6f 05 00 00 00 00    movq   0(%rip),%mm0        # 7 <foo+0x7>
                        3: R_X86_64_PC32        x+0xfffffffffffffffc
   7:   0f fe 05 00 00 00 00    paddd  0(%rip),%mm0        # e <foo+0xe>
                        a: R_X86_64_PC32        y+0xfffffffffffffffc
   e:   48 0f 7e c0             movd   %mm0,%rax
  12:   c3                      retq

and 4.2.1:

movq.o:     file format elf64-x86-64

Disassembly of section .text:

0000000000000000 <foo>:
   0:   48 8b 05 00 00 00 00    mov    0x0(%rip),%rax        # 7 <foo+0x7>
                        3: R_X86_64_PC32        x+0xfffffffffffffffc
   7:   48 89 44 24 f8          mov    %rax,-0x8(%rsp)
   c:   0f 6f 44 24 f8          movq   -0x8(%rsp),%mm0
  11:   0f fe 05 00 00 00 00    paddd  0x0(%rip),%mm0        # 18 <foo+0x18>
                        14: R_X86_64_PC32       y+0xfffffffffffffffc
  18:   0f 7f 44 24 f8          movq   %mm0,-0x8(%rsp)
  1d:   48 8b 44 24 f8          mov    -0x8(%rsp),%rax
  22:   c3                      retq


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34256



More information about the Gcc-bugs mailing list