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't checked properly in Intel syntax


On Fri, Jan 04, 2008 at 06:28:20AM -0800, H.J. Lu wrote:
> On Fri, Jan 04, 2008 at 08:09:44AM +0000, Jan Beulich wrote:
> > While I agree on the subject, I slightly disagree on the approach you took: The added flags shouldn't go on the instructions, but on their operands (otherwise you'll likely end up creating more special case code namely for movzx/movsx, but perhaps also elsewhere): Just like for registers, memory operands should properly specify what sizes are acceptable (basically, operand type and operand size should probably be decoupled). Jan
> 
> Another problem is suffix.  I don't like using "suffix" for both
> mnemonic suffix in AT&T/Intel modes and operand size in Intel mode.
> I like your suggestion. We now have enough bits on operand to do it.
> But it is a major work and it can't be done one instruction at a time.
> 

Here is the initial patch. Any comments?

Thanks.

H.J.
---
gas/testsuite/

2008-01-10  H.J. Lu  <hongjiu.lu@intel.com>

	PR gas/5534
	* gas/i386/inval.s: Add tests for fnstsw and fstsw.
	* gas/i386/i386.s: Likewise. 
	* gas/i386/x86_64.s: Likewise.

	* gas/i386/x86-64-inval.s: Add tests for fnstsw, fstsw, in
	and out.

	* gas/i386/prefix.s: Remove invalid fstsw.

	* gas/i386/inval.l: Updated.
	* gas/i386/i386.d: Likewise.
	* gas/i386/x86_64.d: Likewise.
	* gas/i386/x86-64-inval.l: Likewise.
	* gas/i386/prefix.d: Updated.

gas/

2008-01-10  H.J. Lu  <hongjiu.lu@intel.com>

	PR gas/5534
	* config/tc-i386.c (_i386_insn): Update comment.
	(operand_type_register_match): Likewise.
	(match_template): Check memory and accumulator operand size.
	(intel_e09): Set operand size for "XXX PTR".

opcodes/

2008-01-10  H.J. Lu  <hongjiu.lu@intel.com>

	PR gas/5534
	* i386-gen.c (operand_type_init): Add Dword to
	OPERAND_TYPE_ACC32.  Add Qword to OPERAND_TYPE_ACC64.
	(opcode_modifiers): Remove CheckSize, Byte, Word, Dword,
	Qword and Xmmword.
	(operand_types): Add Byte, Word, Dword, Qword, Xmmword and
	Unspecified.

	* i386-opc.h (CheckSize): Removed.
	(Byte): Updated.
	(Word): Likewise.
	(Dword): Likewise.
	(Qword): Likewise.
	(Xmmword): Likewise.
	(FWait): Updated.
	(OTMax): Likewise.
	(i386_opcode_modifier): Remove checksize, byte, word, dword,
	qword and xmmword.
	(Unspecified): New.
	(i386_operand_type): Add checksize, byte, word, dword, qword,
	xmmword and unspecified.

	* i386-opc.tbl: Updated to use Byte, Word, Dword, Qword,
	Xmmword and Unspecified.

	* i386-reg.tbl: Add size for accumulator.

	* i386-init.h: Regenerated.
	* i386-tbl.h: Likewise.

Attachment: binutils-size-1.diff.bz2
Description: BZip2 compressed data


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