From 96f8959cfd0b1b12d4252b4d7523d35a49ea1cea Mon Sep 17 00:00:00 2001 From: Sam Parker Date: Fri, 18 Aug 2017 08:39:54 +0000 Subject: [PATCH] [AArch64] Remove DecodeAuthLoadWriteback The BaseAuthLoad instruction class was incorrectly passing an empty constraint string to its parent, so I have corrected this. This makes the DecodeAuthLoadWriteback function redundant, so I've also removed it. Differential Revision: https://reviews.llvm.org/D36741 llvm-svn: 311148 --- .../lib/Target/AArch64/AArch64InstrFormats.td | 9 ++++---- .../Disassembler/AArch64Disassembler.cpp | 21 ------------------- 2 files changed, 4 insertions(+), 26 deletions(-) diff --git a/llvm/lib/Target/AArch64/AArch64InstrFormats.td b/llvm/lib/Target/AArch64/AArch64InstrFormats.td index 49c52c2f5ef3..2e8c56a2b507 100644 --- a/llvm/lib/Target/AArch64/AArch64InstrFormats.td +++ b/llvm/lib/Target/AArch64/AArch64InstrFormats.td @@ -1169,7 +1169,7 @@ class AuthReturn op, bits<1> M, string asm> let mayLoad = 1 in class BaseAuthLoad - : I, Sched<[]> { + : I, Sched<[]> { bits<10> offset; bits<5> Rn; bits<5> Rt; @@ -1185,14 +1185,13 @@ class BaseAuthLoad { - def indexed : BaseAuthLoad; def writeback : BaseAuthLoad { - let DecoderMethod = "DecodeAuthLoadWriteback"; - } + "$Rn = $wback,@earlyclobber $wback", opr>; def : InstAlias(NAME # "indexed") GPR64:$Rt, GPR64sp:$Rn, 0)>; diff --git a/llvm/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp b/llvm/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp index 4389df7fa53c..36b48d5aacee 100644 --- a/llvm/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp +++ b/llvm/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp @@ -1609,24 +1609,3 @@ static DecodeStatus DecodeSImm(llvm::MCInst &Inst, uint64_t Imm, return Success; } -static DecodeStatus DecodeAuthLoadWriteback(llvm::MCInst &Inst, uint32_t insn, - uint64_t Address, - const void *Decoder) { - unsigned Rt = fieldFromInstruction(insn, 0, 5); - unsigned Rn = fieldFromInstruction(insn, 5, 5); - unsigned Imm9 = fieldFromInstruction(insn, 12, 9); - unsigned S = fieldFromInstruction(insn, 22, 1); - - unsigned Imm = Imm9 | (S << 9); - - // Address writeback - DecodeGPR64spRegisterClass(Inst, Rn, Address, Decoder); - // Destination - DecodeGPR64RegisterClass(Inst, Rt, Address, Decoder); - // Address - DecodeGPR64spRegisterClass(Inst, Rn, Address, Decoder); - // Offset - DecodeSImm<10>(Inst, Imm, Address, Decoder); - - return Success; -}