mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Add support for mergeable sections back into the XCore backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79368 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3731604f1f
commit
1123135dbf
@ -28,11 +28,24 @@ void XCoreTargetObjectFile::Initialize(MCContext &Ctx, const TargetMachine &TM){
|
|||||||
MCSectionXCore::SHF_DP_SECTION,
|
MCSectionXCore::SHF_DP_SECTION,
|
||||||
SectionKind::getBSS(), false, getContext());
|
SectionKind::getBSS(), false, getContext());
|
||||||
|
|
||||||
// For now, disable lowering of mergable sections, just drop everything into
|
MergeableConst4Section =
|
||||||
// ReadOnly.
|
MCSectionXCore::Create(".cp.rodata.cst4", MCSectionELF::SHT_PROGBITS,
|
||||||
MergeableConst4Section = 0;
|
MCSectionELF::SHF_ALLOC | MCSectionELF::SHF_MERGE |
|
||||||
MergeableConst8Section = 0;
|
MCSectionXCore::SHF_CP_SECTION,
|
||||||
MergeableConst16Section = 0;
|
SectionKind::getMergeableConst4(), false,
|
||||||
|
getContext());
|
||||||
|
MergeableConst8Section =
|
||||||
|
MCSectionXCore::Create(".cp.rodata.cst8", MCSectionELF::SHT_PROGBITS,
|
||||||
|
MCSectionELF::SHF_ALLOC | MCSectionELF::SHF_MERGE |
|
||||||
|
MCSectionXCore::SHF_CP_SECTION,
|
||||||
|
SectionKind::getMergeableConst8(), false,
|
||||||
|
getContext());
|
||||||
|
MergeableConst16Section =
|
||||||
|
MCSectionXCore::Create(".cp.rodata.cst16", MCSectionELF::SHT_PROGBITS,
|
||||||
|
MCSectionELF::SHF_ALLOC | MCSectionELF::SHF_MERGE |
|
||||||
|
MCSectionXCore::SHF_CP_SECTION,
|
||||||
|
SectionKind::getMergeableConst16(), false,
|
||||||
|
getContext());
|
||||||
|
|
||||||
// TLS globals are lowered in the backend to arrays indexed by the current
|
// TLS globals are lowered in the backend to arrays indexed by the current
|
||||||
// thread id. After lowering they require no special handling by the linker
|
// thread id. After lowering they require no special handling by the linker
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
; RUN: llvm-as < %s | llc -march=xcore -mcpu=xs1b-generic | FileCheck %s
|
; RUN: llvm-as < %s | llc -march=xcore -mcpu=xs1b-generic | FileCheck %s
|
||||||
|
|
||||||
; CHECK: .section .cp.rodata,"ac",@progbits
|
; CHECK: .section .cp.rodata.cst4,"aMc",@progbits,4
|
||||||
; CHECK: .LCPI1_0:
|
; CHECK: .LCPI1_0:
|
||||||
; CHECK: .long 12345678
|
; CHECK: .long 12345678
|
||||||
; CHECK: f:
|
; CHECK: f:
|
||||||
|
@ -68,7 +68,7 @@ entry:
|
|||||||
; CHECK: G2:
|
; CHECK: G2:
|
||||||
|
|
||||||
@G3 = constant i32 9401
|
@G3 = constant i32 9401
|
||||||
; CHECK: .section .cp.rodata,"ac",@progbits
|
; CHECK: .section .cp.rodata.cst4,"aMc",@progbits,4
|
||||||
; CHECK: G3:
|
; CHECK: G3:
|
||||||
|
|
||||||
@G4 = global i32* @G1
|
@G4 = global i32* @G1
|
||||||
|
Loading…
Reference in New Issue
Block a user