[llvm] r197536 - Fix N32 registers and stack alignment.

Rafael Espindola rafael.espindola at gmail.com
Tue Dec 17 15:15:58 PST 2013


Author: rafael
Date: Tue Dec 17 17:15:58 2013
New Revision: 197536

URL: http://llvm.org/viewvc/llvm-project?rev=197536&view=rev
Log:
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.

Modified:
    llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp

Modified: llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp?rev=197536&r1=197535&r2=197536&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp Tue Dec 17 17:15:58 2013
@@ -65,7 +65,7 @@ static std::string computeDataLayout(con
   // 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";





More information about the llvm-commits mailing list