PATCH: PR gas/5534: "XXX PTR" isn't checkedproperlyinIntelsyntax

H.J. Lu hjl@lucon.org
Wed Jan 16 00:04:00 GMT 2008


On Mon, Jan 14, 2008 at 03:54:13PM +0000, Jan Beulich wrote:
> >2. 64bit extension adds a new size and we don't want to disallow the 32bit
> >default version:
> >
> >bash-3.2$ cat x.s
> >        .intel_syntax noprefix
> >cvtsi2sd xmm1, [rax]
> >cvtsi2sd xmm1,DWORD PTR [rax]
> >cvtsi2sd xmm1,QWORD PTR [rax]
> 
> I don't think this is desirable - if 64bit specifies two sizes, programmers
> should be explicit in selecting them. I'm pretty certain MASM enforces
> this, too, so again I'd want it to work that way at least in Intel mode.

That is not a problem. I will enforce it.

> 
> >If you can find a case where Unspecified is used with more than 1 sizes
> >in a different way, please let me know.
> 
> - base opcode 0xC6 (the immediate doesn't allow deriving a size)
> - movsx
> - movzx
> - push (base opcode 0xFF)
> - pop (base opcode 0x8F)
> - base opcodes 0x80 and 0x83
> - inc/dec (base opcode 0xFE)

I didn't see it at least for movsx,

movsx, 2, 0xfbe, None, 2, Cpu386, Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { Reg8|Byte|Unspecified|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
movsx, 2, 0xfbf, None, 2, Cpu386, Modrm|No_bSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { Reg16|Word|Unspecified|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg32|Reg64 }
movsx, 2, 0x63, None, 1, Cpu64, Modrm|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_ldSuf|Rex64, { Reg32|Dword|Unspecified|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg64 }

One one size and Unspecified are allowed. What is wrong with that?



H.J.



More information about the Binutils mailing list