mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-30 00:24:00 +00:00
getFunctionAlignment should return log2 alignment.
llvm-svn: 83242
This commit is contained in:
parent
d93fbb28ed
commit
8cf9f56cca
@ -542,7 +542,7 @@ const char *ARMTargetLowering::getTargetNodeName(unsigned Opcode) const {
|
||||
|
||||
/// getFunctionAlignment - Return the Log2 alignment of this function.
|
||||
unsigned ARMTargetLowering::getFunctionAlignment(const Function *F) const {
|
||||
return getTargetMachine().getSubtarget<ARMSubtarget>().isThumb() ? 1 : 2;
|
||||
return getTargetMachine().getSubtarget<ARMSubtarget>().isThumb() ? 0 : 1;
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
@ -252,8 +252,9 @@ bool ARMAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
||||
|
||||
printVisibility(CurrentFnName, F->getVisibility());
|
||||
|
||||
unsigned FnAlign = 1 << MF.getAlignment(); // MF alignment is log2.
|
||||
if (AFI->isThumbFunction()) {
|
||||
EmitAlignment(MF.getAlignment(), F, AFI->getAlign());
|
||||
EmitAlignment(FnAlign, F, AFI->getAlign());
|
||||
O << "\t.code\t16\n";
|
||||
O << "\t.thumb_func";
|
||||
if (Subtarget->isTargetDarwin())
|
||||
@ -261,7 +262,7 @@ bool ARMAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
||||
O << "\n";
|
||||
InCPMode = false;
|
||||
} else {
|
||||
EmitAlignment(MF.getAlignment(), F);
|
||||
EmitAlignment(FnAlign, F);
|
||||
}
|
||||
|
||||
O << CurrentFnName << ":\n";
|
||||
|
Loading…
x
Reference in New Issue
Block a user