This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PR11867, bignum operations


On Mon, Aug 2, 2010 at 6:18 AM, Alan Modra <amodra@gmail.com> wrote:
> gas only supports the unary '-', '~', and '!' operators for bignums,
> and all three were broken. ?'!' gave the logical inverse of the proper
> result, and the other two ignored any leading zeros.
>
> ? ? ? ?PR gas/11867
> ? ? ? ?* expr.c (operand <'-' and '~'>): Widen bignums.
> ? ? ? ?(operand <'!'>): Correct bignum result and convert to O_constant.
> ? ? ? ?* read.c (emit_expr): Don't assert on .byte bignum. ?Don't display
> ? ? ? ?bignum truncated warning for sign extended bignums.
>

I checked in this testcase.

-- 
H.J.
--
2010-08-02  H.J. Lu  <hongjiu.lu@intel.com>

	PR gas/11867
	* gas/elf/data-1.d: New.
	* gas/elf/data-1.s: Likewise.

	* elf/elf.exp: Run data-1.

--- /dev/null	2010-07-23 13:04:30.193381062 -0700
+++ binutils/gas/testsuite/gas/elf/data-1.d	2010-08-02 13:03:22.811353333 -0
700
@@ -0,0 +1,7 @@
+#objdump: -s -j .data
+#name: elf data
+
+.*: +file format .*
+
+Contents of section .data:
+ 0000 00000000 fa448607 00000000 fdffffff  .....D..........
--- /dev/null	2010-07-23 13:04:30.193381062 -0700
+++ binutils/gas/testsuite/gas/elf/data-1.s	2010-08-02 13:01:13.523358846 -0
700
@@ -0,0 +1,3 @@
+	.data
+	.quad	542196645677236224
+	.quad	-12884901888
diff --git a/gas/testsuite/gas/elf/elf.exp b/gas/testsuite/gas/elf/elf.exp
index 7c12305..e06db46 100644
--- a/gas/testsuite/gas/elf/elf.exp
+++ b/gas/testsuite/gas/elf/elf.exp
@@ -127,6 +127,7 @@ if { ([istarget "*-*-*elf*"]
 	    run_dump_test equ-reloc
 	}
     }
+    run_dump_test "data-1"
     run_dump_test "pseudo"
     run_dump_test "section0"
     run_dump_test "section1"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]