Instructions for Book E PPC should be word aligned, set function alignment to reflect this

llvm-svn: 142194
This commit is contained in:
Hal Finkel 2011-10-17 17:01:41 +00:00
parent b7d9ee707d
commit 0ade47acd0
1 changed files with 10 additions and 3 deletions

View File

@ -402,9 +402,16 @@ PPCTargetLowering::PPCTargetLowering(PPCTargetMachine &TM)
setLibcallName(RTLIB::EXP2_PPCF128, "exp2l$LDBL128");
}
setMinFunctionAlignment(2);
if (PPCSubTarget.isDarwin())
setPrefFunctionAlignment(4);
if (PPCSubTarget.isBookE()) {
// Book E: Instructions are always four bytes long and word-aligned.
setMinFunctionAlignment(4);
setPrefFunctionAlignment(8);
}
else {
setMinFunctionAlignment(2);
if (PPCSubTarget.isDarwin())
setPrefFunctionAlignment(4);
}
setInsertFencesForAtomic(true);