]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gas/
authorJan Beulich <jbeulich@novell.com>
Tue, 22 Jun 2010 07:43:41 +0000 (07:43 +0000)
committerJan Beulich <jbeulich@novell.com>
Tue, 22 Jun 2010 07:43:41 +0000 (07:43 +0000)
2010-06-22  Jan Beulich  <jbeulich@novell.com>

PR gas/11732
* config/tc-i386-intel.c (i386_intel_parse_name): Handle pseudo
symbols named "$".
(i386_intel_operand): Remove bogus handling of pseudo symbols
named "$".
* expr.c (current_location): Remove 'static' and local
declaration.
* expr.h (current_location): Declare.

gas/testsuite/
2010-06-22  Jan Beulich  <jbeulich@novell.com>

PR gas/11732
* gas/i386/jump.d: Adjust.
* gas/i386/jump.s: Add check for branch to 2+$.

gas/ChangeLog
gas/config/tc-i386-intel.c
gas/expr.c
gas/expr.h
gas/testsuite/ChangeLog
gas/testsuite/gas/i386/jump.d
gas/testsuite/gas/i386/jump.s

index 818bd76c9fcdd8cda1a3535e5077ac719d72ce62..1d6f0e07c5cefc7c21bb6745406f63c2b76661e4 100644 (file)
@@ -1,3 +1,14 @@
+2010-06-22  Jan Beulich  <jbeulich@novell.com>
+
+       PR gas/11732
+       * config/tc-i386-intel.c (i386_intel_parse_name): Handle pseudo
+       symbols named "$".
+       (i386_intel_operand): Remove bogus handling of pseudo symbols
+       named "$".
+       * expr.c (current_location): Remove 'static' and local
+       declaration.
+       * expr.h (current_location): Declare.
+
 2010-06-21  Sterling Augustine  <sterling@tensilica.com>
 
        PR gas/11728
