[PATCH] D34348: [mips] Allow $AT to be used as a register name

Stanislav Ocovaj via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 22 01:25:51 PDT 2017


stanislav.ocovaj updated this revision to Diff 103538.
stanislav.ocovaj marked an inline comment as done.

https://reviews.llvm.org/D34348

Files:
  lib/Target/Mips/AsmParser/MipsAsmParser.cpp
  test/MC/Mips/mips-register-names-o32.s
  test/MC/Mips/mips64-register-names-n32-n64.s
  test/MC/Mips/mips64-register-names-o32.s


Index: test/MC/Mips/mips64-register-names-o32.s
===================================================================
--- test/MC/Mips/mips64-register-names-o32.s
+++ test/MC/Mips/mips64-register-names-o32.s
@@ -8,6 +8,7 @@
 .set noat
 addiu	$zero, $zero, 0 # CHECK: encoding: [0x24,0x00,0x00,0x00]
 addiu	$at, $zero, 0   # CHECK: encoding: [0x24,0x01,0x00,0x00]
+addiu	$AT, $zero, 0   # CHECK: encoding: [0x24,0x01,0x00,0x00]
 addiu	$v0, $zero, 0   # CHECK: encoding: [0x24,0x02,0x00,0x00]
 addiu	$v1, $zero, 0   # CHECK: encoding: [0x24,0x03,0x00,0x00]
 addiu	$a0, $zero, 0   # CHECK: encoding: [0x24,0x04,0x00,0x00]
Index: test/MC/Mips/mips64-register-names-n32-n64.s
===================================================================
--- test/MC/Mips/mips64-register-names-n32-n64.s
+++ test/MC/Mips/mips64-register-names-n32-n64.s
@@ -13,6 +13,7 @@
 .set noat
 daddiu	$zero, $zero, 0     # CHECK: encoding: [0x64,0x00,0x00,0x00]
 daddiu	$at, $zero, 0       # CHECK: encoding: [0x64,0x01,0x00,0x00]
+daddiu	$AT, $zero, 0       # CHECK: encoding: [0x64,0x01,0x00,0x00]
 daddiu	$v0, $zero, 0       # CHECK: encoding: [0x64,0x02,0x00,0x00]
 daddiu	$v1, $zero, 0       # CHECK: encoding: [0x64,0x03,0x00,0x00]
 daddiu	$a0, $zero, 0       # CHECK: encoding: [0x64,0x04,0x00,0x00]
Index: test/MC/Mips/mips-register-names-o32.s
===================================================================
--- test/MC/Mips/mips-register-names-o32.s
+++ test/MC/Mips/mips-register-names-o32.s
@@ -7,6 +7,7 @@
 .set noat
 addiu	$zero, $zero, 0 # CHECK: encoding: [0x24,0x00,0x00,0x00]
 addiu	$at, $zero, 0   # CHECK: encoding: [0x24,0x01,0x00,0x00]
+addiu	$AT, $zero, 0   # CHECK: encoding: [0x24,0x01,0x00,0x00]
 addiu	$v0, $zero, 0   # CHECK: encoding: [0x24,0x02,0x00,0x00]
 addiu	$v1, $zero, 0   # CHECK: encoding: [0x24,0x03,0x00,0x00]
 addiu	$a0, $zero, 0   # CHECK: encoding: [0x24,0x04,0x00,0x00]
Index: lib/Target/Mips/AsmParser/MipsAsmParser.cpp
===================================================================
--- lib/Target/Mips/AsmParser/MipsAsmParser.cpp
+++ lib/Target/Mips/AsmParser/MipsAsmParser.cpp
@@ -5106,7 +5106,7 @@
 
   CC = StringSwitch<unsigned>(Name)
            .Case("zero", 0)
-           .Case("at", 1)
+           .Cases("at", "AT", 1)
            .Case("a0", 4)
            .Case("a1", 5)
            .Case("a2", 6)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34348.103538.patch
Type: text/x-patch
Size: 2336 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170622/c4db055b/attachment.bin>


More information about the llvm-commits mailing list