aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2003-04-01 15:50:31 +0000
committerNick Clifton <nickc@redhat.com>2003-04-01 15:50:31 +0000
commite0001a05d2e4967ee86f4468cdc4fafea66b92d1 (patch)
tree4676b72e452f4dfc81e8d6646fb43f63a108da1b /gas/testsuite
parentce0c72625ad0f6497718b4293572b2b6be711714 (diff)
downloadgdb-e0001a05d2e4967ee86f4468cdc4fafea66b92d1.zip
gdb-e0001a05d2e4967ee86f4468cdc4fafea66b92d1.tar.gz
gdb-e0001a05d2e4967ee86f4468cdc4fafea66b92d1.tar.bz2
Add Xtensa port
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog10
-rw-r--r--gas/testsuite/gas/xtensa/all.exp98
-rw-r--r--gas/testsuite/gas/xtensa/entry_align.s4
-rw-r--r--gas/testsuite/gas/xtensa/entry_misalign.s4
-rw-r--r--gas/testsuite/gas/xtensa/entry_misalign2.s6
-rw-r--r--gas/testsuite/gas/xtensa/j_too_far.s8
-rw-r--r--gas/testsuite/gas/xtensa/loop_align.s5
-rw-r--r--gas/testsuite/gas/xtensa/loop_misalign.s5
8 files changed, 140 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 6f1f320..5582d16 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,13 @@
+2003-04-01 Bob Wilson <bob.wilson@acm.org>
+
+ * gas/xtensa/all.exp: New file.
+ * gas/xtensa/entry_align.s: Likewise.
+ * gas/xtensa/entry_misalign2.s: Likewise.
+ * gas/xtensa/entry_misalign.s: Likewise.
+ * gas/xtensa/j_too_far.s: Likewise.
+ * gas/xtensa/loop_align.s: Likewise.
+ * gas/xtensa/loop_misalign.s: Likewise.
+
2003-03-25 Stan Cox <scox@redhat.com>
Nick Clifton <nickc@redhat.com>
diff --git a/gas/testsuite/gas/xtensa/all.exp b/gas/testsuite/gas/xtensa/all.exp
new file mode 100644
index 0000000..e01c4a3
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/all.exp
@@ -0,0 +1,98 @@
+#
+# Some generic xtensa tests
+#
+if [istarget xtensa*-*-*] then {
+ gas_test_error "j_too_far.s" "" "Check for jump out of range error"
+
+ set testname "j_too_far.s: error line number reporting"
+ gas_start "j_too_far.s" ""
+ set x1 0
+ while 1 {
+ expect {
+ -re ":4: Error:.*too large" { set x1 1 }
+ timeout { perror "timeout\n"; break }
+ eof { break }
+ }
+ }
+ gas_finish
+ if [all_ones $x1] then { pass $testname } else { fail $testname }
+
+
+ gas_test "entry_misalign.s" "" "" "Xtensa Entry misalignment"
+ set testname "entry_misalign.s: Force entry misalignment"
+ objdump_start_no_subdir "a.out" "-d -j .text"
+ set x1 0
+ while 1 {
+ expect {
+ -re "^.*2:.*entry" { set x1 1 }
+ timeout { perror "timeout\n"; break }
+ eof { break }
+ }
+ }
+ objdump_finish
+ if [all_ones $x1] then { pass $testname } else { fail $testname }
+
+
+ gas_test "entry_misalign2.s" "" "" "Xtensa Entry misalignment(2)"
+ set testname "entry_misalign2.s: Force entry misalignment(2)"
+ objdump_start_no_subdir "a.out" "-d -j .text"
+ set x1 0
+ while 1 {
+ expect {
+ -re "^.*2:.*entry" { set x1 1 }
+ timeout { perror "timeout\n"; break }
+ eof { break }
+ }
+ }
+ objdump_finish
+ if [all_ones $x1] then { pass $testname } else { fail $testname }
+
+ gas_test "entry_align.s" "" "" "Xtensa autoalign entry"
+ set testname "entry_align.s: autoalign entry"
+ objdump_start_no_subdir "a.out" "-d -j .text"
+ set x1 0
+ while 1 {
+ expect {
+ -re "^.*4:.*entry" { set x1 1 }
+ timeout { perror "timeout\n"; break }
+ eof { break }
+ }
+ }
+ objdump_finish
+ if [all_ones $x1] then { pass $testname } else { fail $testname }
+
+ gas_test "loop_misalign.s" "" "" "Xtensa Loop misalignment"
+ set testname "loop_misalign.s: Force loop misalignment"
+ objdump_start_no_subdir "a.out" "-d -j .text"
+ set x1 0
+ while 1 {
+ expect {
+ -re "^.*0:.*loop" { set x1 1 }
+ timeout { perror "timeout\n"; break }
+ eof { break }
+ }
+ }
+ objdump_finish
+ if [all_ones $x1] then { pass $testname } else { fail $testname }
+
+
+ gas_test "loop_align.s" "" "" "Xtensa autoalign loop"
+ set testname "loop_align.s: autoalign loop"
+ objdump_start_no_subdir "a.out" "-d -j .text"
+ set x1 0
+ while 1 {
+ expect {
+ -re "^.*2:.*loop" { set x1 1 }
+ timeout { perror "timeout\n"; break }
+ eof { break }
+ }
+ }
+ objdump_finish
+ if [all_ones $x1] then { pass $testname } else { fail $testname }
+
+
+}
+
+if [info exists errorInfo] then {
+ unset errorInfo
+ }
diff --git a/gas/testsuite/gas/xtensa/entry_align.s b/gas/testsuite/gas/xtensa/entry_align.s
new file mode 100644
index 0000000..df8d1de
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/entry_align.s
@@ -0,0 +1,4 @@
+ _nop.n
+l4:
+ entry a5,16
+ _mov.n a4,a5
diff --git a/gas/testsuite/gas/xtensa/entry_misalign.s b/gas/testsuite/gas/xtensa/entry_misalign.s
new file mode 100644
index 0000000..c3e243a
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/entry_misalign.s
@@ -0,0 +1,4 @@
+ _nop.n
+l4:
+ _entry a5,16
+ _mov.n a4,a5
diff --git a/gas/testsuite/gas/xtensa/entry_misalign2.s b/gas/testsuite/gas/xtensa/entry_misalign2.s
new file mode 100644
index 0000000..5d48b6c
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/entry_misalign2.s
@@ -0,0 +1,6 @@
+ .begin no-generics
+ nop.n
+l4:
+ entry a5,16
+ mov.n a4,a5
+ .end no-generics
diff --git a/gas/testsuite/gas/xtensa/j_too_far.s b/gas/testsuite/gas/xtensa/j_too_far.s
new file mode 100644
index 0000000..3348d85
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/j_too_far.s
@@ -0,0 +1,8 @@
+ .text
+ .align 4
+ entry a5,16
+ j too_far
+ .fill 150000
+too_far:
+ nop
+ nop
diff --git a/gas/testsuite/gas/xtensa/loop_align.s b/gas/testsuite/gas/xtensa/loop_align.s
new file mode 100644
index 0000000..25ebc12
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/loop_align.s
@@ -0,0 +1,5 @@
+l4:
+ loop a5,l5
+ _mov.n a4,a5
+l5:
+ _nop.n
diff --git a/gas/testsuite/gas/xtensa/loop_misalign.s b/gas/testsuite/gas/xtensa/loop_misalign.s
new file mode 100644
index 0000000..bb4c6e3
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/loop_misalign.s
@@ -0,0 +1,5 @@
+l4:
+ _loop a5,l5
+ _mov.n a4,a5
+l5:
+ _nop.n