Properly handle multiple operands for x32 quad.
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 29 Mar 2011 12:40:51 +0000 (12:40 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 29 Mar 2011 12:40:51 +0000 (12:40 +0000)
gas/

2011-03-29  H.J. Lu  <hongjiu.lu@intel.com>

* config/tc-i386.c (handle_quad): Properly handle multiple
operands.

gas/testsuite/

2011-03-29  H.J. Lu  <hongjiu.lu@intel.com>

* gas/i386/ilp32/quad.d: Add tests for multiple operands.
* gas/i386/ilp32/quad.s: Likewise.

gas/ChangeLog
gas/config/tc-i386.c
gas/testsuite/ChangeLog
gas/testsuite/gas/i386/ilp32/quad.d
gas/testsuite/gas/i386/ilp32/quad.s

index 7c5b7054bf88fe4714e4742806ff917cc6088ca3..42757677587139f46428e23996067d52afcdd4ef 100644 (file)
@@ -1,3 +1,8 @@
+2011-03-29  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * config/tc-i386.c (handle_quad): Properly handle multiple
+       operands.
+
 2011-03-29  Mike Frysinger  <vapier@gentoo.org>
 
        * config/bfin-parse.y (BYTEUNPACK): Return yyerror when dest
index 624c78a886a3d0cb091eedc4f76cc5c9e088deab..aa345b53b8e09106ee15483c34f5b4c9f6fcb606 100644 (file)
@@ -9182,19 +9182,19 @@ handle_quad (int nbytes)
       if (exp.X_op != O_constant)
        nbytes = 4;
       emit_expr (&exp, (unsigned int) nbytes);
+      /* Zero-extends to 8 bytes if not constant.  */
+      if (nbytes == 4)
+       {
+         memset (&exp, '\0', sizeof (exp));
+         exp.X_op = O_constant;
+         emit_expr (&exp, nbytes);
+       }
+      nbytes = 8;
     }
   while (*input_line_pointer++ == ',');
 
   input_line_pointer--;                /* Put terminator back into stream.  */
 
   demand_empty_rest_of_line ();
-
-  /* Zero-extends to 8 bytes if not constant.  */
-  if (nbytes == 4)
-    {
-      memset (&exp, '\0', sizeof (exp));
-      exp.X_op = O_constant;
-      emit_expr (&exp, nbytes);
-    }
 }
 #endif /* OBJ_ELF || OBJ_MAYBE_ELF */
index 2101e9fc3daabfb6b031e01b9c3003fa7dbfb6d0..51502ee904248c173a07081ba61d5aa81430cf34 100644 (file)
@@ -1,3 +1,8 @@
+2011-03-29  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * gas/i386/ilp32/quad.d: Add tests for multiple operands.
+       * gas/i386/ilp32/quad.s: Likewise.
+
 2011-03-29  Mike Frysinger  <vapier@gentoo.org>
 
        * gas/bfin/expected_errors.s: Add invalid BYTEUNPACK insn tests.
index d3e6ff88d296ce3f8d96f579d4d86f5d7de63b22..6f8a6c6f57a81608ebac627a6b444957f1442bf6 100644 (file)
@@ -7,8 +7,12 @@ RELOCATION RECORDS FOR \[.data\]:
 OFFSET +TYPE +VALUE 
 0+ R_X86_64_32 +foo
 0+10 R_X86_64_32 +bar
+0+20 R_X86_64_32 +foo
+0+30 R_X86_64_32 +bar
 
 
 Contents of section .data:
  0000 00000000 00000000 efcdab90 78674512  ............xgE.
  0010 00000000 00000000 ffffffff ffffffff  ................
+ 0020 00000000 00000000 efcdab90 78674512  ............xgE.
+ 0030 00000000 00000000 ffffffff ffffffff  ................
index e96653a8458ac7e9fb23a02ca4c7b58ec1384d54..a14304d045c42ffd8d27528a6499b18c01b1722e 100644 (file)
@@ -3,3 +3,4 @@
        .quad 0x1245677890abcdef
        .quad bar
        .quad -1
+       .quad foo, 0x1245677890abcdef, bar, -1
This page took 0.030638 seconds and 4 git commands to generate.