public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/2] xtensa: gas: clean up test suite and add tests
@ 2019-04-10 20:38 Max Filippov
  2019-04-10 20:38 ` [PATCH 2/2] xtensa: gas: add relaxations tests Max Filippov
  2019-04-10 20:38 ` [PATCH 1/2] xtensa: gas: convert tests to run_dump_tests Max Filippov
  0 siblings, 2 replies; 6+ messages in thread
From: Max Filippov @ 2019-04-10 20:38 UTC (permalink / raw)
  To: binutils; +Cc: Sterling Augustine, Eric Tsai, linux-xtensa, Max Filippov

Hello,

this series cleans up xtensa gas testsuite, converting old tests to the
run_dump_test method and getting rid of the explicit list of tests.
It then adds a few tests for the recent issues with literals and
relaxations.

Max Filippov (2):
  xtensa: gas: convert tests to run_dump_tests
  xtensa: gas: add relaxations tests

 gas/testsuite/gas/xtensa/all.exp                   | 99 +---------------------
 gas/testsuite/gas/xtensa/entry_align.d             |  3 +
 gas/testsuite/gas/xtensa/entry_align.l             |  2 +
 gas/testsuite/gas/xtensa/entry_misalign.d          |  7 ++
 gas/testsuite/gas/xtensa/entry_misalign2.d         |  7 ++
 gas/testsuite/gas/xtensa/j_too_far.d               |  3 +
 gas/testsuite/gas/xtensa/j_too_far.l               |  2 +
 gas/testsuite/gas/xtensa/loop-relax-2.d            |  7 ++
 gas/testsuite/gas/xtensa/loop-relax.d              | 14 +++
 gas/testsuite/gas/xtensa/loop-relax.s              | 58 +++++++++++++
 gas/testsuite/gas/xtensa/loop_align.d              |  7 ++
 gas/testsuite/gas/xtensa/loop_misalign.d           |  7 ++
 .../gas/xtensa/text-section-literals-1a.d          | 18 ++++
 gas/testsuite/gas/xtensa/text-section-literals-2.d |  9 ++
 gas/testsuite/gas/xtensa/text-section-literals-2.s |  3 +
 .../gas/xtensa/text-section-literals-2a.d          | 10 +++
 gas/testsuite/gas/xtensa/text-section-literals-3.d | 11 +++
 gas/testsuite/gas/xtensa/text-section-literals-3.s |  3 +
 gas/testsuite/gas/xtensa/text-section-literals-4.d |  9 ++
 gas/testsuite/gas/xtensa/text-section-literals-4.s |  3 +
 .../gas/xtensa/text-section-literals-4a.d          | 10 +++
 gas/testsuite/gas/xtensa/trampoline-2.d            |  4 +
 gas/testsuite/gas/xtensa/trampoline-2.l            |  1 -
 gas/testsuite/gas/xtensa/xtensa-err.exp            |  8 +-
 24 files changed, 200 insertions(+), 105 deletions(-)
 create mode 100644 gas/testsuite/gas/xtensa/entry_align.d
 create mode 100644 gas/testsuite/gas/xtensa/entry_align.l
 create mode 100644 gas/testsuite/gas/xtensa/entry_misalign.d
 create mode 100644 gas/testsuite/gas/xtensa/entry_misalign2.d
 create mode 100644 gas/testsuite/gas/xtensa/j_too_far.d
 create mode 100644 gas/testsuite/gas/xtensa/j_too_far.l
 create mode 100644 gas/testsuite/gas/xtensa/loop-relax-2.d
 create mode 100644 gas/testsuite/gas/xtensa/loop-relax.d
 create mode 100644 gas/testsuite/gas/xtensa/loop-relax.s
 create mode 100644 gas/testsuite/gas/xtensa/loop_align.d
 create mode 100644 gas/testsuite/gas/xtensa/loop_misalign.d
 create mode 100644 gas/testsuite/gas/xtensa/text-section-literals-1a.d
 create mode 100644 gas/testsuite/gas/xtensa/text-section-literals-2.d
 create mode 100644 gas/testsuite/gas/xtensa/text-section-literals-2.s
 create mode 100644 gas/testsuite/gas/xtensa/text-section-literals-2a.d
 create mode 100644 gas/testsuite/gas/xtensa/text-section-literals-3.d
 create mode 100644 gas/testsuite/gas/xtensa/text-section-literals-3.s
 create mode 100644 gas/testsuite/gas/xtensa/text-section-literals-4.d
 create mode 100644 gas/testsuite/gas/xtensa/text-section-literals-4.s
 create mode 100644 gas/testsuite/gas/xtensa/text-section-literals-4a.d
 create mode 100644 gas/testsuite/gas/xtensa/trampoline-2.d
 delete mode 100644 gas/testsuite/gas/xtensa/trampoline-2.l

