summaryrefslogtreecommitdiff
path: root/lib/Target/Mips/MipsTargetMachine.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-12-17 23:15:58 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-12-17 23:15:58 +0000
commitf07d462beb3edb6f17ad06893cc74df96f2e4b60 (patch)
tree97d04b5bf03a1ab84e915bc491fa175082c9f022 /lib/Target/Mips/MipsTargetMachine.cpp
parent18b3d1383b4cb1928fe22b1178714b55147cbb10 (diff)
downloadllvm-f07d462beb3edb6f17ad06893cc74df96f2e4b60.tar.gz
llvm-f07d462beb3edb6f17ad06893cc74df96f2e4b60.tar.bz2
llvm-f07d462beb3edb6f17ad06893cc74df96f2e4b60.tar.xz
Fix N32 registers and stack alignment.
This patch fixes the "n" and "S" components of the data layout for mips. Clang already gets this right. This will be tested in clang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197536 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MipsTargetMachine.cpp')
-rw-r--r--lib/Target/Mips/MipsTargetMachine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/Mips/MipsTargetMachine.cpp b/lib/Target/Mips/MipsTargetMachine.cpp
index 6cf6ae6684..91c9d69108 100644
--- a/lib/Target/Mips/MipsTargetMachine.cpp
+++ b/lib/Target/Mips/MipsTargetMachine.cpp
@@ -65,7 +65,7 @@ static std::string computeDataLayout(const MipsSubtarget &ST) {
// 32 bit registers are always available and the stack is at least 64 bit
// aligned. On N64 64 bit registers are also available and the stack is
// 128 bit aligned.
- if (ST.isABI_N64())
+ if (ST.isABI_N64() || ST.isABI_N32())
Ret += "-n32:64-S128";
else
Ret += "-n32-S64";