From b001cb64231fb29a663ce4a97900796f549fbd2c Mon Sep 17 00:00:00 2001 From: Vasileios Kalintiris Date: Tue, 11 Nov 2014 11:22:39 +0000 Subject: [PATCH] [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221685 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/Mips/AsmParser/MipsAsmParser.cpp | 1 + test/MC/Mips/mips-hwr-register-names.s | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/lib/Target/Mips/AsmParser/MipsAsmParser.cpp b/lib/Target/Mips/AsmParser/MipsAsmParser.cpp index e53d3c7e29b..1efbc05c34b 100644 --- a/lib/Target/Mips/AsmParser/MipsAsmParser.cpp +++ b/lib/Target/Mips/AsmParser/MipsAsmParser.cpp @@ -1821,6 +1821,7 @@ int MipsAsmParser::matchHWRegsRegisterName(StringRef Name) { .Case("hwr_synci_step", 1) .Case("hwr_cc", 2) .Case("hwr_ccres", 3) + .Case("hwr_ulr", 29) .Default(-1); return CC; diff --git a/test/MC/Mips/mips-hwr-register-names.s b/test/MC/Mips/mips-hwr-register-names.s index b8fd4ead1a0..3849675cdeb 100644 --- a/test/MC/Mips/mips-hwr-register-names.s +++ b/test/MC/Mips/mips-hwr-register-names.s @@ -175,11 +175,18 @@ # 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 # CHECK-NEXT: .set pop # encoding: [0x7c,0x04,0xe8,0x3b] 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 -- 2.34.1