-- 
2.11.0

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] xtensa: gas: convert tests to run_dump_tests
  2019-04-10 20:38 [PATCH 0/2] xtensa: gas: clean up test suite and add tests Max Filippov
  2019-04-10 20:38 ` [PATCH 2/2] xtensa: gas: add relaxations tests Max Filippov
@ 2019-04-10 20:38 ` Max Filippov
       [not found]   ` <CAGSvup8_aXx85rv0DXA0mV90+VHN3OZcG5kcopS9B64Ygh69GA@mail.gmail.com>
  1 sibling, 1 reply; 6+ messages in thread
From: Max Filippov @ 2019-04-10 20:38 UTC (permalink / raw)
  To: binutils; +Cc: Sterling Augustine, Eric Tsai, linux-xtensa, Max Filippov

gas/
2019-04-10  Max Filippov  <jcmvbkbc@gmail.com>

	* testsuite/gas/xtensa/all.exp: Remove all expect-based
	tests and all explicit run_dump_test / run_list_test
	invocations. Add run_dump_tests for all .d files in the
	test subdirectory.
	* testsuite/gas/xtensa/entry_align.d: New test definition.
	* testsuite/gas/xtensa/entry_align.l: New test output.
	* testsuite/gas/xtensa/entry_misalign.d: New test definition.
	* testsuite/gas/xtensa/entry_misalign2.d: New test definition.
	* testsuite/gas/xtensa/j_too_far.d: New test definition.
	* testsuite/gas/xtensa/j_too_far.l: New test output.
	* testsuite/gas/xtensa/loop_align.d: New test definition.
	* testsuite/gas/xtensa/loop_misalign.d: New test definition.
	* testsuite/gas/xtensa/trampoline-2.d: New test definition.
	* testsuite/gas/xtensa/trampoline-2.l: Remove empty output.
	* testsuite/gas/xtensa/xtensa-err.exp: Use positive logic.
---
 gas/testsuite/gas/xtensa/all.exp           | 99 +-----------------------------
 gas/testsuite/gas/xtensa/entry_align.d     |  3 +
 gas/testsuite/gas/xtensa/entry_align.l     |  2 +
 gas/testsuite/gas/xtensa/entry_misalign.d  |  7 +++
 gas/testsuite/gas/xtensa/entry_misalign2.d |  7 +++
 gas/testsuite/gas/xtensa/j_too_far.d       |  3 +
 gas/testsuite/gas/xtensa/j_too_far.l       |  2 +
 gas/testsuite/gas/xtensa/loop_align.d      |  7 +++
 gas/testsuite/gas/xtensa/loop_misalign.d   |  7 +++
 gas/testsuite/gas/xtensa/trampoline-2.d    |  4 ++
 gas/testsuite/gas/xtensa/trampoline-2.l    |  1 -
 gas/testsuite/gas/xtensa/xtensa-err.exp    |  8 +--
 12 files changed, 45 insertions(+), 105 deletions(-)
 create mode 100644 gas/testsuite/gas/xtensa/entry_align.d
 create mode 100644 gas/testsuite/gas/xtensa/entry_align.l
 create mode 100644 gas/testsuite/gas/xtensa/entry_misalign.d
 create mode 100644 gas/testsuite/gas/xtensa/entry_misalign2.d
 create mode 100644 gas/testsuite/gas/xtensa/j_too_far.d
 create mode 100644 gas/testsuite/gas/xtensa/j_too_far.l
 create mode 100644 gas/testsuite/gas/xtensa/loop_align.d
 create mode 100644 gas/testsuite/gas/xtensa/loop_misalign.d
 create mode 100644 gas/testsuite/gas/xtensa/trampoline-2.d
 delete mode 100644 gas/testsuite/gas/xtensa/trampoline-2.l

diff --git a/gas/testsuite/gas/xtensa/all.exp b/gas/testsuite/gas/xtensa/all.exp
index 30784becbe0a..db1a623c0ad2 100644
--- a/gas/testsuite/gas/xtensa/all.exp
+++ b/gas/testsuite/gas/xtensa/all.exp
@@ -17,101 +17,6 @@
 #
 # 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:.*out of range"      { 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_error "entry_align.s" "" "Xtensa entry alignment error"
-
-    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 }
-
-    run_dump_test "short_branch_offset"
-    run_dump_test "pcrel"
-    run_dump_test "weak-call"
-    run_dump_test "jlong"
-    run_dump_test "trampoline"
-    run_list_test "trampoline-2"
-    run_dump_test "first_frag_align"
-    run_dump_test "auto-litpools"
-    run_dump_test "auto-litpools-2"
-    run_dump_test "auto-litpools-3"
-    run_dump_test "auto-litpools-4"
-    run_dump_test "auto-litpools-first1"
-    run_dump_test "auto-litpools-first2"
-    run_dump_test "loc"
-    run_dump_test "init-fini-literals"
-    run_dump_test "text-section-literals-1"
-}
-
-if [info exists errorInfo] then {
-    unset errorInfo
+if [istarget xtensa*-*-*] {
+	run_dump_tests [lsort [glob -nocomplain $srcdir/$subdir/*.d]]
 }
diff --git a/gas/testsuite/gas/xtensa/entry_align.d b/gas/testsuite/gas/xtensa/entry_align.d
new file mode 100644
index 000000000000..684e654100dd
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/entry_align.d
@@ -0,0 +1,3 @@
+#as:
+#name: unaligned entry instruction
+#error_output: entry_align.l
diff --git a/gas/testsuite/gas/xtensa/entry_align.l b/gas/testsuite/gas/xtensa/entry_align.l
new file mode 100644
index 000000000000..9bca67c23dad
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/entry_align.l
@@ -0,0 +1,2 @@
+[^:]*: Assembler messages:
+[^:]*:3: Error: unaligned entry instruction
diff --git a/gas/testsuite/gas/xtensa/entry_misalign.d b/gas/testsuite/gas/xtensa/entry_misalign.d
new file mode 100644
index 000000000000..aa79bd4e56b6
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/entry_misalign.d
@@ -0,0 +1,7 @@
+#as:
+#objdump: -d -j .text
+#name: force entry instruction misalignment
+
+#...
+^.*2:.*entry.*
+#...
diff --git a/gas/testsuite/gas/xtensa/entry_misalign2.d b/gas/testsuite/gas/xtensa/entry_misalign2.d
new file mode 100644
index 000000000000..74664ef54ecf
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/entry_misalign2.d
@@ -0,0 +1,7 @@
+#as:
+#objdump: -d -j .text
+#name: entry instruction misalignment inside no-transform block
+
+#...
+^.*2:.*entry.*
+#...
diff --git a/gas/testsuite/gas/xtensa/j_too_far.d b/gas/testsuite/gas/xtensa/j_too_far.d
new file mode 100644
index 000000000000..85007aff067e
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/j_too_far.d
@@ -0,0 +1,3 @@
+#as:
+#name: jump to a target that is too far
+#error_output: j_too_far.l
diff --git a/gas/testsuite/gas/xtensa/j_too_far.l b/gas/testsuite/gas/xtensa/j_too_far.l
new file mode 100644
index 000000000000..38d3c79cdb08
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/j_too_far.l
@@ -0,0 +1,2 @@
+[^:]*: Assembler messages:
+[^:]*:4: Error:.*operand 1 of 'j' has out of range value.*
diff --git a/gas/testsuite/gas/xtensa/loop_align.d b/gas/testsuite/gas/xtensa/loop_align.d
new file mode 100644
index 000000000000..a4da096cf37c
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/loop_align.d
@@ -0,0 +1,7 @@
+#as:
+#objdump: -d -j .text
+#name: automatic loop alignment
+
+#...
+^.*2:.*loop.*
+#...
diff --git a/gas/testsuite/gas/xtensa/loop_misalign.d b/gas/testsuite/gas/xtensa/loop_misalign.d
new file mode 100644
index 000000000000..88bddc2a25d7
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/loop_misalign.d
@@ -0,0 +1,7 @@
+#as:
+#objdump: -d -j .text
+#name: force loop misalignment
+
+#...
+^.*2:.*loop.*
+#...
diff --git a/gas/testsuite/gas/xtensa/trampoline-2.d b/gas/testsuite/gas/xtensa/trampoline-2.d
new file mode 100644
index 000000000000..535dde7b5ce0
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/trampoline-2.d
@@ -0,0 +1,4 @@
+#as:
+#readelf: -a
+
+#...
diff --git a/gas/testsuite/gas/xtensa/trampoline-2.l b/gas/testsuite/gas/xtensa/trampoline-2.l
deleted file mode 100644
index 36a0971c9b2e..000000000000
--- a/gas/testsuite/gas/xtensa/trampoline-2.l
+++ /dev/null
@@ -1 +0,0 @@
-# No warnings or errors expected!
diff --git a/gas/testsuite/gas/xtensa/xtensa-err.exp b/gas/testsuite/gas/xtensa/xtensa-err.exp
index 5a2ed680cd89..f2937b847fe4 100644
--- a/gas/testsuite/gas/xtensa/xtensa-err.exp
+++ b/gas/testsuite/gas/xtensa/xtensa-err.exp
@@ -14,11 +14,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
 
-if { ! [istarget "xtensa*-*-*"] } {
-    return
-}
-
-proc run_xtensa_err_tests { } {
+if [istarget xtensa*-*-*] {
     global srcdir subdir runtests
 
     load_lib gas-dg.exp
@@ -26,5 +22,3 @@ proc run_xtensa_err_tests { } {
     dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/err-*.s]] "" ""
     dg-finish
 }
-
-run_xtensa_err_tests
-- 
2.11.0

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2/2] xtensa: gas: add relaxations tests
  2019-04-10 20:38 [PATCH 0/2] xtensa: gas: clean up test suite and add tests Max Filippov
@ 2019-04-10 20:38 ` Max Filippov
  2019-04-11  0:08   ` augustine.sterling
  2019-04-10 20:38 ` [PATCH 1/2] xtensa: gas: convert tests to run_dump_tests Max Filippov
  1 sibling, 1 reply; 6+ messages in thread
