Home | History | Annotate | Download | only in Mips
      1 ; RUN: llc -no-integrated-as -march=mipsel < %s | \
      2 ; RUN:     FileCheck %s -check-prefix=ALL -check-prefix=GAS
      3 
      4 define void @constraint_I() nounwind {
      5 ; First I with short
      6 ; ALL-LABEL: constraint_I:
      7 ; ALL:           #APP
      8 ; ALL:           addiu ${{[0-9]+}}, ${{[0-9]+}}, 4096
      9 ; ALL:           #NO_APP
     10   tail call i16 asm sideeffect "addiu $0, $1, $2", "=r,r,I"(i16 7, i16 4096) nounwind
     11 
     12 ; Then I with int
     13 ; ALL: #APP
     14 ; ALL: addiu ${{[0-9]+}}, ${{[0-9]+}}, -3
     15 ; ALL: #NO_APP
     16   tail call i32 asm sideeffect "addiu $0, $1, $2", "=r,r,I"(i32 7, i32 -3) nounwind
     17   ret void
     18 }
     19 
     20 define void @constraint_J() nounwind {
     21 ; Now J with 0
     22 ; ALL-LABEL: constraint_J:
     23 ; ALL: #APP
     24 ; ALL: addiu ${{[0-9]+}}, ${{[0-9]+}}, 0
     25 ; ALL: #NO_APP
     26   tail call i32 asm sideeffect "addiu $0, $1, $2\0A\09 ", "=r,r,J"(i32 7, i16 0) nounwind
     27   ret void
     28 }
     29 
     30 define void @constraint_K() nounwind {
     31 ; Now K with 64
     32 ; ALL: #APP
     33 ; GAS: addu ${{[0-9]+}}, ${{[0-9]+}}, 64
     34 ; ALL: #NO_APP	
     35   tail call i16 asm sideeffect "addu $0, $1, $2\0A\09 ", "=r,r,K"(i16 7, i16 64) nounwind
     36   ret void
     37 }
     38 
     39 define void @constraint_L() nounwind {
     40 ; Now L with 0x00100000
     41 ; ALL: #APP
     42 ; ALL: add ${{[0-9]+}}, ${{[0-9]+}}, ${{[0-9]+}}
     43 ; ALL: #NO_APP	
     44   tail call i32 asm sideeffect "add $0, $1, $3\0A\09", "=r,r,L,r"(i32 7, i32 1048576, i32 0) nounwind
     45   ret void
     46 }
     47 
     48 define void @constraint_N() nounwind {
     49 ; Now N with -3
     50 ; ALL: #APP
     51 ; ALL: addiu ${{[0-9]+}}, ${{[0-9]+}}, -3
     52 ; ALL: #NO_APP	
     53   tail call i32 asm sideeffect "addiu $0, $1, $2", "=r,r,N"(i32 7, i32 -3) nounwind
     54   ret void
     55 }
     56 
     57 define void @constraint_O() nounwind {
     58 ; Now O with -3
     59 ; ALL: #APP
     60 ; ALL: addiu ${{[0-9]+}}, ${{[0-9]+}}, -3
     61 ; ALL: #NO_APP	
     62   tail call i32 asm sideeffect "addiu $0, $1, $2", "=r,r,O"(i32 7, i16 -3) nounwind
     63   ret void
     64 }
     65 
     66 define void @constraint_P() nounwind {
     67 ; Now P with 65535
     68 ; ALL: #APP
     69 ; GAS: addiu ${{[0-9]+}}, ${{[0-9]+}}, 65535
     70 ; ALL: #NO_APP
     71   tail call i32 asm sideeffect "addiu $0, $1, $2", "=r,r,P"(i32 7, i32 65535) nounwind
     72   ret void
     73 }
     74