index 163634405307e0cd77c45d121ffe34c6056bab2a..186acc00eb470c4f41f0fe1fe1d5d6dd834f6347 100644 (file)
@@ -191,6 +191,12 @@ static int i386_intel_parse_name (const char *name, expressionS *e)
 {
   unsigned int j;
 
+  if (! strcmp (name, "$"))
+    {
+      current_location (e);
+      return 1;
+    }
+
   for (j = 0; i386_types[j].name; ++j)
     if (strcasecmp(i386_types[j].name, name) == 0)
       {
@@ -505,11 +511,6 @@ i386_intel_operand (char *operand_string, int got_a_float)
   saved_input_line_pointer = input_line_pointer;
   input_line_pointer = buf = xstrdup (operand_string);
 
-  /* A '$' followed by an identifier char is an identifier.  Otherwise,
-     it's operator '.' followed by an expression.  */
-  if (*buf == '$' && !is_identifier_char (buf[1]))
-    *buf = '.';
-
   intel_syntax = -1;
   memset (&exp, 0, sizeof(exp));
   exp_seg = expression (&exp);
index 4517bc6d823e164589461f3b9c9b12de9b839769..a6910bf91ea529defe49fe23e5a98b43001f5bd6 100644 (file)
@@ -45,7 +45,6 @@ static valueT generic_bignum_to_int64 (void);
 #endif
 static void integer_constant (int radix, expressionS * expressionP);
 static void mri_char_constant (expressionS *);
-static void current_location (expressionS *);
 static void clean_up_expression (expressionS * expressionP);
 static segT operand (expressionS *, enum expr_mode);
 static operatorT operatorf (int *);
@@ -695,7 +694,7 @@ mri_char_constant (expressionS *expressionP)
 /* Return an expression representing the current location.  This
    handles the magic symbol `.'.  */
 
-static void
+void
 current_location (expressionS *expressionp)
 {
   if (now_seg == absolute_section)
index 8a553a794731e39b82312b04da5cd4dc8f5c0a5d..cce932dc14cd7aa05c38defdb2b644fb193c392d 100644 (file)
@@ -174,6 +174,7 @@ extern segT expr (int, expressionS *, enum expr_mode);
 extern unsigned int get_single_number (void);
 extern symbolS *make_expr_symbol (expressionS * expressionP);
 extern int expr_symbol_where (symbolS *, char **, unsigned int *);
+extern void current_location (expressionS *);
 
 extern symbolS *expr_build_uconstant (offsetT);
 extern symbolS *expr_build_dot (void);
index 008475bd401e70c0834e9a4fe45016f85fa539b6..d46c075b21d8711aac7f42fd8b5246987fc06ba8 100644 (file)
@@ -1,3 +1,9 @@
+2010-06-22  Jan Beulich  <jbeulich@novell.com>
+
+       PR gas/11732
+       * gas/i386/jump.d: Adjust.
+       * gas/i386/jump.s: Add check for branch to 2+$.
+
 2010-06-18  Joseph Myers  <joseph@codesourcery.com>
 
        * gas/tic6x/resource-func-unit-1.d,
index e53f09d4f6400a7522b1d18f245249f995d61127..6dcececc1f2d0545e27ed39ff3e947ae5f52e080 100644 (file)
@@ -34,22 +34,24 @@ Disassembly of section .text:
 [      ]*[a-f0-9]+:    ff 2b                   ljmp   \*\(%ebx\)
 [      ]*[a-f0-9]+:    eb 00                   jmp    (0x)?7b( <.text(\+0x7b)?>)?
 [      ]*[a-f0-9]+:    90                      nop
-[      ]*[a-f0-9]+:    eb 00                   jmp    (0x)?7e( <.text(\+0x7e)?>)?
+[      ]*[a-f0-9]+:    e3 00                   jecxz  (0x)?7e( <.text(\+0x7e)?>)?
+[      ]*[a-f0-9]+:    90                      nop
+[      ]*[a-f0-9]+:    eb 00                   jmp    (0x)?81( <.text(\+0x81)?>)?
 [      ]*[a-f0-9]+:    90                      nop
 [      ]*[a-f0-9]+:    9a 90 90 90 90 90 90    lcall  \$0x9090,\$0x90909090
 [      ]*[a-f0-9]+:    9a 90 90 90 90 90 90    lcall  \$0x9090,\$0x90909090
-[      ]*[a-f0-9]+:    9a 00 00 00 00 90 90    lcall  \$0x9090,\$0x0   8e: (R_386_)?(dir)?32   xxx
-[      ]*[a-f0-9]+:    9a 00 00 00 00 90 90    lcall  \$0x9090,\$0x0   95: (R_386_)?(dir)?32   xxx
+[      ]*[a-f0-9]+:    9a 00 00 00 00 90 90    lcall  \$0x9090,\$0x0[  ]+[a-f0-9]+: (R_386_)?(dir)?32  xxx
+[      ]*[a-f0-9]+:    9a 00 00 00 00 90 90    lcall  \$0x9090,\$0x0[  ]+[a-f0-9]+: (R_386_)?(dir)?32  xxx
 [      ]*[a-f0-9]+:    9a 90 90 90 90 90 90    lcall  \$0x9090,\$0x90909090
 [      ]*[a-f0-9]+:    9a 90 90 90 90 90 90    lcall  \$0x9090,\$0x90909090
-[      ]*[a-f0-9]+:    9a 00 00 00 00 90 90    lcall  \$0x9090,\$0x0   aa: (R_386_)?(dir)?32   xxx
-[      ]*[a-f0-9]+:    9a 00 00 00 00 90 90    lcall  \$0x9090,\$0x0   b1: (R_386_)?(dir)?32   xxx
+[      ]*[a-f0-9]+:    9a 00 00 00 00 90 90    lcall  \$0x9090,\$0x0[  ]+[a-f0-9]+: (R_386_)?(dir)?32  xxx
+[      ]*[a-f0-9]+:    9a 00 00 00 00 90 90    lcall  \$0x9090,\$0x0[  ]+[a-f0-9]+: (R_386_)?(dir)?32  xxx
 [      ]*[a-f0-9]+:    ea 90 90 90 90 90 90    ljmp   \$0x9090,\$0x90909090
 [      ]*[a-f0-9]+:    ea 90 90 90 90 90 90    ljmp   \$0x9090,\$0x90909090
-[      ]*[a-f0-9]+:    ea 00 00 00 00 90 90    ljmp   \$0x9090,\$0x0   c6: (R_386_)?(dir)?32   xxx
-[      ]*[a-f0-9]+:    ea 00 00 00 00 90 90    ljmp   \$0x9090,\$0x0   cd: (R_386_)?(dir)?32   xxx
+[      ]*[a-f0-9]+:    ea 00 00 00 00 90 90    ljmp   \$0x9090,\$0x0[  ]+[a-f0-9]+: (R_386_)?(dir)?32  xxx
+[      ]*[a-f0-9]+:    ea 00 00 00 00 90 90    ljmp   \$0x9090,\$0x0[  ]+[a-f0-9]+: (R_386_)?(dir)?32  xxx
 [      ]*[a-f0-9]+:    ea 90 90 90 90 90 90    ljmp   \$0x9090,\$0x90909090
 [      ]*[a-f0-9]+:    ea 90 90 90 90 90 90    ljmp   \$0x9090,\$0x90909090
-[      ]*[a-f0-9]+:    ea 00 00 00 00 90 90    ljmp   \$0x9090,\$0x0   e2: (R_386_)?(dir)?32   xxx
-[      ]*[a-f0-9]+:    ea 00 00 00 00 90 90    ljmp   \$0x9090,\$0x0   e9: (R_386_)?(dir)?32   xxx
+[      ]*[a-f0-9]+:    ea 00 00 00 00 90 90    ljmp   \$0x9090,\$0x0[  ]+[a-f0-9]+: (R_386_)?(dir)?32  xxx
+[      ]*[a-f0-9]+:    ea 00 00 00 00 90 90    ljmp   \$0x9090,\$0x0[  ]+[a-f0-9]+: (R_386_)?(dir)?32  xxx
 #pass
index 8ce459f16fb743b04688506fdacc255abafc52b9..eec3f0ab6393c70dba010bcf38eab06cf1f1cf8a 100644 (file)
@@ -33,6 +33,8 @@
        jmp     fword ptr [ebx]
        jmp     $+2
        nop
+       jecxz   2+$
+       nop
        jmp     .+2
        nop