From 95f4d65d4f6b7cb8ad1209f4ad744218fc840e10 Mon Sep 17 00:00:00 2001 From: Daniel Sanders Date: Wed, 26 Mar 2014 11:05:24 +0000 Subject: [PATCH] [mips] $s8 is an alias for $fp in all ABI's, not just N32/N64. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204793 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/Mips/AsmParser/MipsAsmParser.cpp | 4 ++-- test/MC/Mips/mips-register-names.s | 2 +- test/MC/Mips/mips64-register-names.s | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/Target/Mips/AsmParser/MipsAsmParser.cpp b/lib/Target/Mips/AsmParser/MipsAsmParser.cpp index 078b554e2e0..ca11e35a440 100644 --- a/lib/Target/Mips/AsmParser/MipsAsmParser.cpp +++ b/lib/Target/Mips/AsmParser/MipsAsmParser.cpp @@ -1018,9 +1018,10 @@ int MipsAsmParser::matchCPURegisterName(StringRef Name) { .Case("s7", 23) .Case("k0", 26) .Case("k1", 27) + .Case("gp", 28) .Case("sp", 29) .Case("fp", 30) - .Case("gp", 28) + .Case("s8", 30) .Case("ra", 31) .Case("t0", 8) .Case("t1", 9) @@ -1048,7 +1049,6 @@ int MipsAsmParser::matchCPURegisterName(StringRef Name) { .Case("a7", 11) .Case("kt0", 26) .Case("kt1", 27) - .Case("s8", 30) .Default(-1); warnIfAssemblerTemporary(CC); diff --git a/test/MC/Mips/mips-register-names.s b/test/MC/Mips/mips-register-names.s index 3e1731cac9f..f737faa2e6a 100644 --- a/test/MC/Mips/mips-register-names.s +++ b/test/MC/Mips/mips-register-names.s @@ -35,5 +35,5 @@ addiu $k1, $zero, 0 # CHECK: encoding: [0x24,0x1b,0x00,0x00] addiu $gp, $zero, 0 # CHECK: encoding: [0x24,0x1c,0x00,0x00] addiu $sp, $zero, 0 # CHECK: encoding: [0x24,0x1d,0x00,0x00] addiu $fp, $zero, 0 # CHECK: encoding: [0x24,0x1e,0x00,0x00] -addiu $sp, $zero, 0 +addiu $s8, $zero, 0 # CHECK: encoding: [0x24,0x1e,0x00,0x00] addiu $ra, $zero, 0 # CHECK: encoding: [0x24,0x1f,0x00,0x00] diff --git a/test/MC/Mips/mips64-register-names.s b/test/MC/Mips/mips64-register-names.s index 3d82a846680..3d47b6b71ef 100644 --- a/test/MC/Mips/mips64-register-names.s +++ b/test/MC/Mips/mips64-register-names.s @@ -35,4 +35,5 @@ daddiu $kt1, $zero, 0 # CHECK: encoding: [0x64,0x1b,0x00,0x00] daddiu $gp, $zero, 0 # CHECK: encoding: [0x64,0x1c,0x00,0x00] daddiu $sp, $zero, 0 # CHECK: encoding: [0x64,0x1d,0x00,0x00] daddiu $s8, $zero, 0 # CHECK: encoding: [0x64,0x1e,0x00,0x00] +daddiu $fp, $zero, 0 # CHECK: encoding: [0x64,0x1e,0x00,0x00] daddiu $ra, $zero, 0 # CHECK: encoding: [0x64,0x1f,0x00,0x00] -- 2.34.1