diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-04-21 02:29:33 +0000 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-04-21 02:29:33 +0000 |
commit | 6b93a26bbafbfe94f22b895c0677f3e532393fcb (patch) | |
tree | 7130614f17c57345c12f3b475aa66fbacb0c6d49 /user/llvm7/ppc32-calling-convention.patch | |
parent | 187dc661d66da6fb33295a37aa6f84ca4f9af90d (diff) | |
download | packages-6b93a26bbafbfe94f22b895c0677f3e532393fcb.tar.gz packages-6b93a26bbafbfe94f22b895c0677f3e532393fcb.tar.bz2 packages-6b93a26bbafbfe94f22b895c0677f3e532393fcb.tar.xz packages-6b93a26bbafbfe94f22b895c0677f3e532393fcb.zip |
user/llvm8: bump to 8.0.0
Diffstat (limited to 'user/llvm7/ppc32-calling-convention.patch')
-rw-r--r-- | user/llvm7/ppc32-calling-convention.patch | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/user/llvm7/ppc32-calling-convention.patch b/user/llvm7/ppc32-calling-convention.patch deleted file mode 100644 index 2e6d66427..000000000 --- a/user/llvm7/ppc32-calling-convention.patch +++ /dev/null @@ -1,69 +0,0 @@ -Index: trunk/lib/Target/PowerPC/PPCISelLowering.cpp -=================================================================== ---- trunk/lib/Target/PowerPC/PPCISelLowering.cpp -+++ trunk/lib/Target/PowerPC/PPCISelLowering.cpp -@@ -3511,9 +3511,14 @@ - // Argument stored in memory. - assert(VA.isMemLoc()); - -+ // Get the extended size of the argument type in stack - unsigned ArgSize = VA.getLocVT().getStoreSize(); -- int FI = MFI.CreateFixedObject(ArgSize, VA.getLocMemOffset(), -- isImmutable); -+ // Get the actual size of the argument type -+ unsigned ObjSize = VA.getValVT().getStoreSize(); -+ unsigned ArgOffset = VA.getLocMemOffset(); -+ // Stack objects in PPC32 are right justified. -+ ArgOffset += ArgSize - ObjSize; -+ int FI = MFI.CreateFixedObject(ArgSize, ArgOffset, isImmutable); - - // Create load nodes to retrieve arguments from the stack. - SDValue FIN = DAG.getFrameIndex(FI, PtrVT); -@@ -5468,10 +5473,15 @@ - Arg = PtrOff; - } - -- if (VA.isRegLoc()) { -- if (Arg.getValueType() == MVT::i1) -- Arg = DAG.getNode(ISD::ZERO_EXTEND, dl, MVT::i32, Arg); -+ // When useCRBits() is true, there can be i1 arguments. -+ // It is because getRegisterType(MVT::i1) => MVT::i1, -+ // and for other integer types getRegisterType() => MVT::i32. -+ // Extend i1 and ensure callee will get i32. -+ if (Arg.getValueType() == MVT::i1) -+ Arg = DAG.getNode(Flags.isSExt() ? ISD::SIGN_EXTEND : ISD::ZERO_EXTEND, -+ dl, MVT::i32, Arg); - -+ if (VA.isRegLoc()) { - seenFloatArg |= VA.getLocVT().isFloatingPoint(); - // Put argument in a physical register. - RegsToPass.push_back(std::make_pair(VA.getLocReg(), Arg)); -Index: trunk/test/CodeGen/PowerPC/ppc32-i1-stack-arguments-abi-bug.ll -=================================================================== ---- trunk/test/CodeGen/PowerPC/ppc32-i1-stack-arguments-abi-bug.ll -+++ trunk/test/CodeGen/PowerPC/ppc32-i1-stack-arguments-abi-bug.ll -@@ -0,0 +1,24 @@ -+; RUN: llc -verify-machineinstrs < %s -mcpu=ppc32 -mattr=+crbits | FileCheck %s -+target triple = "powerpc-unknown-linux-gnu" -+ -+define void @check_callee( -+ i32, i32, i32, i32, -+ i32, i32, i32, i32, -+ i1 zeroext %s1 -+) { -+ call void @check_caller( -+ i32 9, i32 9, i32 9, i32 9, -+ i32 9, i32 9, i32 9, i32 9, -+ i1 zeroext %s1) -+ ret void -+} -+ -+; CHECK-LABEL: @check_callee -+; CHECK: lbz {{[0-9]+}}, 27(1) -+; CHECK: stw {{[0-9]+}}, 8(1) -+ -+declare void @check_caller( -+ i32, i32, i32, i32, -+ i32, i32, i32, i32, -+ i1 zeroext -+) |