From: Max Filippov @ 2019-04-10 20:38 UTC (permalink / raw)
  To: binutils; +Cc: Sterling Augustine, Eric Tsai, linux-xtensa, Max Filippov

gas/
2019-04-10  Max Filippov  <jcmvbkbc@gmail.com>

	* testsuite/gas/xtensa/loop-relax-2.d: New test definition.
	* testsuite/gas/xtensa/loop-relax.d: New test definition.
	* testsuite/gas/xtensa/loop-relax.s: New test source.
	* testsuite/gas/xtensa/text-section-literals-1a.d: New test
	definition.
	* testsuite/gas/xtensa/text-section-literals-2.d: New test
	definition.
	* testsuite/gas/xtensa/text-section-literals-2.s: New test
	source.
	* testsuite/gas/xtensa/text-section-literals-2a.d: New test
	definition.
	* testsuite/gas/xtensa/text-section-literals-3.d: New test
	definition.
	* testsuite/gas/xtensa/text-section-literals-3.s: New test
	source.
	* testsuite/gas/xtensa/text-section-literals-4.d: New test
	definition.
	* testsuite/gas/xtensa/text-section-literals-4.s: New test
	source.
	* testsuite/gas/xtensa/text-section-literals-4a.d: New test
	definition.
---
 gas/testsuite/gas/xtensa/loop-relax-2.d            |  7 +++
 gas/testsuite/gas/xtensa/loop-relax.d              | 14 ++++++
 gas/testsuite/gas/xtensa/loop-relax.s              | 58 ++++++++++++++++++++++
 .../gas/xtensa/text-section-literals-1a.d          | 18 +++++++
 gas/testsuite/gas/xtensa/text-section-literals-2.d |  9 ++++
 gas/testsuite/gas/xtensa/text-section-literals-2.s |  3 ++
 .../gas/xtensa/text-section-literals-2a.d          | 10 ++++
 gas/testsuite/gas/xtensa/text-section-literals-3.d | 11 ++++
 gas/testsuite/gas/xtensa/text-section-literals-3.s |  3 ++
 gas/testsuite/gas/xtensa/text-section-literals-4.d |  9 ++++
 gas/testsuite/gas/xtensa/text-section-literals-4.s |  3 ++
 .../gas/xtensa/text-section-literals-4a.d          | 10 ++++
 12 files changed, 155 insertions(+)
 create mode 100644 gas/testsuite/gas/xtensa/loop-relax-2.d
 create mode 100644 gas/testsuite/gas/xtensa/loop-relax.d
 create mode 100644 gas/testsuite/gas/xtensa/loop-relax.s
 create mode 100644 gas/testsuite/gas/xtensa/text-section-literals-1a.d
 create mode 100644 gas/testsuite/gas/xtensa/text-section-literals-2.d
 create mode 100644 gas/testsuite/gas/xtensa/text-section-literals-2.s
 create mode 100644 gas/testsuite/gas/xtensa/text-section-literals-2a.d
 create mode 100644 gas/testsuite/gas/xtensa/text-section-literals-3.d
 create mode 100644 gas/testsuite/gas/xtensa/text-section-literals-3.s
 create mode 100644 gas/testsuite/gas/xtensa/text-section-literals-4.d
 create mode 100644 gas/testsuite/gas/xtensa/text-section-literals-4.s
 create mode 100644 gas/testsuite/gas/xtensa/text-section-literals-4a.d

