summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips/MCTargetDesc
diff options
context:
space:
mode:
authorDaniel Sanders <daniel.sanders@imgtec.com>2015-08-17 10:11:55 +0000
committerDaniel Sanders <daniel.sanders@imgtec.com>2015-08-17 10:11:55 +0000
commita39ef1c68fcd197ffb2fe148406492905376cda9 (patch)
tree7cc229e2154728245455e9f485c96d325aa87dd4 /llvm/lib/Target/Mips/MCTargetDesc
parentadc4e9c4143e087076fba62ce7507991cbd242e2 (diff)
downloadbcm5719-llvm-a39ef1c68fcd197ffb2fe148406492905376cda9.tar.gz
bcm5719-llvm-a39ef1c68fcd197ffb2fe148406492905376cda9.zip
[mips] [IAS] Add support for the DLA pseudo-instruction and fix problems with DLI
Summary: It is the same as LA, except that it can also load 64-bit addresses and it only works on 64-bit MIPS architectures. Reviewers: tomatabacu, seanbruno, vkalintiris Subscribers: brooks, seanbruno, emaste, llvm-commits Differential Revision: http://reviews.llvm.org/D9524 llvm-svn: 245208
Diffstat (limited to 'llvm/lib/Target/Mips/MCTargetDesc')
-rw-r--r--llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp4
-rw-r--r--llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.h2
2 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp b/llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp
index 14c5a34602a..bd1feb81d86 100644
--- a/llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp
+++ b/llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp
@@ -107,6 +107,10 @@ unsigned MipsABIInfo::GetNullPtr() const {
return ArePtrs64bit() ? Mips::ZERO_64 : Mips::ZERO;
}
+unsigned MipsABIInfo::GetZeroReg() const {
+ return AreGprs64bit() ? Mips::ZERO_64 : Mips::ZERO;
+}
+
unsigned MipsABIInfo::GetPtrAdduOp() const {
return ArePtrs64bit() ? Mips::DADDu : Mips::ADDu;
}
diff --git a/llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.h b/llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.h
index 926da905cb6..cb3df44c800 100644
--- a/llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.h
+++ b/llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.h
@@ -67,10 +67,12 @@ public:
unsigned GetFramePtr() const;
unsigned GetBasePtr() const;
unsigned GetNullPtr() const;
+ unsigned GetZeroReg() const;
unsigned GetPtrAdduOp() const;
unsigned GetPtrAddiuOp() const;
unsigned GetGPRMoveOp() const;
inline bool ArePtrs64bit() const { return IsN64(); }
+ inline bool AreGprs64bit() const { return IsN32() || IsN64(); }
unsigned GetEhDataReg(unsigned I) const;
};
OpenPOWER on IntegriCloud