aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2023-07-28 12:34:30 +0200
committerJan Beulich <jbeulich@suse.com>2023-07-28 12:34:30 +0200
commit95b83567a4500c9cc14480dc171cf1d26a1555a6 (patch)
treee9a22565fba15fbc4b43686b3cc602773fc3edca /gas/testsuite
parent29c108c9610640439daa5244a573348b7c47d994 (diff)
downloadgdb-95b83567a4500c9cc14480dc171cf1d26a1555a6.zip
gdb-95b83567a4500c9cc14480dc171cf1d26a1555a6.tar.gz
gdb-95b83567a4500c9cc14480dc171cf1d26a1555a6.tar.bz2
gas: amend X_unsigned uses
PR gas/30688 X_unsigned being clear does not indicate a negative number; it merely indicates a signed one (whose sign may still be clear). Amend two uses by an actual value check.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/gas/elf/common3.s7
-rw-r--r--gas/testsuite/gas/elf/common3a.d9
-rw-r--r--gas/testsuite/gas/elf/common3b.d9
-rw-r--r--gas/testsuite/gas/elf/elf.exp12
4 files changed, 35 insertions, 2 deletions
diff --git a/gas/testsuite/gas/elf/common3.s b/gas/testsuite/gas/elf/common3.s
index f684da4..c2cf88e 100644
--- a/gas/testsuite/gas/elf/common3.s
+++ b/gas/testsuite/gas/elf/common3.s
@@ -1 +1,8 @@
.comm foobar,30,4
+ .comm buf1, 5-1, 8
+ .comm buf2, 4, 9-1
+ .ifndef lcomm_align
+ .lcomm lbuf, 9-1
+ .else
+ .lcomm lbuf, 9-1, 8
+ .endif
diff --git a/gas/testsuite/gas/elf/common3a.d b/gas/testsuite/gas/elf/common3a.d
index fa9d5ce..f177b23 100644
--- a/gas/testsuite/gas/elf/common3a.d
+++ b/gas/testsuite/gas/elf/common3a.d
@@ -1,7 +1,16 @@
#source: common3.s
#as: --elf-stt-common=yes
#readelf: -s -W
+# MIPS'es IRIX emulation puts lbuf (STB_LOCAL) after the globals in the
+# symbol table, and that mode is hard to check for (see irixemul in
+# binutils/testsuite/binutils-all/mips/mips.exp)
+#notarget: mips*-*-*
#...
+ +[0-9]+: +0+ +8 +(OBJECT|NOTYPE) +LOCAL +DEFAULT +[1-9] +lbuf
+#...
+[0-9]+: +0+4 +30 +COMMON +GLOBAL +DEFAULT +COM +foobar
+#...
+ +[0-9]+: +0+8 +4 +COMMON +GLOBAL +DEFAULT +COM +buf1
+ +[0-9]+: +0+8 +4 +COMMON +GLOBAL +DEFAULT +COM +buf2
#pass
diff --git a/gas/testsuite/gas/elf/common3b.d b/gas/testsuite/gas/elf/common3b.d
index 9481d13..c9000ab 100644
--- a/gas/testsuite/gas/elf/common3b.d
+++ b/gas/testsuite/gas/elf/common3b.d
@@ -1,7 +1,16 @@
#source: common3.s
#as: --elf-stt-common=no
#readelf: -s -W
+# MIPS'es IRIX emulation puts lbuf (STB_LOCAL) after the globals in the
+# symbol table, and that mode is hard to check for (see irixemul in
+# binutils/testsuite/binutils-all/mips/mips.exp)
+#notarget: mips*-*-*
#...
+ +[0-9]+: +0+ +8 +(OBJECT|NOTYPE) +LOCAL +DEFAULT +[1-9] +lbuf
+#...
+[0-9]+: +0+4 +30 +OBJECT +GLOBAL +DEFAULT +COM +foobar
+#...
+ +[0-9]+: +0+8 +4 +OBJECT +GLOBAL +DEFAULT +COM +buf1
+ +[0-9]+: +0+8 +4 +OBJECT +GLOBAL +DEFAULT +COM +buf2
#pass
diff --git a/gas/testsuite/gas/elf/elf.exp b/gas/testsuite/gas/elf/elf.exp
index 4890dd9..9e389ff 100644
--- a/gas/testsuite/gas/elf/elf.exp
+++ b/gas/testsuite/gas/elf/elf.exp
@@ -345,8 +345,16 @@ if { [is_elf_format] } then {
# hpux has a non-standard common directive.
if { ![istarget "*-*-hpux*"] } then {
- run_dump_test "common3a"
- run_dump_test "common3b"
+ switch -glob $target_triplet {
+ ia64-*-* {
+ run_dump_test "common3a" { { as "--defsym lcomm_align=1" } }
+ run_dump_test "common3b" { { as "--defsym lcomm_align=1" } }
+ }
+ default {
+ run_dump_test "common3a"
+ run_dump_test "common3b"
+ }
+ }
run_dump_test "common4a"
run_dump_test "common4b"
run_dump_test "common5a"