diff --git a/gas/testsuite/gas/xtensa/loop-relax-2.d b/gas/testsuite/gas/xtensa/loop-relax-2.d
new file mode 100644
index 000000000000..c0024bf67637
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/loop-relax-2.d
@@ -0,0 +1,7 @@
+#as: --text-section-literals
+#source: loop_align.s
+#objdump: -d
+
+#...
+.*loop.*a5,.*
+#...
diff --git a/gas/testsuite/gas/xtensa/loop-relax.d b/gas/testsuite/gas/xtensa/loop-relax.d
new file mode 100644
index 000000000000..a5c8793ca21c
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/loop-relax.d
@@ -0,0 +1,14 @@
+#as:
+#objdump: -d
+
+#...
+.*loop.*a2,.*
+.*rsr.lend.*a2
+.*wsr.lbeg.*a2
+.*l32r.*a2,.*
+.*nop
+.*wsr.lend.*a2
+.*isync
+.*rsr.lcount.*a2
+.*addi.*a2, a2, 1
+#...
diff --git a/gas/testsuite/gas/xtensa/loop-relax.s b/gas/testsuite/gas/xtensa/loop-relax.s
new file mode 100644
index 000000000000..26fbdd85cf8e
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/loop-relax.s
@@ -0,0 +1,58 @@
+foo = 0x12345678
+bar = 0x12345679
+baz = 0x1234567a
+qux = 0x1234567b
+
+	.text
+	.globl main
+	.align 4
+main:
+	entry   sp, 32
+	movi    a2, foo
+	movi    a3, bar
+	movi    a4, baz
+	movi    a5, qux
+	movi    a6, 0
+	movi    a7, 2
+
+	loop    a2, .Lloop_end
+	j       1f
+
+2:
+	movi    a2, 10
+	loop    a2, 3f
+	addi    a6, a6, 1
+3:
+	.rep 100
+	nop
+	.endr
+
+	movi    a2, 10
+	loop    a2, 3f
+	addi    a6, a6, 1
+3:
+	.rep 100
+	nop
+	.endr
+
+	.align  4
+	.literal_position
+1:
+	beqi    a6, 2, 2b
+	movi    a2, foo
+	movi    a3, bar
+	movi    a4, baz
+	movi    a5, qux
+
+	beqi    a6, 1, 1f
+
+	addi    a6, a6, 1
+.Lloop_end:
+
+	.rep    16
+	ill
+	.endr
+
+1:
+	movi    a2, 0
+	retw
diff --git a/gas/testsuite/gas/xtensa/text-section-literals-1a.d b/gas/testsuite/gas/xtensa/text-section-literals-1a.d
new file mode 100644
index 000000000000..ca18e353bf4f
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/text-section-literals-1a.d
@@ -0,0 +1,18 @@
+#as: --auto-litpools
+#objdump: -d
+#source: text-section-literals-1.s
+
+.*: +file format .*xtensa.*
+#...
+Disassembly of section .init.literal:
+#...
+Disassembly of section .fini.literal:
+#...
+Disassembly of section .init:
+#...
+ *0:.*l32r.*
+#...
+Disassembly of section .fini:
+#...
+ *0:.*l32r.*
+#...
diff --git a/gas/testsuite/gas/xtensa/text-section-literals-2.d b/gas/testsuite/gas/xtensa/text-section-literals-2.d
new file mode 100644
index 000000000000..c73c6b15abf0
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/text-section-literals-2.d
@@ -0,0 +1,9 @@
+#as: --text-section-literals
+#objdump: -ds
+#Lone literal assembled successfully with --text-section-literals
+
+.*file format .*xtensa.*
+#...
+Contents of section .text:
+ 0000 12345678 .*
+#...
diff --git a/gas/testsuite/gas/xtensa/text-section-literals-2.s b/gas/testsuite/gas/xtensa/text-section-literals-2.s
new file mode 100644
index 000000000000..2846b420fa42
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/text-section-literals-2.s
@@ -0,0 +1,3 @@
+	.text
+
+	.literal .L0, 0x12345678
diff --git a/gas/testsuite/gas/xtensa/text-section-literals-2a.d b/gas/testsuite/gas/xtensa/text-section-literals-2a.d
new file mode 100644
index 000000000000..9b918769f9d5
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/text-section-literals-2a.d
@@ -0,0 +1,10 @@
+#as: --auto-litpools
+#objdump: -ds
+#source: text-section-literals-2.s
+#Lone literal assembled successfully with --auto-litpools
+
+.*file format .*xtensa.*
+#...
+Contents of section .text:
+ 0000 12345678 .*
+#...
diff --git a/gas/testsuite/gas/xtensa/text-section-literals-3.d b/gas/testsuite/gas/xtensa/text-section-literals-3.d
new file mode 100644
index 000000000000..b45a7e12e1a9
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/text-section-literals-3.d
@@ -0,0 +1,11 @@
+#as: --text-section-literals
+#objdump: -ds
+
+.*file format .*xtensa.*
+#...
+Contents of section .text:
+ 0000 12345678 .*
+#...
+00000004 <foo>:
+.*4:.*l32r.*a2, 0.*
+#...
diff --git a/gas/testsuite/gas/xtensa/text-section-literals-3.s b/gas/testsuite/gas/xtensa/text-section-literals-3.s
new file mode 100644
index 000000000000..a3fad22548e1
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/text-section-literals-3.s
@@ -0,0 +1,3 @@
+	.text
+foo:
+	movi	a2, 0x12345678
diff --git a/gas/testsuite/gas/xtensa/text-section-literals-4.d b/gas/testsuite/gas/xtensa/text-section-literals-4.d
new file mode 100644
index 000000000000..f09a1f62487f
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/text-section-literals-4.d
@@ -0,0 +1,9 @@
+#as: --text-section-literals --longcalls
+#objdump: -d
+
+.*file format .*xtensa.*
+#...
+00000004 <foo>:
+.*4:.*l32r.*a0, 0 .*
+.*7:.*callx0.*a0
+#...
diff --git a/gas/testsuite/gas/xtensa/text-section-literals-4.s b/gas/testsuite/gas/xtensa/text-section-literals-4.s
new file mode 100644
index 000000000000..57be3ac48c33
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/text-section-literals-4.s
@@ -0,0 +1,3 @@
+	.text
+foo:
+	call0	bar
diff --git a/gas/testsuite/gas/xtensa/text-section-literals-4a.d b/gas/testsuite/gas/xtensa/text-section-literals-4a.d
new file mode 100644
index 000000000000..64a186a053c2
--- /dev/null
+++ b/gas/testsuite/gas/xtensa/text-section-literals-4a.d
@@ -0,0 +1,10 @@
+#as: --auto-litpools --longcalls
+#objdump: -d
+#source: text-section-literals-4.s
+
+.*file format .*xtensa.*
+#...
+00000004 <foo>:
+.*4:.*l32r.*a0, 0 .*
+.*7:.*callx0.*a0
+#...
-- 
2.11.0

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] xtensa: gas: add relaxations tests
  2019-04-10 20:38 ` [PATCH 2/2] xtensa: gas: add relaxations tests Max Filippov
@ 2019-04-11  0:08   ` augustine.sterling
  2019-04-11 18:47     ` Max Filippov
  0 siblings, 1 reply; 6+ messages in thread
From: augustine.sterling @ 2019-04-11  0:08 UTC (permalink / raw)
  To: Max Filippov; +Cc: binutils, Eric Tsai, linux-xtensa

On Wed, Apr 10, 2019 at 1:38 PM Max Filippov <jcmvbkbc@gmail.com> wrote:
>
> gas/
> 2019-04-10  Max Filippov  <jcmvbkbc@gmail.com>
>
>         * testsuite/gas/xtensa/loop-relax-2.d: New test definition.
>         * testsuite/gas/xtensa/loop-relax.d: New test definition.
>         * testsuite/gas/xtensa/loop-relax.s: New test source.
>         * testsuite/gas/xtensa/text-section-literals-1a.d: New test
>         definition.
>         * testsuite/gas/xtensa/text-section-literals-2.d: New test
>         definition.
>         * testsuite/gas/xtensa/text-section-literals-2.s: New test
>         source.
>         * testsuite/gas/xtensa/text-section-literals-2a.d: New test
>         definition.
>         * testsuite/gas/xtensa/text-section-literals-3.d: New test
>         definition.
>         * testsuite/gas/xtensa/text-section-literals-3.s: New test
>         source.
>         * testsuite/gas/xtensa/text-section-literals-4.d: New test
>         definition.
>         * testsuite/gas/xtensa/text-section-literals-4.s: New test
>         source.
>         * testsuite/gas/xtensa/text-section-literals-4a.d: New test
>         definition.

Also looks good.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] xtensa: gas: convert tests to run_dump_tests
       [not found]   ` <CAGSvup8_aXx85rv0DXA0mV90+VHN3OZcG5kcopS9B64Ygh69GA@mail.gmail.com>
