Skip to content

Commit

Permalink
Implement the SVR4 byval alignment for aggregates. Fixing a FIXME.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153876 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
rdivacky committed Apr 2, 2012
1 parent 545b962 commit 466958c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/Target/PowerPC/PPCISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,16 @@ unsigned PPCTargetLowering::getByValTypeAlignment(Type *Ty) const {
// Darwin passes everything on 4 byte boundary.
if (TM.getSubtarget<PPCSubtarget>().isDarwin())
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;
}

Expand Down

0 comments on commit 466958c

Please sign in to comment.