[Mips] Add test to check jal -> jalx conversion

No functional changes.

llvm-svn: 239180
This commit is contained in:
Simon Atanasyan 2015-06-05 18:26:44 +00:00
parent 6eadaf1921
commit 24945e6745
1 changed files with 71 additions and 0 deletions

View File

@ -0,0 +1,71 @@
# Check jal => jalx conversion in case of mixed microMIPS and regular code.
# RUN: yaml2obj -format=elf %s > %t.o
# RUN: lld -flavor gnu -target mipsel -e T1 -o %t.exe %t.o
# RUN: llvm-objdump -s %t.exe | FileCheck -check-prefix=RAW %s
# RUN: llvm-nm %t.exe | FileCheck -check-prefix=SYM %s
# RAW: Contents of section .text:
# RAW-NEXT: 400110 00000000 44001074 10f04500 46001074
# SYM: 00400118 T M1
# SYM: 00400110 T M2
# SYM: 0040011c T T1
# SYM: 00400114 T T2
FileHeader:
Class: ELFCLASS32
Data: ELFDATA2LSB
Type: ET_REL
Machine: EM_MIPS
Flags: [EF_MIPS_NOREORDER, EF_MIPS_CPIC, EF_MIPS_ABI_O32,
EF_MIPS_MICROMIPS, EF_MIPS_ARCH_32R2]
Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
AddressAlign: 16
Content: "000000000000000c00f400000000000c"
# ^ M2 ^ T2 ^ M1 ^ T1
- Name: .rel.text
Type: SHT_REL
Link: .symtab
AddressAlign: 4
Info: .text
Relocations:
- Offset: 4
Symbol: M2
Type: R_MIPS_26
- Offset: 8
Symbol: T2
Type: R_MICROMIPS_26_S1
- Offset: 12
Symbol: M1
Type: R_MIPS_26
Symbols:
Global:
- Name: M2
Type: STT_FUNC
Section: .text
Value: 0
Size: 4
Other: [ STO_MIPS_MICROMIPS ]
- Name: T2
Type: STT_FUNC
Section: .text
Value: 4
Size: 4
- Name: M1
Type: STT_FUNC
Section: .text
Value: 8
Size: 4
Other: [ STO_MIPS_MICROMIPS ]
- Name: T1
Type: STT_FUNC
Section: .text
Value: 12
Size: 4