brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.7 KiB · 924798c Raw
67 lines · plain
1# REQUIRES: mips2# Check microMIPS thunk generation.3 4# RUN: echo "SECTIONS { \5# RUN:         . = 0x20000;  .text ALIGN(0x100) : { *(.text) } \6# RUN:       }" > %t.script7 8# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \9# RUN:         -mcpu=mips32r2 -mattr=micromips %s -o %t-eb.o10# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \11# RUN:         -position-independent -mcpu=mips32r2 -mattr=micromips \12# RUN:         %S/Inputs/mips-micro.s -o %t-eb-pic.o13# RUN: ld.lld -o %t-eb.exe -script %t.script %t-eb.o %t-eb-pic.o14# RUN: llvm-objdump --no-print-imm-hex -d --mattr=+micromips --no-show-raw-insn %t-eb.exe \15# RUN:   | FileCheck --check-prefix=R2 %s16 17# RUN: llvm-mc -filetype=obj -triple=mipsel-unknown-linux \18# RUN:         -mcpu=mips32r2 -mattr=micromips %s -o %t-el.o19# RUN: llvm-mc -filetype=obj -triple=mipsel-unknown-linux \20# RUN:         -position-independent -mcpu=mips32r2 -mattr=micromips \21# RUN:         %S/Inputs/mips-micro.s -o %t-el-pic.o22# RUN: ld.lld -o %t-el.exe -script %t.script %t-el.o %t-el-pic.o23# RUN: llvm-objdump --no-print-imm-hex -d --mattr=+micromips --no-show-raw-insn %t-el.exe \24# RUN:   | FileCheck --check-prefix=R2 %s25 26# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \27# RUN:         -mcpu=mips32r6 -mattr=micromips %s -o %t-eb-r6.o28# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \29# RUN:         -position-independent -mcpu=mips32r6 -mattr=micromips \30# RUN:         %S/Inputs/mips-micro.s -o %t-eb-pic-r6.o31# RUN: ld.lld -o %t-eb-r6.exe -script %t.script %t-eb-r6.o %t-eb-pic-r6.o32# RUN: llvm-objdump --no-print-imm-hex -d --mattr=+micromips --no-show-raw-insn %t-eb-r6.exe \33# RUN:   | FileCheck --check-prefix=R6 %s34 35# RUN: llvm-mc -filetype=obj -triple=mipsel-unknown-linux \36# RUN:         -mcpu=mips32r6 -mattr=micromips %s -o %t-el-r6.o37# RUN: llvm-mc -filetype=obj -triple=mipsel-unknown-linux \38# RUN:         -position-independent -mcpu=mips32r6 -mattr=micromips \39# RUN:         %S/Inputs/mips-micro.s -o %t-el-pic-r6.o40# RUN: ld.lld -o %t-el-r6.exe -script %t.script %t-el-r6.o %t-el-pic-r6.o41# RUN: llvm-objdump --no-print-imm-hex -d --mattr=+micromips --no-show-raw-insn %t-el-r6.exe \42# RUN:   | FileCheck --check-prefix=R6 %s43 44# R2: <__start>:45# R2-NEXT:    20100:  jal   {{.*}} <__microLA25Thunk_foo>46# R2-NEXT:            nop47 48# R2: <__microLA25Thunk_foo>:49# R2-NEXT:    20108:  lui   $25, 250# R2-NEXT:            j     {{.*}} <foo>51# R2-NEXT:            addiu $25, $25, 28952# R2-NEXT:            nop53 54# R6: <__start>:55# R6-NEXT:    20100:  balc  {{.*}} <__start>56 57# R6: <__microLA25Thunk_foo>:58# R6-NEXT:    20104:  lui   $25, 259# R6-NEXT:            addiu $25, $25, 27360# R6-NEXT:            bc    {{.*}} <__microLA25Thunk_foo+0x8>61 62  .text63  .set micromips64  .global __start65__start:66  jal foo67