1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00

[PowerPC] Darwin byval arguments are not immutable

On PPC/Darwin, byval arguments occur at fixed stack offsets in the callee's
frame, but are not immutable -- the pointer value is directly available to the
higher-level code as the address of the argument, and the value of the byval
argument can be modified at the IR level.

This is necessary, but not sufficient, to fix PR20280. When PR20280 is fixed in
a follow-up commit, its test case will cover this change.

llvm-svn: 215793
This commit is contained in:
Hal Finkel 2014-08-16 00:16:29 +00:00
parent 3e323f9026
commit 519c3f0279

View File

@ -3066,7 +3066,7 @@ PPCTargetLowering::LowerFormalArguments_Darwin(
CurArgOffset = CurArgOffset + (4 - ObjSize); CurArgOffset = CurArgOffset + (4 - ObjSize);
} }
// The value of the object is its address. // The value of the object is its address.
int FI = MFI->CreateFixedObject(ObjSize, CurArgOffset, true); int FI = MFI->CreateFixedObject(ObjSize, CurArgOffset, false);
SDValue FIN = DAG.getFrameIndex(FI, PtrVT); SDValue FIN = DAG.getFrameIndex(FI, PtrVT);
InVals.push_back(FIN); InVals.push_back(FIN);
if (ObjSize==1 || ObjSize==2) { if (ObjSize==1 || ObjSize==2) {