mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-16 16:48:02 +00:00
Implement the SVR4 byval alignment for aggregates. Fixing a FIXME.
llvm-svn: 153876
This commit is contained in:
parent
af228a1538
commit
2460282f66
@ -446,7 +446,16 @@ unsigned PPCTargetLowering::getByValTypeAlignment(Type *Ty) const {
|
|||||||
// Darwin passes everything on 4 byte boundary.
|
// Darwin passes everything on 4 byte boundary.
|
||||||
if (TM.getSubtarget<PPCSubtarget>().isDarwin())
|
if (TM.getSubtarget<PPCSubtarget>().isDarwin())
|
||||||
return 4;
|
return 4;
|
||||||
// FIXME SVR4 TBD
|
|
||||||
|
// 16byte and wider vectors are passed on 16byte boundary.
|
||||||
|
if (VectorType *VTy = dyn_cast<VectorType>(Ty))
|
||||||
|
if (VTy->getBitWidth() >= 128)
|
||||||
|
return 16;
|
||||||
|
|
||||||
|
// The rest is 8 on PPC64 and 4 on PPC32 boundary.
|
||||||
|
if (PPCSubTarget.isPPC64())
|
||||||
|
return 8;
|
||||||
|
|
||||||
return 4;
|
return 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user