summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/lib/Target/Mips/MipsABIInfo.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-01-18 14:14:47 +0000
committerdim <dim@FreeBSD.org>2015-01-18 14:14:47 +0000
commitc074a2b0d05fdd11d61e6c5ffa970c806be2f31a (patch)
tree0e56d6fc0fbb158ec2ac946d1e22170e0107492d /contrib/llvm/lib/Target/Mips/MipsABIInfo.cpp
parent814696f72012ae32daa581d7a1d5253a9b439b09 (diff)
parent3c7e7a1538a873b0d3b012ef8811969ac4552c2a (diff)
downloadFreeBSD-src-c074a2b0d05fdd11d61e6c5ffa970c806be2f31a.zip
FreeBSD-src-c074a2b0d05fdd11d61e6c5ffa970c806be2f31a.tar.gz
Upgrade our copy of clang and llvm to 3.5.1 release. This is a bugfix
only release, no new features have been added. Please note that this version requires C++11 support to build; see UPDATING for more information. Release notes for llvm and clang can be found here: <http://llvm.org/releases/3.5.1/docs/ReleaseNotes.html> <http://llvm.org/releases/3.5.1/tools/clang/docs/ReleaseNotes.html> MFC after: 1 month X-MFC-With: 276479
Diffstat (limited to 'contrib/llvm/lib/Target/Mips/MipsABIInfo.cpp')
-rw-r--r--contrib/llvm/lib/Target/Mips/MipsABIInfo.cpp45
1 files changed, 45 insertions, 0 deletions
diff --git a/contrib/llvm/lib/Target/Mips/MipsABIInfo.cpp b/contrib/llvm/lib/Target/Mips/MipsABIInfo.cpp
new file mode 100644
index 0000000..f885369
--- /dev/null
+++ b/contrib/llvm/lib/Target/Mips/MipsABIInfo.cpp
@@ -0,0 +1,45 @@
+//===---- MipsABIInfo.cpp - Information about MIPS ABI's ------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "MipsABIInfo.h"
+#include "MipsRegisterInfo.h"
+
+using namespace llvm;
+
+namespace {
+static const MCPhysReg O32IntRegs[4] = {Mips::A0, Mips::A1, Mips::A2, Mips::A3};
+
+static const MCPhysReg Mips64IntRegs[8] = {
+ Mips::A0_64, Mips::A1_64, Mips::A2_64, Mips::A3_64,
+ Mips::T0_64, Mips::T1_64, Mips::T2_64, Mips::T3_64};
+}
+
+const ArrayRef<MCPhysReg> MipsABIInfo::GetByValArgRegs() const {
+ if (IsO32())
+ return makeArrayRef(O32IntRegs);
+ if (IsN32() || IsN64())
+ return makeArrayRef(Mips64IntRegs);
+ llvm_unreachable("Unhandled ABI");
+}
+
+const ArrayRef<MCPhysReg> MipsABIInfo::GetVarArgRegs() const {
+ if (IsO32())
+ return makeArrayRef(O32IntRegs);
+ if (IsN32() || IsN64())
+ return makeArrayRef(Mips64IntRegs);
+ llvm_unreachable("Unhandled ABI");
+}
+
+unsigned MipsABIInfo::GetCalleeAllocdArgSizeInBytes(CallingConv::ID CC) const {
+ if (IsO32())
+ return CC != CallingConv::Fast ? 16 : 0;
+ if (IsN32() || IsN64() || IsEABI())
+ return 0;
+ llvm_unreachable("Unhandled ABI");
+}
OpenPOWER on IntegriCloud