[llvm] r221685 - [mips] Add hardware register name "hwr_ulr" ($29)
Vasileios Kalintiris
Vasileios.Kalintiris at imgtec.com
Tue Nov 11 03:22:39 PST 2014
Author: vkalintiris
Date: Tue Nov 11 05:22:39 2014
New Revision: 221685
URL: http://llvm.org/viewvc/llvm-project?rev=221685&view=rev
Log:
[mips] Add hardware register name "hwr_ulr" ($29)
The canonical name when printing assembly is still $29. The reason is that
GAS does not accept "$hwr_ulr" at the moment.
This addresses the comments from r221307, which reverted the original
commit r221299.
Modified:
llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
llvm/trunk/test/MC/Mips/mips-hwr-register-names.s
Modified: llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp?rev=221685&r1=221684&r2=221685&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp Tue Nov 11 05:22:39 2014
@@ -1821,6 +1821,7 @@ int MipsAsmParser::matchHWRegsRegisterNa
.Case("hwr_synci_step", 1)
.Case("hwr_cc", 2)
.Case("hwr_ccres", 3)
+ .Case("hwr_ulr", 29)
.Default(-1);
return CC;
Modified: llvm/trunk/test/MC/Mips/mips-hwr-register-names.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Mips/mips-hwr-register-names.s?rev=221685&r1=221684&r2=221685&view=diff
==============================================================================
--- llvm/trunk/test/MC/Mips/mips-hwr-register-names.s (original)
+++ llvm/trunk/test/MC/Mips/mips-hwr-register-names.s Tue Nov 11 05:22:39 2014
@@ -175,6 +175,7 @@
# CHECK-NEXT: rdhwr $4, $28
# CHECK-NEXT: .set pop # encoding: [0x7c,0x04,0xe0,0x3b]
rdhwr $a0,$28
+
# CHECK: .set push
# CHECK-NEXT: .set mips32r2
# CHECK-NEXT: rdhwr $4, $29
@@ -182,6 +183,12 @@
rdhwr $a0,$29
# CHECK: .set push
# CHECK-NEXT: .set mips32r2
+ # CHECK-NEXT: rdhwr $4, $29
+ # CHECK-NEXT: .set pop # encoding: [0x7c,0x04,0xe8,0x3b]
+ rdhwr $a0,$hwr_ulr
+
+ # CHECK: .set push
+ # CHECK-NEXT: .set mips32r2
# CHECK-NEXT: rdhwr $4, $30
# CHECK-NEXT: .set pop # encoding: [0x7c,0x04,0xf0,0x3b]
rdhwr $a0,$30
More information about the llvm-commits
mailing list