This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: PR gas/5534: "XXX PTR" isn'tcheckedproperlyinIntelsyntax


On Mon, Jan 14, 2008 at 04:41:04PM +0000, Jan Beulich wrote:
> >> >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?
> 
> The fact this (according to your description) allows
> 
> 	movsx	eax, [eax]
> 
> which is ambiguous.

This is checked by process_suffix. I am planning to clean up
process_suffix. Then we will need to update the opcode table. I
will see what I can do in the meantime. In any case, I will
leave AT&T syntax alone and enforce size for Intel mode.


H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]