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]

Symbol assignment in testsuite


We have a problem with tests that are supposed to run on all targets.
alpha uses .set to enable or disable various features, hppa and z80
use a different syntax for .equ to other targets, and blackfin doesn't
support "=" to assign symbol values.  That leaves just one option for
assigning values to symbols that works on all targets, at least for
tests that don't assign the same symbol more than once.

Committed.

binutils/testsuite/
	* binutils-all/localize-hidden-1.s: Use "==" instead of ".set".
	* binutils-all/localize-hidden-2.s: Likewise.
gas/testsuite/
	* gas/all/gas.exp: Disable assign and assign-ok tests on blackfin.
	* gas/all/p2425.s: Use "==" instead of "=".
	* gas/all/weakref1.s: Likewise.
	* gas/macros/and.s: Likewise.
	* gas/macros/test1.s: Likewise.
	* gas/hppa/parse/parse.exp: Remove xfail on block1.
ld/testsuite/
	* ld-libs/lib-1.s: Use "==" instead of ".set".
	* ld-libs/lib-2.s: Likewise.
	* ld-scripts/defined.s: Likewise.

Index: binutils/testsuite/binutils-all/localize-hidden-1.s
===================================================================
RCS file: /cvs/src/src/binutils/testsuite/binutils-all/localize-hidden-1.s,v
retrieving revision 1.3
diff -u -p -r1.3 localize-hidden-1.s
--- binutils/testsuite/binutils-all/localize-hidden-1.s	2 Mar 2009 23:33:02 -0000	1.3
+++ binutils/testsuite/binutils-all/localize-hidden-1.s	16 Apr 2009 01:30:06 -0000
@@ -20,17 +20,17 @@
 	.protected	Gprotected
 	.protected	Wprotected
 
-	.set		Ldefault, 0x1100
-	.set		Lhidden, 0x1200
-	.set		Linternal, 0x1300
-	.set		Lprotected, 0x1400
+	Ldefault == 0x1100
+	Lhidden == 0x1200
+	Linternal == 0x1300
+	Lprotected == 0x1400
 
-	.set		Gdefault, 0x2100
-	.set		Ghidden, 0x2200
-	.set		Ginternal, 0x2300
-	.set		Gprotected, 0x2400
+	Gdefault == 0x2100
+	Ghidden == 0x2200
+	Ginternal == 0x2300
+	Gprotected == 0x2400
 
-	.set		Wdefault, 0x3100
-	.set		Whidden, 0x3200
-	.set		Winternal, 0x3300
-	.set		Wprotected, 0x3400
+	Wdefault == 0x3100
+	Whidden == 0x3200
+	Winternal == 0x3300
+	Wprotected == 0x3400
Index: binutils/testsuite/binutils-all/localize-hidden-2.s
===================================================================
RCS file: /cvs/src/src/binutils/testsuite/binutils-all/localize-hidden-2.s,v
retrieving revision 1.3
diff -u -p -r1.3 localize-hidden-2.s
--- binutils/testsuite/binutils-all/localize-hidden-2.s	2 Mar 2009 23:33:02 -0000	1.3
+++ binutils/testsuite/binutils-all/localize-hidden-2.s	16 Apr 2009 01:30:06 -0000
@@ -1,2 +1,2 @@
 	.globl	G
