Simon Dardis | ea34315 | 2016-08-18 13:22:43 +0000 | [diff] [blame^] | 1 | ; RUN: llc -filetype=obj -march=mipsel -relocation-model=pic -verify-machineinstrs < %s -o - \ |
| 2 | ; RUN: | llvm-objdump -d - | FileCheck %s -check-prefix=PIC32 |
| 3 | |
| 4 | ; RUN: llc -filetype=obj -march=mipsel -relocation-model=static -verify-machineinstrs < %s -o - \ |
| 5 | ; RUN: | llvm-objdump -d - | FileCheck %s -check-prefix=STATIC32 |
| 6 | |
| 7 | ; RUN: llc -filetype=obj -march=mips64el -mcpu=mips64 -verify-machineinstrs < %s -o - \ |
| 8 | ; RUN: | llvm-objdump -d - | FileCheck %s -check-prefix=N64 |
| 9 | |
| 10 | ; RUN: llc -filetype=obj -march=mipsel -relocation-model=pic -mattr=+micromips < %s -o - \ |
| 11 | ; RUN: | llvm-objdump -d - | FileCheck %s -check-prefix=PIC32MM |
| 12 | |
| 13 | ; RUN: llc -filetype=obj -march=mipsel -relocation-model=static -mattr=+micromips < %s -o - \ |
| 14 | ; RUN: | llvm-objdump -d - | FileCheck %s -check-prefix=STATIC32MM |
| 15 | |
| 16 | ; RUN: llc -filetype=obj -march=mipsel -relocation-model=pic -mcpu=mips32r6 < %s -o - \ |
| 17 | ; RUN: | llvm-objdump -d - | FileCheck %s -check-prefix=PIC32R6 |
| 18 | ; RUN: llc -filetype=obj -march=mipsel -relocation-model=static -mcpu=mips32r6 < %s -o - \ |
| 19 | ; RUN: | llvm-objdump -d - | FileCheck %s -check-prefix=STATIC32R6 |
| 20 | |
| 21 | ; RUN: llc -filetype=obj -march=mips64el -mcpu=mips64r6 < %s -o - \ |
| 22 | ; RUN: | llvm-objdump -d - | FileCheck %s -check-prefix=N64R6 |
| 23 | |
| 24 | declare i8 @f2(i8) |
| 25 | |
| 26 | define i8 @f1(i8 signext %i) nounwind { |
| 27 | %a = tail call i8 @f2(i8 %i) |
| 28 | ret i8 %a |
| 29 | } |
| 30 | |
| 31 | ; PIC32: {{[0-9]}}: 08 00 20 03 jr $25 |
| 32 | ; STATIC32: {{[0-9]}}: 00 00 00 08 j 0 |
| 33 | |
| 34 | ; N64: {{[0-9a-z]+}}: 08 00 20 03 jr $25 |
| 35 | |
| 36 | ; PIC32MM: {{[0-9a-z]+}}: b9 45 jrc $25 |
| 37 | ; STATIC32MM: {{[0-9]}}: 00 d4 00 00 j 0 |
| 38 | |
| 39 | ; PIC32R6: {{[0-9]}}: 00 00 19 d8 jrc $25 |
| 40 | ; STATIC32R6: {{[0-9]}}: 00 00 00 08 j 0 |
| 41 | |
| 42 | ; N64R6: {{[0-9a-z]+}}: 09 00 20 03 jr $25 |
| 43 | |