This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH 6/6] x86: fold RegEip/RegRip and RegEiz/RegRiz
On Thu, Aug 2, 2018 at 9:06 AM, Jan Beulich <JBeulich@suse.com> wrote:
>>>> On 02.08.18 at 14:49, <hjl.tools@gmail.com> wrote:
>> On Thu, Aug 2, 2018 at 5:43 AM, Jan Beulich <JBeulich@suse.com> wrote:
>>>>>> On 02.08.18 at 14:28, <hjl.tools@gmail.com> wrote:
>>>> On Wed, Aug 1, 2018 at 11:52 PM, Jan Beulich <JBeulich@suse.com> wrote:
>>>>> --- a/gas/testsuite/gas/i386/x86-64-mpx-inval-2.l
>>>>> +++ b/gas/testsuite/gas/i386/x86-64-mpx-inval-2.l
>>>>> @@ -2,7 +2,7 @@
>>>>> .*:6: Error: 32-bit address isn't allowed in 64-bit MPX instructions.
>>>>> .*:7: Error: 32-bit address isn't allowed in 64-bit MPX instructions.
>>>>> .*:8: Error: `\(%rip\)' cannot be used here
>>>>> -.*:9: Error: 32-bit address isn't allowed in 64-bit MPX instructions.
>>>>> +.*:9: Error: .*
>>>>>
>>>>
>>>> We should keep "32-bit address isn't allowed in 64-bit MPX instructions"
>>>> error.
>>>
>>> Are you suggesting to special case the place the error message now
>>> gets raised, just to get the wording the same as before? What's wrong
>>> with it being either the previous one or the analogue to "`(%rip)'
>>> cannot be used here", i.e. "`(%eip)' cannot be used here". When a
>>> single statement is wrong in multiple possible ways, I don't think there
>>> should be a requirement which of the issues the assembler reports, as
>>> long as it reports exactly one (I find it odd enough that there are
>>> cases where two errors get reported for a single statement, but I'll
>>> get to that eventually as well).
>>>
>>
>> We get an error today:
>>
>> [hjl@gnu-tools-1 tmp]$ cat x.s
>> bndmk (%eip), %bnd2
>> [hjl@gnu-tools-1 tmp]$ gcc -c x.s
>> x.s: Assembler messages:
>> x.s:1: Error: 32-bit address isn't allowed in 64-bit MPX instructions.
>> [hjl@gnu-tools-1 tmp]$
>>
>> With your change, what do we get?
>
> `(%eip)' cannot be used here
.* Error: 32-bit address isn't allowed in 64-bit MPX instructions\.
[ ]*[1-9][0-9]*[ ]+4C1903
[ ]*[1-9][0-9]*[ ]+bndmk \(%rip\), %bnd3
-[ ]*[1-9][0-9]*[ ]+\?\?\?\? 67F30F1B bndmk \(%eip\), %bnd2
-.* Error: 32-bit address isn't allowed in 64-bit MPX instructions\.
-[ ]*[1-9][0-9]*[ ]+15000000
-[ ]*[1-9][0-9]*[ ]+00
+[ ]*[1-9][0-9]*[ ]+bndmk \(%eip\), %bnd2
[ ]*[1-9][0-9]*[ ]+
[ ]*[1-9][0-9]*[ ]+\#\#\# bndmov
[ ]*[1-9][0-9]*[ ]+\?\?\?\? 6766410F bndmov \(%r8d\), %bnd1
Why is there no error message for bndmk (%eip), %bnd2"? Also
`(%eip)' cannot be used here
contains less info than
32-bit address isn't allowed in 64-bit MPX instructions
--
H.J.