mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-29 10:32:47 +00:00
0ee5398b7f
Summary: MIPS32r6/MIPS64r6 support has not been added yet. inlineasm-cnstrnt-reg.ll: Explicitly specify the CPU since it will not work on MIPS32r6/MIPS64r6 when -integrated-as is the default. We can't change the mnemonic since the LO register is an implicit def of mtlo and MIPS32r6/MIPS64r6 has no instructions that use LO. 2008-08-01-AsmInline.ll: Explicitly specify the CPU since MIPS32r6/MIPS64r6 will correctly emit different code and this is a regression test. mips64instrs.ll and mips64muldiv.ll Check registers and the way the multiply is used in m1 divrem.ll Check registers and use multiple filecheck prefixes to limit redundancy Reviewers: vmedic, jkolek, zoran.jovanovic, matheusalmeida Reviewed By: matheusalmeida Subscribers: matheusalmeida Differential Revision: http://reviews.llvm.org/D3894 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210656 91177308-0d34-0410-b5e6-96231b3b80d8
46 lines
1.4 KiB
LLVM
46 lines
1.4 KiB
LLVM
; Positive test for inline register constraints
|
|
;
|
|
; RUN: llc -march=mipsel -mcpu=mips32 < %s | FileCheck %s
|
|
; RUN: llc -march=mipsel -mcpu=mips32r2 < %s | FileCheck %s
|
|
|
|
define i32 @main() nounwind {
|
|
entry:
|
|
|
|
; r with char
|
|
;CHECK: #APP
|
|
;CHECK: addiu ${{[0-9]+}},${{[0-9]+}},23
|
|
;CHECK: #NO_APP
|
|
tail call i8 asm sideeffect "addiu $0,$1,$2", "=r,r,n"(i8 27, i8 23) nounwind
|
|
|
|
; r with short
|
|
;CHECK: #APP
|
|
;CHECK: addiu ${{[0-9]+}},${{[0-9]+}},13
|
|
;CHECK: #NO_APP
|
|
tail call i16 asm sideeffect "addiu $0,$1,$2", "=r,r,n"(i16 17, i16 13) nounwind
|
|
|
|
; r with int
|
|
;CHECK: #APP
|
|
;CHECK: addiu ${{[0-9]+}},${{[0-9]+}},3
|
|
;CHECK: #NO_APP
|
|
tail call i32 asm sideeffect "addiu $0,$1,$2", "=r,r,n"(i32 7, i32 3) nounwind
|
|
|
|
; Now c with 1024: make sure register $25 is picked
|
|
; CHECK: #APP
|
|
; CHECK: addiu $25,${{[0-9]+}},1024
|
|
; CHECK: #NO_APP
|
|
tail call i32 asm sideeffect "addiu $0,$1,$2", "=c,c,I"(i32 4194304, i32 1024) nounwind
|
|
|
|
; Now l with 1024: make sure register lo is picked. We do this by checking the instruction
|
|
; after the inline expression for a mflo to pull the value out of lo.
|
|
; CHECK: #APP
|
|
; CHECK-NEXT: mtlo ${{[0-9]+}}
|
|
; CHECK-NEXT: madd ${{[0-9]+}},${{[0-9]+}}
|
|
; CHECK-NEXT: #NO_APP
|
|
; CHECK-NEXT: mflo ${{[0-9]+}}
|
|
%bosco = alloca i32, align 4
|
|
call i32 asm sideeffect "\09mtlo $3 \0A\09\09madd $1,$2 ", "=l,r,r,r"(i32 7, i32 6, i32 44) nounwind
|
|
store volatile i32 %4, i32* %bosco, align 4
|
|
|
|
ret i32 0
|
|
}
|