mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-25 04:39:44 +00:00
R600: Align functions to 256 bytes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219002 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
63688e622c
commit
77859c9e9c
@ -97,6 +97,10 @@ void AMDGPUAsmPrinter::EmitEndOfAsmFile(Module &M) {
|
||||
}
|
||||
|
||||
bool AMDGPUAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
||||
|
||||
// The starting address of all shader programs must be 256 bytes aligned.
|
||||
MF.setAlignment(8);
|
||||
|
||||
SetupMachineFunction(MF);
|
||||
|
||||
EmitFunctionHeader();
|
||||
|
@ -57,9 +57,7 @@ public:
|
||||
assert(!"Not implemented");
|
||||
}
|
||||
bool mayNeedRelaxation(const MCInst &Inst) const override { return false; }
|
||||
bool writeNopData(uint64_t Count, MCObjectWriter *OW) const override {
|
||||
return true;
|
||||
}
|
||||
bool writeNopData(uint64_t Count, MCObjectWriter *OW) const override;
|
||||
|
||||
const MCFixupKindInfo &getFixupKindInfo(MCFixupKind Kind) const override;
|
||||
};
|
||||
@ -116,6 +114,13 @@ const MCFixupKindInfo &AMDGPUAsmBackend::getFixupKindInfo(
|
||||
return Infos[Kind - FirstTargetFixupKind];
|
||||
}
|
||||
|
||||
bool AMDGPUAsmBackend::writeNopData(uint64_t Count, MCObjectWriter *OW) const {
|
||||
for (unsigned i = 0; i < Count; ++i)
|
||||
OW->Write8(0);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// ELFAMDGPUAsmBackend class
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
@ -5,6 +5,8 @@
|
||||
; ELF-CHECK: Name: .AMDGPU.config
|
||||
; ELF-CHECK: Type: SHT_PROGBITS
|
||||
|
||||
; CONFIG-CHECK: .align 256
|
||||
; CONFIG-CHECK: test:
|
||||
; CONFIG-CHECK: .section .AMDGPU.config
|
||||
; CONFIG-CHECK-NEXT: .long 45096
|
||||
; CONFIG-CHECK-NEXT: .long 0
|
||||
|
Loading…
Reference in New Issue
Block a user