diff options
author | Martin Aberg <maberg@gaisler.com> | 2018-08-29 20:52:28 +0200 |
---|---|---|
committer | Jose E. Marchesi <jose.marchesi@oracle.com> | 2018-08-29 20:52:28 +0200 |
commit | df28970fcc741fa744a51aece29bb755c20eceab (patch) | |
tree | 9a37e0ca7847b549f56d17ef7427ec13b45c582a /gas | |
parent | 4d3928d7e0a141e0fb16405d33b375cbe2f13123 (diff) | |
download | gdb-df28970fcc741fa744a51aece29bb755c20eceab.zip gdb-df28970fcc741fa744a51aece29bb755c20eceab.tar.gz gdb-df28970fcc741fa744a51aece29bb755c20eceab.tar.bz2 |
sparc/leon: add support for partial write psr instruction
Partial write %PSR (PWRPSR) is a SPARC V8e option that allows the WRPSR
instruction to only affect the %PSR.ET field. When available it is enabled
by setting the rd field of the WRPSR instruction to a value other than 0.
For Leon processors with support for partial write %PSR (currently GR740
and GR716) the rd value must be 1.
opcodes/ChangeLog:
2018-08-29 Martin Aberg <maberg@gaisler.com>
* sparc-opc.c (sparc_opcodes): Add Leon specific partial write
psr (PWRPSR) instruction.
gas/ChangeLog:
2018-08-29 Daniel Cederman <cederman@gaisler.com>
* testsuite/gas/sparc/leon.d: New test.
* testsuite/gas/sparc/leon.s: New test.
* testsuite/gas/sparc/sparc.exp: Execute the pwrpsr test.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/sparc/leon.d | 13 | ||||
-rw-r--r-- | gas/testsuite/gas/sparc/leon.s | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/sparc/sparc.exp | 1 |
4 files changed, 26 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 8bb6ae8..37b3560 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2018-08-29 Daniel Cederman <cederman@gaisler.com> + + * testsuite/gas/sparc/leon.d: New test. + * testsuite/gas/sparc/leon.s: New test. + * testsuite/gas/sparc/sparc.exp: Execute the pwrpsr test. + 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com> * config/tc-mips.c (ISA_HAS_ODD_SINGLE_FPR): Exclude CPU_GS264E. diff --git a/gas/testsuite/gas/sparc/leon.d b/gas/testsuite/gas/sparc/leon.d new file mode 100644 index 0000000..e3cf550 --- /dev/null +++ b/gas/testsuite/gas/sparc/leon.d @@ -0,0 +1,13 @@ +#as: -Aleon +#objdump: -dr +#name: LEON instructions + +.*: +file format .* + +Disassembly of section .text: + +0+ <foo>: + 0: 83 88 00 10 pwr %l0, %psr + 4: 83 88 00 00 pwr %g0, %psr + 8: 83 88 20 00 pwr %g0, %psr + c: 83 88 3f ff pwr -1, %psr diff --git a/gas/testsuite/gas/sparc/leon.s b/gas/testsuite/gas/sparc/leon.s new file mode 100644 index 0000000..7b87c47 --- /dev/null +++ b/gas/testsuite/gas/sparc/leon.s @@ -0,0 +1,6 @@ + .text +foo: + pwr %l0, %psr + pwr %g0, %psr + pwr 0, %psr + pwr -1, %psr diff --git a/gas/testsuite/gas/sparc/sparc.exp b/gas/testsuite/gas/sparc/sparc.exp index dcfec40..bb5f729 100644 --- a/gas/testsuite/gas/sparc/sparc.exp +++ b/gas/testsuite/gas/sparc/sparc.exp @@ -65,6 +65,7 @@ if [istarget sparc*-*-*] { run_dump_test "ticc-imm-reg" run_dump_test "v8-movwr-imm" run_dump_test "save-args" + run_dump_test "leon" set_tests_arch "v9c" run_dump_test "ldtxa" |