* config/tc-i386.c (i386_operand): Give an error if there are
authorIan Lance Taylor <ian@airs.com>
Fri, 2 Jan 1998 13:09:57 +0000 (13:09 +0000)
committerIan Lance Taylor <ian@airs.com>
Fri, 2 Jan 1998 13:09:57 +0000 (13:09 +0000)
unrecognized characters after an expression.

gas/ChangeLog
gas/config/tc-i386.c

index 24c9ac0f77420196311accdd4e7b295c5afbf9b7..953a98a150e9ab198a67a35b37b742c261550374 100644 (file)
@@ -1,3 +1,8 @@
+Fri Jan  2 16:08:54 1998  Ian Lance Taylor  <ian@cygnus.com>
+
+       * config/tc-i386.c (i386_operand): Give an error if there are
+       unrecognized characters after an expression.
+
 Wed Dec 31 12:29:47 1997  Jeffrey A Law  (law@cygnus.com)
 
        * config/tc-mn10200.c (md_relax_table): Correct branch ranges.
index 3bd5398c3c4675bde7359784fc8a27d4d4f01e7f..cec18e7f2ae9833f0d86130b83bcb6f17cef6488 100644 (file)
@@ -302,18 +302,18 @@ i386_align_code (fragP, count)
     {0xeb,0x0d,0x90,0x90,0x90,0x90,0x90,       /* jmp .+15; lotsa nops */
      0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90};
   static const char f16_4[] =
-    {0x8d,0xb6,0x00,0x00};                     /* lea 0w(%si),%si      */
+    {0x8d,0xb4,0x00,0x00};                     /* lea 0w(%si),%si      */
   static const char f16_5[] =
     {0x90,                                     /* nop                  */
-     0x8d,0xb6,0x00,0x00};                     /* lea 0w(%si),%si      */
+     0x8d,0xb4,0x00,0x00};                     /* lea 0w(%si),%si      */
   static const char f16_6[] =
     {0x89,0xf6,                                        /* mov %si,%si          */
      0x8d,0xbd,0x00,0x00};                     /* lea 0w(%di),%di      */
   static const char f16_7[] =
-    {0x8d,0x76,0x00,                           /* lea 0(%si),%si       */
+    {0x8d,0x74,0x00,                           /* lea 0(%si),%si       */
      0x8d,0xbd,0x00,0x00};                     /* lea 0w(%di),%di      */
   static const char f16_8[] =
-    {0x8d,0xb6,0x00,0x00,                      /* lea 0w(%si),%si      */
+    {0x8d,0xb4,0x00,0x00,                      /* lea 0w(%si),%si      */
      0x8d,0xbd,0x00,0x00};                     /* lea 0w(%di),%di      */
   static const char *const f32_patt[] = {
     f32_1, f32_2, f32_3, f32_4, f32_5, f32_6, f32_7, f32_8,
@@ -2112,6 +2112,9 @@ i386_operand (operand_string)
       input_line_pointer = ++op_string;        /* must advance op_string! */
       SKIP_WHITESPACE ();
       exp_seg = expression (exp);
+      if (*input_line_pointer != '\0')
+       as_bad ("unrecognized characters `%s' in expression",
+               input_line_pointer);
       input_line_pointer = save_input_line_pointer;
 
       if (exp->X_op == O_absent)
@@ -2719,6 +2722,9 @@ md_apply_fix3 (fixP, valp, seg)
   register char *p = fixP->fx_where + fixP->fx_frag->fr_literal;
   valueT value = *valp;
 
+  if (fixP->fx_r_type == BFD_RELOC_32 && fixP->fx_pcrel)
+     fixP->fx_r_type = BFD_RELOC_32_PCREL;
+
 #if defined (BFD_ASSEMBLER) && !defined (TE_Mach)
   /*
    * This is a hack.  There should be a better way to