1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

Map %fprs to %asr6 in the Sparc assembler parser.

llvm-svn: 245437
This commit is contained in:
Joerg Sonnenberger 2015-08-19 13:55:14 +00:00
parent 180b686b47
commit f90461ca22
2 changed files with 13 additions and 0 deletions

View File

@ -879,6 +879,13 @@ bool SparcAsmParser::matchRegisterName(const AsmToken &Tok,
return true;
}
// %fprs is an alias of %asr6.
if (name.equals("fprs")) {
RegNo = ASRRegs[6];
RegKind = SparcOperand::rk_Special;
return true;
}
if (name.equals("icc")) {
RegNo = Sparc::ICC;
RegKind = SparcOperand::rk_Special;

View File

@ -33,3 +33,9 @@
! CHECK: wr %i0, 5, %tbr ! encoding: [0x81,0x9e,0x20,0x05]
wr %i0, 5, %tbr
! CHECK: rd %asr6, %i0 ! encoding: [0xb1,0x41,0x80,0x00]
rd %fprs, %i0
! CHECK: wr %i0, 7, %asr6 ! encoding: [0x8d,0x86,0x20,0x07]
wr %i0, 7, %fprs