This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: PR gas/10637: x86 assembler failed to handle [addr] in Intel mode
On Tue, Sep 15, 2009 at 7:09 AM, Jan Beulich <JBeulich@novell.com> wrote:
>>>> "H.J. Lu" <hjl.tools@gmail.com> 15.09.09 15:46 >>>
>>I will take a look.
>>
>>Please tell me which version masm you used. Mine doesn't
>>take [] as immediate.
>
> I used 8.00.50727.42, 7.10.3077, and 7.00.9466 - which all give the
> same result.
>
For MASM 8.00.50727.42, we got
OPTION DOTNAME
_TEXT SEGMENT 'CODE'
ALIGN 16
PUBLIC f1
f1 PROC
mov eax, 1
mov eax, [1]
mov eax, DWORD PTR [1]
mov eax, DWORD PTR 1
ret
ALIGN 16
::
f1 ENDP
_TEXT ENDS
_DATA SEGMENT 'DATA'
_DATA ENDS
_DATA SEGMENT 'DATA'
_DATA ENDS
EXTRN __ImageBase:PROC
END
MASM produces this:
f1:
0000000000000000: B8 01 00 00 00 mov eax,1
0000000000000005: 8B 04 25 01 00 00 mov eax,dword ptr [00000001h]
00
000000000000000C: 8B 04 25 01 00 00 mov eax,dword ptr [00000001h]
00
0000000000000013: B8 01 00 00 00 mov eax,1
0000000000000018: C3 ret
0000000000000019: 0F 1F 80 00 00 00 nop dword ptr [rax+00000000h]
00
It doesn't match you what you described. Can you try our test?
Thanks.
--
H.J.