https://sourceware.org/bugzilla/show_bug.cgi?id=23526

            Bug ID: 23526
           Summary: 32-bit address can be encoded with addr32 prefix
           Product: binutils
           Version: 2.32 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gas
          Assignee: unassigned at sourceware dot org
          Reporter: hjl.tools at gmail dot com
  Target Milestone: ---
            Target: x86-64

[hjl@gnu-tools-1 binutils]$ cat 2.s
        .allow_index_reg
        mov    0xff332211, %eax
        mov    -0xccddef(,%eiz,), %eax
        mov    %eax, 0xff332211
        mov    %eax, -0xccddef(,%eiz,)
        mov    -0xccddef(,%eiz,), %ebx
        mov    %ebx, -0xccddef(,%eiz,)
[hjl@gnu-tools-1 binutils]$ gcc -c 2.s
[hjl@gnu-tools-1 binutils]$ ./objdump -dw 2.o

2.o:     file format elf64-x86-64


Disassembly of section .text:

0000000000000000 <.text>:
   0:   a1 11 22 33 ff 00 00 00 00      movabs 0xff332211,%eax
   9:   67 8b 04 25 11 22 33 ff         mov    0xff332211,%eax
  11:   a3 11 22 33 ff 00 00 00 00      movabs %eax,0xff332211
  1a:   67 89 04 25 11 22 33 ff         mov    %eax,0xff332211
  22:   67 8b 1c 25 11 22 33 ff         mov    0xff332211,%ebx
  2a:   67 89 1c 25 11 22 33 ff         mov    %ebx,0xff332211
[hjl@gnu-tools-1 binutils]$ cat 3.s
        mov    0xff332211, %ebx
        mov    %ebx, 0xff332211
[hjl@gnu-tools-1 binutils]$ gcc -c 3.s
3.s: Assembler messages:
3.s:1: Error: unsupported instruction `mov'
3.s:2: Error: unsupported instruction `mov'
[hjl@gnu-tools-1 binutils]$

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to