summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips/MipsRegisterInfo.h
diff options
context:
space:
mode:
authorDaniel Sanders <daniel.sanders@imgtec.com>2016-05-09 13:38:25 +0000
committerDaniel Sanders <daniel.sanders@imgtec.com>2016-05-09 13:38:25 +0000
commite473dc937f59a9fefe450725ca4774a5245826a2 (patch)
tree851a062dab112e3d397ff8372a7b0b713ee1c38b /llvm/lib/Target/Mips/MipsRegisterInfo.h
parent769eb0d5d57a37a3668c6fffef1bb61f8ee76635 (diff)
downloadbcm5719-llvm-e473dc937f59a9fefe450725ca4774a5245826a2.tar.gz
bcm5719-llvm-e473dc937f59a9fefe450725ca4774a5245826a2.zip
[mips][micromips] Make getPointerRegClass() result depend on the instruction.
Summary: Previously, it returned the GPR16MMRegClass for all instructions which was incorrect for instructions like lwsp/lwgp and unnecesarily restricted the permitted registers for instructions like lw32. This fixes quite a few of the -verify-machineinstrs errors reported in PR27458. I've only added -verify-machineinstrs to one test in this change since I understand there is a plan to enable the verifier by default. Reviewers: hvarga, zbuljan, zoran.jovanovic, sdardis Subscribers: dsanders, llvm-commits, sdardis Differential Revision: http://reviews.llvm.org/D19873 llvm-svn: 268918
Diffstat (limited to 'llvm/lib/Target/Mips/MipsRegisterInfo.h')
-rw-r--r--llvm/lib/Target/Mips/MipsRegisterInfo.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/lib/Target/Mips/MipsRegisterInfo.h b/llvm/lib/Target/Mips/MipsRegisterInfo.h
index 286fe8e3255..32f835e8310 100644
--- a/llvm/lib/Target/Mips/MipsRegisterInfo.h
+++ b/llvm/lib/Target/Mips/MipsRegisterInfo.h
@@ -23,6 +23,18 @@
namespace llvm {
class MipsRegisterInfo : public MipsGenRegisterInfo {
public:
+ enum class MipsPtrClass {
+ /// The default register class for integer values.
+ Default = 0,
+ /// The subset of registers permitted in certain microMIPS instructions
+ /// such as lw16.
+ GPR16MM = 1,
+ /// The stack pointer only.
+ StackPointer = 2,
+ /// The global pointer only.
+ GlobalPointer = 3,
+ };
+
MipsRegisterInfo();
/// Get PIC indirect call register
OpenPOWER on IntegriCloud