aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2005-03-08 08:23:32 +0000
committerJan Beulich <jbeulich@novell.com>2005-03-08 08:23:32 +0000
commitef6a2b41811b88306afc5ce073da33e047d888cd (patch)
tree60071479087818c0234af7bdc6687911d2c81fb6 /gas/testsuite
parent0b74f93c04ea699969fb60bcc150c9be841b23cf (diff)
downloadgdb-ef6a2b41811b88306afc5ce073da33e047d888cd.zip
gdb-ef6a2b41811b88306afc5ce073da33e047d888cd.tar.gz
gdb-ef6a2b41811b88306afc5ce073da33e047d888cd.tar.bz2
gas/
2005-03-08 Jan Beulich <jbeulich@novell.com> * config/tc-ia64.c (parse_section_name): Rename to... (cross_section): In addition to separating the name from the rest of the arguments, also carry out the operation. (dot_xdata): Use cross_section. (dot_float_cons): Likewise. (dot_xstringer): Likewise. (dot_xdata_ua): Likewise. (dot_float_cons_ua): Likewise. Pass float_cons, not stmt_float_cons. gas/testsuite/ 2005-03-08 Jan Beulich <jbeulich@novell.com> * gas/ia64/xdata.[sd], gas/ia64/xdata-ilp32.d: New. * gas/ia64/ia64.exp: Run new tests.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog5
-rw-r--r--gas/testsuite/gas/ia64/ia64.exp2
-rw-r--r--gas/testsuite/gas/ia64/xdata-ilp32.d29
-rw-r--r--gas/testsuite/gas/ia64/xdata.d47
-rw-r--r--gas/testsuite/gas/ia64/xdata.s45
5 files changed, 128 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 7858ab8..4f1d9f0 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2005-03-08 Jan Beulich <jbeulich@novell.com>
+ * gas/ia64/xdata.[sd], gas/ia64/xdata-ilp32.d: New.
+ * gas/ia64/ia64.exp: Run new tests.
+
+2005-03-08 Jan Beulich <jbeulich@novell.com>
+
* gas/ia64/pcrel.d: Account for big endian target.
* gas/ia64/reloc-bad.s: Enforce 64-bit ABI.
diff --git a/gas/testsuite/gas/ia64/ia64.exp b/gas/testsuite/gas/ia64/ia64.exp
index 83d98fb..9485fe4 100644
--- a/gas/testsuite/gas/ia64/ia64.exp
+++ b/gas/testsuite/gas/ia64/ia64.exp
@@ -64,10 +64,12 @@ if [istarget "ia64-*"] then {
run_dump_test "secname-ilp32"
run_dump_test "unwind-ilp32"
run_dump_test "alias-ilp32"
+ run_dump_test "xdata-ilp32"
} else {
run_dump_test "secname"
run_dump_test "unwind"
run_dump_test "alias"
+ run_dump_test "xdata"
run_dump_test "group-1"
}
diff --git a/gas/testsuite/gas/ia64/xdata-ilp32.d b/gas/testsuite/gas/ia64/xdata-ilp32.d
new file mode 100644
index 0000000..3958c71
--- /dev/null
+++ b/gas/testsuite/gas/ia64/xdata-ilp32.d
@@ -0,0 +1,29 @@
+#readelf: -S
+#name: ia64 xdata (ilp32)
+#as: -milp32
+#source: xdata.s
+
+There are 19 section headers, starting at offset 0x[[:xdigit:]]+:
+
+Section Headers:
+ \[Nr\] Name Type Addr Off Size ES Flg Lk Inf Al
+ \[ 0\] NULL 00000000 000000 000000 00 0 0 0
+ \[ 1\] .text PROGBITS 00000000 [[:xdigit:]]+ 000000 00 AX 0 0 16
+ \[ 2\] .data PROGBITS 00000000 [[:xdigit:]]+ 000000 00 WA 0 0 1
+ \[ 3\] .bss NOBITS 00000000 [[:xdigit:]]+ 000000 00 WA 0 0 1
+ \[ 4\] \.xdata1 PROGBITS 00000000 [[:xdigit:]]+ 000001 00 A 0 0 1
+ \[ 5\] \.xdata2 PROGBITS 00000000 [[:xdigit:]]+ 000004 00 A 0 0 2
+ \[ 6\] ,xdata3 PROGBITS 00000000 [[:xdigit:]]+ 000008 00 A 0 0 4
+ \[ 7\] \.xdata,4 PROGBITS 00000000 [[:xdigit:]]+ 000010 00 A 0 0 8
+ \[ 8\] "\.xdata5" PROGBITS 00000000 [[:xdigit:]]+ 000020 00 A 0 0 16
+ \[ 9\] \.rela"\.xdata5" RELA 00000000 [[:xdigit:]]+ 000018 0c 17 8 4
+ \[10\] \.xreal\\1 PROGBITS 00000000 [[:xdigit:]]+ 000008 00 A 0 0 4
+ \[11\] \.xreal\+2 PROGBITS 00000000 [[:xdigit:]]+ 000010 00 A 0 0 8
+ \[12\] \.xreal\(3\) PROGBITS 00000000 [[:xdigit:]]+ 000014 00 A 0 0 16
+ \[13\] \.xreal\[4\] PROGBITS 00000000 [[:xdigit:]]+ 000020 00 A 0 0 16
+ \[14\] \.xstr<1> PROGBITS 00000000 [[:xdigit:]]+ 000003 00 A 0 0 1
+ \[15\] \.xstr\{2\} PROGBITS 00000000 [[:xdigit:]]+ 000004 00 A 0 0 1
+ \[16\] .shstrtab STRTAB 00000000 [[:xdigit:]]+ [[:xdigit:]]+ 00 0 0 1
+ \[17\] .symtab SYMTAB 00000000 [[:xdigit:]]+ [[:xdigit:]]+ 10 18 15 4
+ \[18\] .strtab STRTAB 00000000 [[:xdigit:]]+ [[:xdigit:]]+ 00 0 0 1
+#pass
diff --git a/gas/testsuite/gas/ia64/xdata.d b/gas/testsuite/gas/ia64/xdata.d
new file mode 100644
index 0000000..e56d24e
--- /dev/null
+++ b/gas/testsuite/gas/ia64/xdata.d
@@ -0,0 +1,47 @@
+#readelf: -S
+#name: ia64 xdata
+
+There are 19 section headers, starting at offset 0x[[:xdigit:]]+:
+
+Section Headers:
+ \[Nr\] Name Type Address Offset
+ Size EntSize Flags Link Info Align
+ \[ 0\] NULL 0000000000000000 [[:xdigit:]]+
+ 0000000000000000 0000000000000000 0 0 0
+ \[ 1\] \.text PROGBITS 0000000000000000 [[:xdigit:]]+
+ 0000000000000000 0000000000000000 AX 0 0 16
+ \[ 2\] \.data PROGBITS 0000000000000000 [[:xdigit:]]+
+ 0000000000000000 0000000000000000 WA 0 0 1
+ \[ 3\] \.bss NOBITS 0000000000000000 [[:xdigit:]]+
+ 0000000000000000 0000000000000000 WA 0 0 1
+ \[ 4\] \.xdata1 PROGBITS 0000000000000000 [[:xdigit:]]+
+ 0000000000000001 0000000000000000 A 0 0 1
+ \[ 5\] \.xdata2 PROGBITS 0000000000000000 [[:xdigit:]]+
+ 0000000000000004 0000000000000000 A 0 0 2
+ \[ 6\] ,xdata3 PROGBITS 0000000000000000 [[:xdigit:]]+
+ 0000000000000008 0000000000000000 A 0 0 4
+ \[ 7\] \.xdata,4 PROGBITS 0000000000000000 [[:xdigit:]]+
+ 0000000000000010 0000000000000000 A 0 0 8
+ \[ 8\] "\.xdata5" PROGBITS 0000000000000000 [[:xdigit:]]+
+ 0000000000000020 0000000000000000 A 0 0 16
+ \[ 9\] \.rela"\.xdata5" RELA 0000000000000000 [[:xdigit:]]+
+ 0000000000000030 0000000000000018 17 8 8
+ \[10\] \.xreal\\1 PROGBITS 0000000000000000 [[:xdigit:]]+
+ 0000000000000008 0000000000000000 A 0 0 4
+ \[11\] \.xreal\+2 PROGBITS 0000000000000000 [[:xdigit:]]+
+ 0000000000000010 0000000000000000 A 0 0 8
+ \[12\] \.xreal\(3\) PROGBITS 0000000000000000 [[:xdigit:]]+
+ 0000000000000014 0000000000000000 A 0 0 16
+ \[13\] \.xreal\[4\] PROGBITS 0000000000000000 [[:xdigit:]]+
+ 0000000000000020 0000000000000000 A 0 0 16
+ \[14\] \.xstr<1> PROGBITS 0000000000000000 [[:xdigit:]]+
+ 0000000000000003 0000000000000000 A 0 0 1
+ \[15\] \.xstr\{2\} PROGBITS 0000000000000000 [[:xdigit:]]+
+ 0000000000000004 0000000000000000 A 0 0 1
+ \[16\] \.shstrtab STRTAB 0000000000000000 [[:xdigit:]]+
+ [[:xdigit:]]+ 0000000000000000 0 0 1
+ \[17\] \.symtab SYMTAB 0000000000000000 [[:xdigit:]]+
+ [[:xdigit:]]+ 0000000000000018 18 15 8
+ \[18\] \.strtab STRTAB 0000000000000000 [[:xdigit:]]+
+ [[:xdigit:]]+ 0000000000000000 0 0 1
+#pass
diff --git a/gas/testsuite/gas/ia64/xdata.s b/gas/testsuite/gas/ia64/xdata.s
new file mode 100644
index 0000000..6929405
--- /dev/null
+++ b/gas/testsuite/gas/ia64/xdata.s
@@ -0,0 +1,45 @@
+// Note that most of the section names used here aren't legal as operands
+// to either .section or .xdata/.xreal/.xstring (quoted strings aren't in
+// general), but since generic code accepts them for .section we also test
+// this here for our target specific directives. This could be viewed as a
+// shortcut of a pair of .section/.secalias for each of them.
+
+.section .xdata1, "a", @progbits
+.section ".xdata2", "a", @progbits
+.section ",xdata3", "a", @progbits
+.section ".xdata,4", "a", @progbits
+.section "\".xdata5\"", "a", @progbits
+
+.section ".xreal\\1", "a", @progbits
+.section ".xreal+2", "a", @progbits
+.section ".xreal(3)", "a", @progbits
+.section ".xreal[4]", "a", @progbits
+
+.section ".xstr<1>", "a", @progbits
+.section ".xstr{2}", "a", @progbits
+
+.text
+
+.xdata1 .xdata1, 1
+.xdata2 ".xdata2", 2
+.xdata4 ",xdata3", 3
+.xdata8 ".xdata,4", 4
+.xdata16 "\".xdata5\"", @iplt(_start)
+
+.xdata2.ua ".xdata2", 2
+.xdata4.ua ",xdata3", 3
+.xdata8.ua ".xdata,4", 4
+.xdata16.ua "\".xdata5\"", @iplt(_start)
+
+.xreal4 ".xreal\\1", 1
+.xreal8 ".xreal+2", 2
+.xreal10 ".xreal(3)", 3
+.xreal16 ".xreal[4]", 4
+
+.xreal4.ua ".xreal\\1", 1
+.xreal8.ua ".xreal+2", 2
+.xreal10.ua ".xreal(3)", 3
+.xreal16.ua ".xreal[4]", 4
+
+.xstring ".xstr<1>", "abc"
+.xstringz ".xstr{2}", "xyz"