[PATCH] [Mips][Disassembler] Disassembler checking N64 feature instead of GP64
Vladimir Medic
Vladimir.Medic at imgtec.com
Mon Dec 15 09:20:45 PST 2014
Hi dsanders,
The single check for N64 inside MipsDisassemblerBase's subclasses is actually wrong. It should be testing for FeatureGP64bit.
http://reviews.llvm.org/D6660
Files:
lib/Target/Mips/Disassembler/MipsDisassembler.cpp
Index: lib/Target/Mips/Disassembler/MipsDisassembler.cpp
===================================================================
--- lib/Target/Mips/Disassembler/MipsDisassembler.cpp
+++ lib/Target/Mips/Disassembler/MipsDisassembler.cpp
@@ -36,15 +36,15 @@
MipsDisassemblerBase(const MCSubtargetInfo &STI, MCContext &Ctx,
bool IsBigEndian)
: MCDisassembler(STI, Ctx),
- IsN64(STI.getFeatureBits() & Mips::FeatureN64),
+ IsGP64Bit(STI.getFeatureBits() & Mips::FeatureGP64Bit),
IsBigEndian(IsBigEndian) {}
virtual ~MipsDisassemblerBase() {}
- bool isN64() const { return IsN64; }
+ bool isGP64Bit() const { return IsGP64Bit; }
private:
- bool IsN64;
+ bool IsGP64Bit;
protected:
bool IsBigEndian;
};
@@ -974,7 +974,7 @@
unsigned RegNo,
uint64_t Address,
const void *Decoder) {
- if (static_cast<const MipsDisassembler *>(Decoder)->isN64())
+ if (static_cast<const MipsDisassembler *>(Decoder)->isGP64Bit())
return DecodeGPR64RegisterClass(Inst, RegNo, Address, Decoder);
return DecodeGPR32RegisterClass(Inst, RegNo, Address, Decoder);
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6660.17289.patch
Type: text/x-patch
Size: 1249 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141215/dbeea7bc/attachment.bin>
More information about the llvm-commits
mailing list