2006-04-18  H.J. Lu  <hongjiu.lu@intel.com>

	PR gas/2533
	* config/tc-i386.c (i386_immediate): Check illegal immediate
	register operand.

gas/testsuite/

2006-04-18  H.J. Lu  <hongjiu.lu@intel.com>

	PR gas/2533
	* gas/i386/inval.s: Add test for illegal immediate register
	operand.
	* gas/i386/inval.l: Updated.
This commit is contained in:
H.J. Lu 2006-04-18 17:52:37 +00:00
parent 64e7447423
commit bb8f592040
5 changed files with 21 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2006-04-18 H.J. Lu <hongjiu.lu@intel.com>
PR gas/2533
* config/tc-i386.c (i386_immediate): Check illegal immediate
register operand.
2006-04-18 Alan Modra <amodra@bigpond.net.au>
* config/tc-i386.c: Formatting.

View File

@ -4127,6 +4127,11 @@ i386_immediate (imm_start)
return 0;
}
#endif
else if (!intel_syntax && exp->X_op == O_register)
{
as_bad (_("illegal immediate register operand %s"), imm_start);
return 0;
}
else
{
/* This is an address. The size of the address will be

View File

@ -1,3 +1,10 @@
2006-04-18 H.J. Lu <hongjiu.lu@intel.com>
PR gas/2533
* gas/i386/inval.s: Add test for illegal immediate register
operand.
* gas/i386/inval.l: Updated.
2006-04-16 Nick Clifton <nickc@redhat.com>
* gas/arm/arch7.d: Skip test for non-ELF targets.

View File

@ -45,6 +45,7 @@
.*:46: Error: .*
.*:47: Error: .*
.*:48: Error: .*
.*:49: Error: .*
GAS LISTING .*
@ -96,3 +97,4 @@ GAS LISTING .*
46 [ ]* fstb %st\(0\)
47 [ ]* fcompll 28\(%ebp\)
48 [ ]* fldlw \(%eax\)
49 [ ]* movl \$%ebx,%eax

View File

@ -46,3 +46,4 @@ foo: jaw foo
fstb %st(0)
fcompll 28(%ebp)
fldlw (%eax)
movl $%ebx,%eax