mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-06 02:29:51 +00:00
getFunctionAlignment should return log2 alignment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83242 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3825ce8c24
commit
048e36f536
@ -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