* PATCH: gas/2533: Internal error on immediate register operand
@ 2006-04-14 23:04 H. J. Lu
0 siblings, 0 replies; only message in thread
From: H. J. Lu @ 2006-04-14 23:04 UTC (permalink / raw)
To: binutils
We get
bad.s: Assembler messages:
bad.s:3: Internal error, aborting at /export/gnu/src/binutils-import/binutils/gas/config/tc-i386.c line 2123 in optimize_imm
Please report this bug.
on "movl $%ebx,%eax". This patch checks it.
H.J.
---
gas/
2006-04-14 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-14 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.
--- gas/config/tc-i386.c.bad 2006-04-14 14:44:45.000000000 -0700
+++ gas/config/tc-i386.c 2006-04-14 15:34:12.000000000 -0700
@@ -4131,6 +4131,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
--- gas/testsuite/gas/i386/inval.l.bad 1999-05-03 00:28:50.000000000 -0700
+++ gas/testsuite/gas/i386/inval.l 2006-04-14 15:40:05.000000000 -0700
@@ -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
--- gas/testsuite/gas/i386/inval.s.bad 1999-05-03 00:28:50.000000000 -0700
+++ gas/testsuite/gas/i386/inval.s 2006-04-14 15:40:00.000000000 -0700
@@ -46,3 +46,4 @@ foo: jaw foo
fstb %st(0)
fcompll 28(%ebp)
fldlw (%eax)
+ movl $%ebx,%eax
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-04-14 22:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-14 23:04 PATCH: gas/2533: Internal error on immediate register operand H. J. Lu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).