This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] gas: Test cases for the architecture level aware SPARC ASI work.
- From: Sheldon Lobo <sheldon dot lobo at oracle dot com>
- To: binutils at sourceware dot org
- Date: Thu, 23 Feb 2017 13:04:21 -0500
- Subject: [PATCH] gas: Test cases for the architecture level aware SPARC ASI work.
- Authentication-results: sourceware.org; auth=none
Added a couple of SPARC ASI test cases - a warning with -bump, and an error
with -A.
gas/ChangeLog:
Test cases for the architecture level aware SPARC ASI work.
* gas/testsuite/gas/sparc/sparc.exp: 2 new tests
* gas/testsuite/gas/sparc/asi-bump-warn.s: New test
* gas/testsuite/gas/sparc/asi-bump-warn.l: Likewise
* gas/testsuite/gas/sparc/asi-arch-error.s: Likewise
* gas/testsuite/gas/sparc/asi-arch-error.l: Likewise
---
gas/testsuite/gas/sparc/asi-arch-error.l | 3 +++
gas/testsuite/gas/sparc/asi-arch-error.s | 3 +++
gas/testsuite/gas/sparc/asi-bump-warn.l | 2 ++
gas/testsuite/gas/sparc/asi-bump-warn.s | 3 +++
gas/testsuite/gas/sparc/sparc.exp | 2 ++
5 files changed, 13 insertions(+), 0 deletions(-)
create mode 100644 gas/testsuite/gas/sparc/asi-arch-error.l
create mode 100644 gas/testsuite/gas/sparc/asi-arch-error.s
create mode 100644 gas/testsuite/gas/sparc/asi-bump-warn.l
create mode 100644 gas/testsuite/gas/sparc/asi-bump-warn.s
diff --git a/gas/testsuite/gas/sparc/asi-arch-error.l b/gas/testsuite/gas/sparc/asi-arch-error.l
new file mode 100644
index 0000000..d41881f
--- /dev/null
+++ b/gas/testsuite/gas/sparc/asi-arch-error.l
@@ -0,0 +1,3 @@
+.*asi-arch-error.s: Assembler messages:
+.*asi-arch-error.s:3: Error: Architecture mismatch on "ldda \[%g0]#ASI_FL16_P,%f0".
+.*asi-arch-error.s:3: \(Requires v9b\|v9c\|v9d\|v9e\|v9v\|v9m.*; requested architecture is v9.\)
diff --git a/gas/testsuite/gas/sparc/asi-arch-error.s b/gas/testsuite/gas/sparc/asi-arch-error.s
new file mode 100644
index 0000000..8f95444
--- /dev/null
+++ b/gas/testsuite/gas/sparc/asi-arch-error.s
@@ -0,0 +1,3 @@
+# Check for an error if ASI does not conform to architecture level desired.
+ .text
+ ldda [%g0] #ASI_FL16_P, %f0
diff --git a/gas/testsuite/gas/sparc/asi-bump-warn.l b/gas/testsuite/gas/sparc/asi-bump-warn.l
new file mode 100644
index 0000000..2de647b
--- /dev/null
+++ b/gas/testsuite/gas/sparc/asi-bump-warn.l
@@ -0,0 +1,2 @@
+.*asi-bump-warn.s: Assembler messages:
+.*asi-bump-warn.s:3: Warning: architecture bumped from "v6" to "v9" on "#ASI_P"
diff --git a/gas/testsuite/gas/sparc/asi-bump-warn.s b/gas/testsuite/gas/sparc/asi-bump-warn.s
new file mode 100644
index 0000000..02dec28
--- /dev/null
+++ b/gas/testsuite/gas/sparc/asi-bump-warn.s
@@ -0,0 +1,3 @@
+# Test to check for the proper bump warning due to the ASI load.
+ .text
+ lda [%g0] #ASI_P, %g1
diff --git a/gas/testsuite/gas/sparc/sparc.exp b/gas/testsuite/gas/sparc/sparc.exp
index 88b1b56..eb69e50 100644
--- a/gas/testsuite/gas/sparc/sparc.exp
+++ b/gas/testsuite/gas/sparc/sparc.exp
@@ -92,6 +92,8 @@ if [istarget sparc*-*-*] {
run_dump_test "plt64"
run_dump_test "gotop64"
run_list_test "hwcaps-bump" "-64 -bump"
+ run_list_test "asi-bump-warn" "-bump"
+ run_list_test "asi-arch-error" "-Av9"
}
run_dump_test "synth"
--
1.7.1