Despite them being ignored by the CPU, gas issues segment override
authorJan Beulich <jbeulich@novell.com>
Tue, 7 Aug 2012 16:57:49 +0000 (16:57 +0000)
committerJan Beulich <jbeulich@novell.com>
Tue, 7 Aug 2012 16:57:49 +0000 (16:57 +0000)
commit848930b2ba6024409e18d93f52fbdc206c4904c4
treec97c7f6e0a9b58fb1cb7ea8a88c783c5022184d2
parent7bab8ab56f7c09acbaca2645314e0622b20c2afe
Despite them being ignored by the CPU, gas issues segment override
prefixes for other than FS/GS in 64-bit mode. If doing so at all, it
should clearly do this correctly. Determining the default segment,
however, requires to take into consideration RegRex (so far, RSP, RBP,
R12, and R13 were all treated equally here).

gas/
2012-08-07  Jan Beulich <jbeulich@suse.com>

* config/tc-i386-intel.c (build_modrm_byte): Split determining
default segment from figuring out encoding. Honor RegRex for
the former.

gas/testsuite/
2012-08-07  Jan Beulich <jbeulich@suse.com>

* gas/i386/x86-64-segovr.{s,l}: New.
* gas/i386/i386.exp: Run new test.
gas/ChangeLog
gas/config/tc-i386.c
gas/testsuite/ChangeLog
gas/testsuite/gas/i386/i386.exp
gas/testsuite/gas/i386/x86-64-segovr.d [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-segovr.s [new file with mode: 0644]