-	.set	G,0x100
+	G == 0x100
Index: gas/testsuite/gas/all/gas.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/all/gas.exp,v
retrieving revision 1.56
diff -u -p -r1.56 gas.exp
--- gas/testsuite/gas/all/gas.exp	29 Jan 2009 09:03:09 -0000	1.56
+++ gas/testsuite/gas/all/gas.exp	16 Apr 2009 01:30:22 -0000
@@ -59,7 +59,9 @@ case $target_triplet in {
 gas_test "eqv-ok.s" "" "" ".eqv support"
 gas_test_error "eqv-bad.s" "" ".eqv for symbol already set"
 
-gas_test "assign-ok.s" "" "" "== assignment support"
+if { ![istarget "bfin-*-*"] } then {
+    gas_test "assign-ok.s" "" "" "== assignment support"
+}
 gas_test_error "assign-bad.s" "" "== assignment for symbol already set"
 
 # .equ works differently on some targets.
@@ -305,7 +307,9 @@ if {  ([istarget "i*86-*-*pe*"] && ![ist
   gas_test "fastcall.s" ""   "" "fastcall labels"
 }
 
-run_dump_test assign
+if { ![istarget "bfin-*-*"] } then {
+    run_dump_test assign
+}
 run_dump_test sleb128
 
 # .byte is 32 bits on tic4x, and .p2align isn't supported on tic54x
Index: gas/testsuite/gas/all/p2425.s
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/all/p2425.s,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 p2425.s
--- gas/testsuite/gas/all/p2425.s	3 May 1999 07:28:47 -0000	1.1.1.1
+++ gas/testsuite/gas/all/p2425.s	16 Apr 2009 01:30:22 -0000
@@ -2,5 +2,5 @@
 	.globl _frobnitz
 _frobnitz:
 	.long 1, 2, 3, 4, 5, 6, 7, GRUMP, 42
-	GRUMP=.-_frobnitz
-	HALFGRUMP=GRUMP/2
+	GRUMP==.-_frobnitz
+	HALFGRUMP==GRUMP/2
Index: gas/testsuite/gas/all/weakref1.s
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/all/weakref1.s,v
retrieving revision 1.4
diff -u -p -r1.4 weakref1.s
--- gas/testsuite/gas/all/weakref1.s	20 Nov 2005 22:03:25 -0000	1.4
+++ gas/testsuite/gas/all/weakref1.s	16 Apr 2009 01:30:22 -0000
@@ -189,7 +189,7 @@ l:
 /* d# target symbol definitions */
 	.weakref Wld1, ld1
 	.long Wld1
-	ld1 = l
+	ld1 == l
 
 	.weakref Wld2, ld2
 	.long Wld2
Index: gas/testsuite/gas/hppa/parse/parse.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/hppa/parse/parse.exp,v
retrieving revision 1.12
diff -u -p -r1.12 parse.exp
--- gas/testsuite/gas/hppa/parse/parse.exp	3 Jul 2007 11:01:07 -0000	1.12
+++ gas/testsuite/gas/hppa/parse/parse.exp	16 Apr 2009 01:30:23 -0000
@@ -179,8 +179,6 @@ if [istarget hppa*-*-*] then {
     # Now check to make sure an invalid argument is flagged as an error.
     gas_test_error "align2.s" "" "Check for error on bogus argument to .align"
 
-    # GAS can't handle upper bound for a PA .block[z] directive
-    setup_xfail hppa*-*-*
     gas_test "block1.s" "" "" "Check min/max values for .block"
 
     # Now check for an invalid argument
Index: gas/testsuite/gas/macros/and.s
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/macros/and.s,v
retrieving revision 1.2
diff -u -p -r1.2 and.s
--- gas/testsuite/gas/macros/and.s	10 Jun 2003 13:24:33 -0000	1.2
+++ gas/testsuite/gas/macros/and.s	16 Apr 2009 01:54:34 -0000
@@ -1,4 +1,4 @@
-	TFLAG_C = 1
+	TFLAG_C == 1
 
 	.macro	check
 	.if	(0 & TFLAG_C)
Index: gas/testsuite/gas/macros/test1.s
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/macros/test1.s,v
retrieving revision 1.2
diff -u -p -r1.2 test1.s
--- gas/testsuite/gas/macros/test1.s	18 Mar 2008 16:56:00 -0000	1.2
+++ gas/testsuite/gas/macros/test1.s	16 Apr 2009 01:54:34 -0000
@@ -1,6 +1,6 @@
 	.macro	m arg1 arg2
 	.globl	\arg1
-	\arg1 = \arg2
+	\arg1 == \arg2
 	.endm
 
 	m s_not_a_reg_1,1
Index: ld/testsuite/ld-libs/lib-1.s
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-libs/lib-1.s,v
retrieving revision 1.1
diff -u -p -r1.1 lib-1.s
--- ld/testsuite/ld-libs/lib-1.s	29 Mar 2007 17:16:05 -0000	1.1
+++ ld/testsuite/ld-libs/lib-1.s	16 Apr 2009 01:30:40 -0000
@@ -1,2 +1,2 @@
 	.globl	foo
-	.set	foo,0x2000
+	foo == 0x2000
Index: ld/testsuite/ld-libs/lib-2.s
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-libs/lib-2.s,v
retrieving revision 1.1
diff -u -p -r1.1 lib-2.s
--- ld/testsuite/ld-libs/lib-2.s	29 Mar 2007 17:16:05 -0000	1.1
+++ ld/testsuite/ld-libs/lib-2.s	16 Apr 2009 01:30:40 -0000
@@ -1,2 +1,2 @@
 	.globl	bar
-	.set	bar,0x1000
+	bar == 0x1000
Index: ld/testsuite/ld-scripts/defined.s
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-scripts/defined.s,v
retrieving revision 1.2
diff -u -p -r1.2 defined.s
--- ld/testsuite/ld-scripts/defined.s	3 May 2008 06:19:19 -0000	1.2
+++ ld/testsuite/ld-scripts/defined.s	16 Apr 2009 01:30:42 -0000
@@ -1,2 +1,2 @@
 	.globl	defined
-	.set defined,	1
+	defined == 1

-- 
Alan Modra
Australia Development Lab, IBM


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