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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2017-08-01
     Ever confirmed|0                           |1

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
Assembler just takes anything:

[hjl@gnu-tools-1 pr21874]$ cat x.s
        .intel_syntax noprefix
        mov     eax, DWORD PTR fs:foobar:16
        mov     eax, DWORD PTR fs:foobar:barfoo:16
        mov     eax, DWORD PTR fs:ds:16
        mov     eax, DWORD PTR fs:ds:cs:16
[hjl@gnu-tools-1 pr21874]$ make AS=as
as --32  -o x.o x.s
[hjl@gnu-tools-1 pr21874]$ objdump -dwr x.o

x.o:     file format elf32-i386


Disassembly of section .text:

00000000 <.text>:
   0:   64 a1 10 00 00 00       mov    %fs:0x10,%eax
   6:   64 a1 10 00 00 00       mov    %fs:0x10,%eax
   c:   64 a1 10 00 00 00       mov    %fs:0x10,%eax
  12:   64 a1 10 00 00 00       mov    %fs:0x10,%eax
[hjl@gnu-tools-1 pr21874]$ 

There is even a test in gas/testsuite/gas/i386/intelok.s:

mov   eax, fs:gs:[eax]

for this syntax.

-- 
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