aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2005-11-17 07:29:28 +0000
committerJan Beulich <jbeulich@novell.com>2005-11-17 07:29:28 +0000
commit92757bc91688685a680cc6c6cd03324b894c4501 (patch)
treeaf7f90015e9fa7a13331367da0e55c3fbe02b9b7 /gas/testsuite
parent2be701a30fd949e7a486fcf6843fdb34f6bc00dc (diff)
downloadgdb-92757bc91688685a680cc6c6cd03324b894c4501.zip
gdb-92757bc91688685a680cc6c6cd03324b894c4501.tar.gz
gdb-92757bc91688685a680cc6c6cd03324b894c4501.tar.bz2
gas/
2005-11-17 Jan Beulich <jbeulich@novell.com> * symbols.h (S_CLEAR_VOLATILE): Declare. * symbols.c (colon): Also accept redefinable symbols for redefinition. Clone them before modifying. (S_CLEAR_VOLATILE): Define. * cond.c (s_ifdef): Also test for equated symbols. * read.c (s_comm_internal): Also exclude non-redefinable equated symbols. Clone redefinable ones before modifying. (s_weakref): Clone redefinable symbols before modifying. * doc/internals.texi: Document sy_volatile, sy_forward_ref, S_IS_VOLATILE, S_SET_VOLATILE, S_CLEAR_VOLATILE, S_IS_FORWARD_REF, and S_SET_FORWARD_REF. gas/testsuite/ 2005-11-17 Jan Beulich <jbeulich@novell.com> * gas/all/cond.s: Also check ifdef works on equates and commons. * gas/all/cond.l: Adjust. * gas/all/redef2.s: Also test redefining equate to label. * gas/all/redef2.d: Adjust. * gas/all/redef3.[sd]: New. * gas/all/redef4.s: New. * gas/all/redef5.s: New. * gas/elf/redef.s: New, copied from original gas/all/redef2.s. * gas/elf/redef.d: Remove #source. * gas/all/gas.exp: Remove exclusion of iq2000-*-* from and adjust xfails for redefinition tests. Run new tests. Exclude alpha*-*-*, mips*-*-*, *c54x*-*-* from weakref tests.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog16
-rw-r--r--gas/testsuite/gas/all/cond.l6
-rw-r--r--gas/testsuite/gas/all/cond.s8
-rw-r--r--gas/testsuite/gas/all/gas.exp17
-rw-r--r--gas/testsuite/gas/all/redef2.d6
-rw-r--r--gas/testsuite/gas/all/redef2.s2
-rw-r--r--gas/testsuite/gas/all/redef3.d15
-rw-r--r--gas/testsuite/gas/all/redef3.s12
-rw-r--r--gas/testsuite/gas/all/redef4.s3
-rw-r--r--gas/testsuite/gas/all/redef5.s2
-rw-r--r--gas/testsuite/gas/elf/redef.d1
-rw-r--r--gas/testsuite/gas/elf/redef.s10
12 files changed, 92 insertions, 6 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 059cc50..dafe704 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,19 @@
+2005-11-17 Jan Beulich <jbeulich@novell.com>
+
+ * gas/all/cond.s: Also check ifdef works on equates and
+ commons.
+ * gas/all/cond.l: Adjust.
+ * gas/all/redef2.s: Also test redefining equate to label.
+ * gas/all/redef2.d: Adjust.
+ * gas/all/redef3.[sd]: New.
+ * gas/all/redef4.s: New.
+ * gas/all/redef5.s: New.
+ * gas/elf/redef.s: New, copied from original gas/all/redef2.s.
+ * gas/elf/redef.d: Remove #source.
+ * gas/all/gas.exp: Remove exclusion of iq2000-*-* from and
+ adjust xfails for redefinition tests. Run new tests. Exclude
+ alpha*-*-*, mips*-*-*, *c54x*-*-* from weakref tests.
+
2005-11-16 Richard Henderson <rth@redhat.com>
* gas/all/weakref1.s: Use "=" instead of ".set" for equivalence.
diff --git a/gas/testsuite/gas/all/cond.l b/gas/testsuite/gas/all/cond.l
index a103d8d..6939ee8 100644
--- a/gas/testsuite/gas/all/cond.l
+++ b/gas/testsuite/gas/all/cond.l
@@ -24,7 +24,13 @@
29[ ]+.else
31[ ]+.endif
[ ]*[1-9][0-9]*[ ]+
+[ ]*[1-9][0-9]*[ ]+\.comm[ ]+c,[ ]*1[ ]*
+[ ]*[1-9][0-9]*[ ]+\.ifndef[ ]+c[ ]*
+[ ]*[1-9][0-9]*[ ]+\.endif[ ]*
+[ ]*[1-9][0-9]*[ ]+
[ ]*[1-9][0-9]*[ ]+\.equiv[ ]+x,[ ]*y[ ]*
+[ ]*[1-9][0-9]*[ ]+\.ifndef[ ]+x[ ]*
+[ ]*[1-9][0-9]*[ ]+\.endif[ ]*
[ ]*[1-9][0-9]*[ ]+\.equiv[ ]+y,[ ]*0[ ]*
[ ]*[1-9][0-9]*[ ]+\.if[ ]+x[ ]*
[ ]*[1-9][0-9]*[ ]+\.elseif[ ]+x[ ]*
diff --git a/gas/testsuite/gas/all/cond.s b/gas/testsuite/gas/all/cond.s
index 2737d1f..94136ac 100644
--- a/gas/testsuite/gas/all/cond.s
+++ b/gas/testsuite/gas/all/cond.s
@@ -30,7 +30,15 @@
.long 9
.endif
+ .comm c, 1
+ .ifndef c
+ .err
+ .endif
+
.equiv x, y
+ .ifndef x
+ .err
+ .endif
.equiv y, 0
.if x
.err
diff --git a/gas/testsuite/gas/all/gas.exp b/gas/testsuite/gas/all/gas.exp
index d92ede8..c97a730 100644
--- a/gas/testsuite/gas/all/gas.exp
+++ b/gas/testsuite/gas/all/gas.exp
@@ -74,16 +74,24 @@ case $target_triplet in {
# .set works differently on some targets.
case $target_triplet in {
{ alpha*-*-* } { }
- { iq2000*-*-* } { }
{ mips*-*-* } { }
{ *c54x*-*-* } { }
{ z80-*-* } { }
default {
setup_xfail "*c30*-*-*" "*c4x*-*-*" "pdp11-*-*"
run_dump_test redef
- setup_xfail "*c30*-*-*" "*c4x*-*-*" "*arm*-*-coff" "arm*-*-pe*" "crx*-*-*"
- setup_xfail "h8300*-*-*" "m68hc*-*-*" "maxq-*-*" "pdp11-*-*" "vax*-*-*" "z8k-*-*"
+ setup_xfail "*c30*-*-*" "*c4x*-*-*" "*arm*-*-*aout*" "*arm*-*-*coff" \
+ "*arm*-*-pe" "crx*-*-*" "h8300*-*-*" "m68hc*-*-*" "maxq-*-*" \
+ "pdp11-*-*" "vax*-*-*" "z8k-*-*"
run_dump_test redef2
+ setup_xfail "*-*-aix*" "*-*-coff" "*-*-cygwin" "*-*-mingw*" "*-*-pe*" \
+ "bfin-*-*" "*c4x*-*-*" "crx*-*-*" "h8300*-*-*" "m68hc*-*-*" \
+ "maxq-*-*" "or32-*-*" "pdp11-*-*" "vax*-*-*" "z8k-*-*"
+ run_dump_test redef3
+ setup_xfail "*c4x*-*-*"
+ gas_test_error "redef4.s" "" ".set for symbol already used as label"
+ setup_xfail "*c4x*-*-*"
+ gas_test_error "redef5.s" "" ".set for symbol already defined through .comm"
}
}
@@ -256,6 +264,9 @@ if { ![istarget "i960-*-*"] } {
# .set works differently on some targets.
case $target_triplet in {
+ { alpha*-*-* } { }
+ { mips*-*-* } { }
+ { *c54x*-*-* } { }
{ z80-*-* } { }
default {
run_dump_test weakref1
diff --git a/gas/testsuite/gas/all/redef2.d b/gas/testsuite/gas/all/redef2.d
index 452d610..d53efa5 100644
--- a/gas/testsuite/gas/all/redef2.d
+++ b/gas/testsuite/gas/all/redef2.d
@@ -5,9 +5,11 @@
RELOCATION RECORDS FOR .*
.*
-0+0.*(here|\.data)
-0+8.*xtrn
+0+00.*(here|\.data)
+0+08.*xtrn
+0+10.*(sym|\.data(\+0x0+10)?)
#...
Contents of section \.data:
0000 00000000 11111111 00000000 22222222[ ]+................[ ]*
+ 0010 [01]00000[01]0 .*
#pass
diff --git a/gas/testsuite/gas/all/redef2.s b/gas/testsuite/gas/all/redef2.s
index 3e975e1..89a29ac 100644
--- a/gas/testsuite/gas/all/redef2.s
+++ b/gas/testsuite/gas/all/redef2.s
@@ -8,3 +8,5 @@ here:
.long sym
.set sym, 0x22222222
.long sym
+sym:
+ .long sym
diff --git a/gas/testsuite/gas/all/redef3.d b/gas/testsuite/gas/all/redef3.d
new file mode 100644
index 0000000..85843bb
--- /dev/null
+++ b/gas/testsuite/gas/all/redef3.d
@@ -0,0 +1,15 @@
+#objdump: -rsj .data
+#name: .equ redefinitions (3)
+
+.*: .*
+
+RELOCATION RECORDS FOR .*
+.*
+0+00.*(here|\.data)
+0+08.*xtrn
+0+10.*sym
+#...
+Contents of section \.data:
+ 0000 00000000 11111111 00000000 22222222[ ]+................[ ]*
+ 0010 00000000 .*
+#pass
diff --git a/gas/testsuite/gas/all/redef3.s b/gas/testsuite/gas/all/redef3.s
new file mode 100644
index 0000000..2296d74
--- /dev/null
+++ b/gas/testsuite/gas/all/redef3.s
@@ -0,0 +1,12 @@
+ .data
+here:
+ .set sym, here
+ .long sym
+ .set sym, 0x11111111
+ .long sym
+ .set sym, xtrn
+ .long sym
+ .set sym, 0x22222222
+ .long sym
+ .comm sym, 1
+ .long sym
diff --git a/gas/testsuite/gas/all/redef4.s b/gas/testsuite/gas/all/redef4.s
new file mode 100644
index 0000000..8bd3943
--- /dev/null
+++ b/gas/testsuite/gas/all/redef4.s
@@ -0,0 +1,3 @@
+ .data
+sym:
+ .set sym, 0
diff --git a/gas/testsuite/gas/all/redef5.s b/gas/testsuite/gas/all/redef5.s
new file mode 100644
index 0000000..8a3a67a
--- /dev/null
+++ b/gas/testsuite/gas/all/redef5.s
@@ -0,0 +1,2 @@
+ .comm sym, 1
+ .set sym, 0
diff --git a/gas/testsuite/gas/elf/redef.d b/gas/testsuite/gas/elf/redef.d
index d62e302..6e5daea 100644
--- a/gas/testsuite/gas/elf/redef.d
+++ b/gas/testsuite/gas/elf/redef.d
@@ -1,6 +1,5 @@
#objdump: -t
#name: .equ redefinitions (ELF)
-#source: ../all/redef2.s
.*: .*
diff --git a/gas/testsuite/gas/elf/redef.s b/gas/testsuite/gas/elf/redef.s
new file mode 100644
index 0000000..3e975e1
--- /dev/null
+++ b/gas/testsuite/gas/elf/redef.s
@@ -0,0 +1,10 @@
+ .data
+here:
+ .set sym, here
+ .long sym
+ .set sym, 0x11111111
+ .long sym
+ .set sym, xtrn
+ .long sym
+ .set sym, 0x22222222
+ .long sym