@ 2019-04-11 18:47     ` Max Filippov
  0 siblings, 0 replies; 6+ messages in thread
From: Max Filippov @ 2019-04-11 18:47 UTC (permalink / raw)
  To: augustine.sterling, binutils

On Wed, Apr 10, 2019 at 5:08 PM augustine.sterling@gmail.com
<augustine.sterling@gmail.com> wrote:
>
> On Wed, Apr 10, 2019 at 1:38 PM Max Filippov <jcmvbkbc@gmail.com> wrote:
> >
> > gas/
> > 2019-04-10  Max Filippov  <jcmvbkbc@gmail.com>
> >
> >         * testsuite/gas/xtensa/all.exp: Remove all expect-based
> >         tests and all explicit run_dump_test / run_list_test
> >         invocations. Add run_dump_tests for all .d files in the
> >         test subdirectory.
> >         * testsuite/gas/xtensa/entry_align.d: New test definition.
> >         * testsuite/gas/xtensa/entry_align.l: New test output.
> >         * testsuite/gas/xtensa/entry_misalign.d: New test definition.
> >         * testsuite/gas/xtensa/entry_misalign2.d: New test definition.
> >         * testsuite/gas/xtensa/j_too_far.d: New test definition.
> >         * testsuite/gas/xtensa/j_too_far.l: New test output.
> >         * testsuite/gas/xtensa/loop_align.d: New test definition.
> >         * testsuite/gas/xtensa/loop_misalign.d: New test definition.
> >         * testsuite/gas/xtensa/trampoline-2.d: New test definition.
> >         * testsuite/gas/xtensa/trampoline-2.l: Remove empty output.
> >         * testsuite/gas/xtensa/xtensa-err.exp: Use positive logic.
>
> Looks good.

Thanks. Applied to master.

-- Max

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] xtensa: gas: add relaxations tests
  2019-04-11  0:08   ` augustine.sterling
