mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-03 13:31:05 +00:00
ELF symbol table field st_other support,
excluding visibility bits. Mips (o32 abi) specific e_header setting. EF_MIPS_ABI_O32 needs to be set in the ELF header flags for o32 abi output. Contributer: Reed Kotler git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175569 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
bcff7b7734
commit
5cdeca8b1d
@ -738,6 +738,7 @@ enum {
|
|||||||
EF_MIPS_NOREORDER = 0x00000001, // Don't reorder instructions
|
EF_MIPS_NOREORDER = 0x00000001, // Don't reorder instructions
|
||||||
EF_MIPS_PIC = 0x00000002, // Position independent code
|
EF_MIPS_PIC = 0x00000002, // Position independent code
|
||||||
EF_MIPS_CPIC = 0x00000004, // Call object with Position independent code
|
EF_MIPS_CPIC = 0x00000004, // Call object with Position independent code
|
||||||
|
EF_MIPS_ABI_O32 = 0x00001000, // This file follows the first MIPS 32 bit ABI
|
||||||
|
|
||||||
//ARCH_ASE
|
//ARCH_ASE
|
||||||
EF_MIPS_MICROMIPS = 0x02000000, // microMIPS
|
EF_MIPS_MICROMIPS = 0x02000000, // microMIPS
|
||||||
|
@ -54,6 +54,10 @@ namespace llvm {
|
|||||||
if (Subtarget.inMicroMipsMode())
|
if (Subtarget.inMicroMipsMode())
|
||||||
EFlags |= ELF::EF_MIPS_MICROMIPS;
|
EFlags |= ELF::EF_MIPS_MICROMIPS;
|
||||||
|
|
||||||
|
// ABI
|
||||||
|
if (Subtarget.isABI_O32())
|
||||||
|
EFlags |= ELF::EF_MIPS_ABI_O32;
|
||||||
|
|
||||||
// Relocation Model
|
// Relocation Model
|
||||||
Reloc::Model RM = Subtarget.getRelocationModel();
|
Reloc::Model RM = Subtarget.getRelocationModel();
|
||||||
if (RM == Reloc::PIC_ || RM == Reloc::Default)
|
if (RM == Reloc::PIC_ || RM == Reloc::Default)
|
||||||
|
@ -28,22 +28,22 @@
|
|||||||
; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips32r2 -mattr=+mips16 -relocation-model=pic %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=CHECK-LE32R2-MIPS16 %s
|
; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips32r2 -mattr=+mips16 -relocation-model=pic %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=CHECK-LE32R2-MIPS16 %s
|
||||||
|
|
||||||
; 32(R1) bit with NO_REORDER and static
|
; 32(R1) bit with NO_REORDER and static
|
||||||
; CHECK-BE32: ('e_flags', 0x50000001)
|
; CHECK-BE32: ('e_flags', 0x50001001)
|
||||||
;
|
;
|
||||||
; 32(R1) bit with NO_REORDER and PIC
|
; 32(R1) bit with NO_REORDER and PIC
|
||||||
; CHECK-BE32_PIC: ('e_flags', 0x50000003)
|
; CHECK-BE32_PIC: ('e_flags', 0x50001003)
|
||||||
;
|
;
|
||||||
; 32R2 bit with NO_REORDER and static
|
; 32R2 bit with NO_REORDER and static
|
||||||
; CHECK-BE32R2: ('e_flags', 0x70000001)
|
; CHECK-BE32R2: ('e_flags', 0x70001001)
|
||||||
;
|
;
|
||||||
; 32R2 bit with NO_REORDER and PIC
|
; 32R2 bit with NO_REORDER and PIC
|
||||||
; CHECK-BE32R2_PIC: ('e_flags', 0x70000003)
|
; CHECK-BE32R2_PIC: ('e_flags', 0x70001003)
|
||||||
;
|
;
|
||||||
; 32R2 bit MICROMIPS with NO_REORDER and static
|
; 32R2 bit MICROMIPS with NO_REORDER and static
|
||||||
; CHECK-BE32R2-MICROMIPS: ('e_flags', 0x72000001)
|
; CHECK-BE32R2-MICROMIPS: ('e_flags', 0x72001001)
|
||||||
;
|
;
|
||||||
; 32R2 bit MICROMIPS with NO_REORDER and PIC
|
; 32R2 bit MICROMIPS with NO_REORDER and PIC
|
||||||
;CHECK-BE32R2-MICROMIPS_PIC: ('e_flags', 0x72000003)
|
;CHECK-BE32R2-MICROMIPS_PIC: ('e_flags', 0x72001003)
|
||||||
;
|
;
|
||||||
; 64(R1) bit with NO_REORDER and static
|
; 64(R1) bit with NO_REORDER and static
|
||||||
; CHECK-BE64: ('e_flags', 0x60000001)
|
; CHECK-BE64: ('e_flags', 0x60000001)
|
||||||
@ -58,7 +58,7 @@
|
|||||||
; CHECK-BE64R2_PIC: ('e_flags', 0x80000003)
|
; CHECK-BE64R2_PIC: ('e_flags', 0x80000003)
|
||||||
;
|
;
|
||||||
; 32R2 bit MIPS16 with PIC
|
; 32R2 bit MIPS16 with PIC
|
||||||
; CHECK-LE32R2-MIPS16: ('e_flags', 0x74000002)
|
; CHECK-LE32R2-MIPS16: ('e_flags', 0x74001002)
|
||||||
|
|
||||||
define i32 @main() nounwind {
|
define i32 @main() nounwind {
|
||||||
entry:
|
entry:
|
||||||
|
Loading…
Reference in New Issue
Block a user