1 ; RUN: llc -no-integrated-as -march=mipsel < %s | \
2 ; RUN: FileCheck %s -check-prefix=ALL -check-prefix=GAS
4 define void @constraint_I() nounwind {
6 ; ALL-LABEL: constraint_I:
8 ; ALL: addiu ${{[0-9]+}}, ${{[0-9]+}}, 4096
10 tail call i16 asm sideeffect "addiu $0, $1, $2", "=r,r,I"(i16 7, i16 4096) nounwind
14 ; ALL: addiu ${{[0-9]+}}, ${{[0-9]+}}, -3
16 tail call i32 asm sideeffect "addiu $0, $1, $2", "=r,r,I"(i32 7, i32 -3) nounwind
20 define void @constraint_J() nounwind {
22 ; ALL-LABEL: constraint_J:
24 ; ALL: addiu ${{[0-9]+}}, ${{[0-9]+}}, 0
26 tail call i32 asm sideeffect "addiu $0, $1, $2\0A\09 ", "=r,r,J"(i32 7, i16 0) nounwind
30 define void @constraint_K() nounwind {
33 ; GAS: addu ${{[0-9]+}}, ${{[0-9]+}}, 64
35 tail call i16 asm sideeffect "addu $0, $1, $2\0A\09 ", "=r,r,K"(i16 7, i16 64) nounwind
39 define void @constraint_L() nounwind {
40 ; Now L with 0x00100000
42 ; ALL: add ${{[0-9]+}}, ${{[0-9]+}}, ${{[0-9]+}}
44 tail call i32 asm sideeffect "add $0, $1, $3\0A\09", "=r,r,L,r"(i32 7, i32 1048576, i32 0) nounwind
48 define void @constraint_N() nounwind {
51 ; ALL: addiu ${{[0-9]+}}, ${{[0-9]+}}, -3
53 tail call i32 asm sideeffect "addiu $0, $1, $2", "=r,r,N"(i32 7, i32 -3) nounwind
57 define void @constraint_O() nounwind {
60 ; ALL: addiu ${{[0-9]+}}, ${{[0-9]+}}, -3
62 tail call i32 asm sideeffect "addiu $0, $1, $2", "=r,r,O"(i32 7, i16 -3) nounwind
66 define void @constraint_P() nounwind {
69 ; GAS: addiu ${{[0-9]+}}, ${{[0-9]+}}, 65535
71 tail call i32 asm sideeffect "addiu $0, $1, $2", "=r,r,P"(i32 7, i32 65535) nounwind