-
Notifications
You must be signed in to change notification settings - Fork 509
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RISC-V: Fix minor issues with FP csr instructions.
Mel Chen <mel.chen@sifive.com> gas/ * testsuite/gas/riscv/alias-csr.s: Add testcase for CSR-access alias instructions. * testsuite/gas/riscv/no-aliases-csr.d: Run testcase alias-csr.s with -Mno-aliases. * testsuite/gas/riscv/alias-csr.d: Run testcase alias-csr.s. * testsuite/gas/riscv/priv-reg.d: Update. opcodes/ * riscv-opc.c (riscv_opcodes): Set frsr, fssr, frcsr, fscsr, frrm, fsrm, fsrmi, frflags, fsflags, fsflagsi to alias instructions. * riscv-opc.c (riscv_opcodes): Adjust order of frsr, frcsr, fssr, fscsr.
- Loading branch information
Jim Wilson
committed
Jul 30, 2019
1 parent
aa3b653
commit c0d6f62
Showing
7 changed files
with
95 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#source: alias-csr.s | ||
#as: -march=rv64if | ||
#objdump: -dr | ||
|
||
.*:[ ]+file format .* | ||
|
||
|
||
Disassembly of section .text: | ||
|
||
0+000 <alias_csr>: | ||
[ ]+0:[ ]+003022f3[ ]+frcsr[ ]+t0 | ||
[ ]+4:[ ]+003392f3[ ]+fscsr[ ]+t0,t2 | ||
[ ]+8:[ ]+00339073[ ]+fscsr[ ]+t2 | ||
[ ]+c:[ ]+002022f3[ ]+frrm[ ]+t0 | ||
[ ]+10:[ ]+002312f3[ ]+fsrm[ ]+t0,t1 | ||
[ ]+14:[ ]+00231073[ ]+fsrm[ ]+t1 | ||
[ ]+18:[ ]+002fd2f3[ ]+fsrmi[ ]+t0,31 | ||
[ ]+1c:[ ]+002fd073[ ]+fsrmi[ ]+zero,31 | ||
[ ]+20:[ ]+001022f3[ ]+frflags[ ]+t0 | ||
[ ]+24:[ ]+001312f3[ ]+fsflags[ ]+t0,t1 | ||
[ ]+28:[ ]+00131073[ ]+fsflags[ ]+t1 | ||
[ ]+2c:[ ]+001fd2f3[ ]+fsflagsi[ ]+t0,31 | ||
[ ]+30:[ ]+001fd073[ ]+fsflagsi[ ]+zero,31 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
alias_csr: | ||
frcsr t0 | ||
fscsr t0, t2 | ||
fscsr t2 | ||
frrm t0 | ||
fsrm t0, t1 | ||
fsrm t1 | ||
fsrmi t0, 31 | ||
fsrmi 31 | ||
frflags t0 | ||
fsflags t0, t1 | ||
fsflags t1 | ||
fsflagsi t0, 31 | ||
fsflagsi 31 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#source: alias-csr.s | ||
#as: -march=rv64if | ||
#objdump: -dr -Mno-aliases | ||
|
||
.*:[ ]+file format .* | ||
|
||
|
||
Disassembly of section .text: | ||
|
||
0+000 <alias_csr>: | ||
[ ]+0:[ ]+003022f3[ ]+csrrs[ ]+t0,fcsr,zero | ||
[ ]+4:[ ]+003392f3[ ]+csrrw[ ]+t0,fcsr,t2 | ||
[ ]+8:[ ]+00339073[ ]+csrrw[ ]+zero,fcsr,t2 | ||
[ ]+c:[ ]+002022f3[ ]+csrrs[ ]+t0,frm,zero | ||
[ ]+10:[ ]+002312f3[ ]+csrrw[ ]+t0,frm,t1 | ||
[ ]+14:[ ]+00231073[ ]+csrrw[ ]+zero,frm,t1 | ||
[ ]+18:[ ]+002fd2f3[ ]+csrrwi[ ]+t0,frm,31 | ||
[ ]+1c:[ ]+002fd073[ ]+csrrwi[ ]+zero,frm,31 | ||
[ ]+20:[ ]+001022f3[ ]+csrrs[ ]+t0,fflags,zero | ||
[ ]+24:[ ]+001312f3[ ]+csrrw[ ]+t0,fflags,t1 | ||
[ ]+28:[ ]+00131073[ ]+csrrw[ ]+zero,fflags,t1 | ||
[ ]+2c:[ ]+001fd2f3[ ]+csrrwi[ ]+t0,fflags,31 | ||
[ ]+30:[ ]+001fd073[ ]+csrrwi[ ]+zero,fflags,31 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters