summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2011-10-17 17:01:41 +0000
committerHal Finkel <hfinkel@anl.gov>2011-10-17 17:01:41 +0000
commit0ade47acd0f57ac294c5ebe7a184b09d55e90604 (patch)
treeb6cb11345afac53c3753979e9457adc4789460a6 /llvm/lib/Target/PowerPC/PPCISelLowering.cpp
parentb7d9ee707d911359673388c04f688a732e613cbb (diff)
downloadbcm5719-llvm-0ade47acd0f57ac294c5ebe7a184b09d55e90604.tar.gz
bcm5719-llvm-0ade47acd0f57ac294c5ebe7a184b09d55e90604.zip
Instructions for Book E PPC should be word aligned, set function alignment to reflect this
llvm-svn: 142194
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCISelLowering.cpp')
-rw-r--r--llvm/lib/Target/PowerPC/PPCISelLowering.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
index d6b8a9ee93c..dcc05683682 100644
--- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -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);
OpenPOWER on IntegriCloud