gas/
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 18 Apr 2006 17:52:37 +0000 (17:52 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 18 Apr 2006 17:52:37 +0000 (17:52 +0000)
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.

gas/ChangeLog
gas/config/tc-i386.c
gas/testsuite/ChangeLog
gas/testsuite/gas/i386/inval.l
gas/testsuite/gas/i386/inval.s

index 60798a1947de7e8cc63592aa47ab19a6ede910b3..c4e9d27986bbee648fcfc1c58d770a7566e7ff7a 100644 (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.
index c55ffaffb3e3d5652c11f7e3cfbf29d6033c416d..69cede7ad3e7a57d56c92ec265b7ef7fccd678e7 100644 (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
index bbc6ee8d163f373849e876fb0ab1cefff928c5b5..4ab84703e2d0c989f33caf7e5fd888590ca080f4 100644 (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.
index e789499185316df6a19d1d3488c4502e70475b2b..9f32368b7e4d5a7250e5f75a748681d5a0c88111 100644 (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
index e37a18eac60d1a4b8cd1046642ce63b9deefbcfd..1571a2f4fa7df9dca08cd6e898383c3d84a73511 100644 (file)
@@ -46,3 +46,4 @@ foo:  jaw     foo
        fstb    %st(0)
        fcompll 28(%ebp)
        fldlw   (%eax)
+       movl    $%ebx,%eax