mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-23 16:19:52 +00:00
ARM64: disable generation of .loh directives outside MachO.
Part of PR19455. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206611 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -165,7 +165,8 @@ bool ARM64PassConfig::addPreEmitPass() {
|
|||||||
// Relax conditional branch instructions if they're otherwise out of
|
// Relax conditional branch instructions if they're otherwise out of
|
||||||
// range of their destination.
|
// range of their destination.
|
||||||
addPass(createARM64BranchRelaxation());
|
addPass(createARM64BranchRelaxation());
|
||||||
if (TM->getOptLevel() != CodeGenOpt::None && EnableCollectLOH)
|
if (TM->getOptLevel() != CodeGenOpt::None && EnableCollectLOH &&
|
||||||
|
TM->getSubtarget<ARM64Subtarget>().isTargetMachO())
|
||||||
addPass(createARM64CollectLOHPass());
|
addPass(createARM64CollectLOHPass());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
; RUN: llc -mtriple=arm64-apple-ios -O2 -arm64-collect-loh -arm64-collect-loh-bb-only=false < %s -o - | FileCheck %s
|
; RUN: llc -mtriple=arm64-apple-ios -O2 -arm64-collect-loh -arm64-collect-loh-bb-only=false < %s -o - | FileCheck %s
|
||||||
|
; RUN: llc -mtriple=arm64-linux-gnu -O2 -arm64-collect-loh -arm64-collect-loh-bb-only=false < %s -o - | FileCheck %s --check-prefix=CHECK-ELF
|
||||||
|
|
||||||
|
; CHECK-ELF-NOT: .loh
|
||||||
|
; CHECK-ELF-NOT: AdrpAdrp
|
||||||
|
; CHECK-ELF-NOT: AdrpAdd
|
||||||
|
; CHECK-ELF-NOT: AdrpLdrGot
|
||||||
|
|
||||||
@a = internal unnamed_addr global i32 0, align 4
|
@a = internal unnamed_addr global i32 0, align 4
|
||||||
@b = external global i32
|
@b = external global i32
|
||||||
|
|||||||
Reference in New Issue
Block a user