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

            Bug ID: 58132
           Summary: x86-64 gcc generate wrong movabs code for intel syntax
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: netfirewall at gmail dot com

When I compile below testcase with gcc -masm=intel -O2

--cut here--
int test(){
    long *ptr = (long*)0xFFFF800000000000;

    *ptr = -1;

    return 0;
}
--cut here--

MOVABS is incorrectly translated into "mov [rax], -1", and causes "Error:
ambiguous operand size for `mov' ".
It should be "mov QWORD PTR [rax], -1"

This may be a patch for this bug, but has not yet been approved.
http://gcc.gnu.org/ml/gcc-patches/2013-08/msg00623.html

Reply via email to