@ 2019-04-11 18:47     ` Max Filippov
  0 siblings, 0 replies; 6+ messages in thread
From: Max Filippov @ 2019-04-11 18:47 UTC (permalink / raw)
  To: augustine.sterling; +Cc: binutils, Eric Tsai, linux-xtensa

On Wed, Apr 10, 2019 at 5:08 PM augustine.sterling@gmail.com
<augustine.sterling@gmail.com> wrote:
>
> On Wed, Apr 10, 2019 at 1:38 PM Max Filippov <jcmvbkbc@gmail.com> wrote:
> >
> > gas/
> > 2019-04-10  Max Filippov  <jcmvbkbc@gmail.com>
> >
> >         * testsuite/gas/xtensa/loop-relax-2.d: New test definition.
> >         * testsuite/gas/xtensa/loop-relax.d: New test definition.
> >         * testsuite/gas/xtensa/loop-relax.s: New test source.
> >         * testsuite/gas/xtensa/text-section-literals-1a.d: New test
> >         definition.
> >         * testsuite/gas/xtensa/text-section-literals-2.d: New test
> >         definition.
> >         * testsuite/gas/xtensa/text-section-literals-2.s: New test
> >         source.
> >         * testsuite/gas/xtensa/text-section-literals-2a.d: New test
> >         definition.
> >         * testsuite/gas/xtensa/text-section-literals-3.d: New test
> >         definition.
> >         * testsuite/gas/xtensa/text-section-literals-3.s: New test
> >         source.
> >         * testsuite/gas/xtensa/text-section-literals-4.d: New test
> >         definition.
> >         * testsuite/gas/xtensa/text-section-literals-4.s: New test
> >         source.
> >         * testsuite/gas/xtensa/text-section-literals-4a.d: New test
> >         definition.
>
> Also looks good.

Thanks. Applied to master.

-- Max

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-04-11 18:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-10 20:38 [PATCH 0/2] xtensa: gas: clean up test suite and add tests Max Filippov
2019-04-10 20:38 ` [PATCH 2/2] xtensa: gas: add relaxations tests Max Filippov
2019-04-11  0:08   ` augustine.sterling
2019-04-11 18:47     ` Max Filippov
2019-04-10 20:38 ` [PATCH 1/2] xtensa: gas: convert tests to run_dump_tests Max Filippov
     [not found]   ` <CAGSvup8_aXx85rv0DXA0mV90+VHN3OZcG5kcopS9B64Ygh69GA@mail.gmail.com>
2019-04-11 18:47     ` Max Filippov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).