2012-05-07 03:13:32 +00:00
|
|
|
; RUN: llc -march=mipsel < %s | FileCheck %s
|
|
|
|
|
|
|
|
define i32 @main() nounwind {
|
|
|
|
entry:
|
|
|
|
|
|
|
|
; First I with short
|
|
|
|
; CHECK: #APP
|
2014-05-22 11:46:58 +00:00
|
|
|
; CHECK: addiu ${{[0-9]+}},${{[0-9]+}},4096
|
2012-05-07 03:13:32 +00:00
|
|
|
; CHECK: #NO_APP
|
2014-05-22 11:46:58 +00:00
|
|
|
tail call i16 asm sideeffect "addiu $0,$1,$2", "=r,r,I"(i16 7, i16 4096) nounwind
|
2012-05-07 03:13:32 +00:00
|
|
|
|
|
|
|
; Then I with int
|
|
|
|
; CHECK: #APP
|
2014-05-22 11:46:58 +00:00
|
|
|
; CHECK: addiu ${{[0-9]+}},${{[0-9]+}},-3
|
2012-05-07 03:13:32 +00:00
|
|
|
; CHECK: #NO_APP
|
2014-05-22 11:46:58 +00:00
|
|
|
tail call i32 asm sideeffect "addiu $0,$1,$2", "=r,r,I"(i32 7, i32 -3) nounwind
|
2012-05-07 03:13:32 +00:00
|
|
|
|
2012-05-07 03:13:42 +00:00
|
|
|
; Now J with 0
|
|
|
|
; CHECK: #APP
|
2014-05-22 11:46:58 +00:00
|
|
|
; CHECK: addiu ${{[0-9]+}},${{[0-9]+}},0
|
2012-05-07 03:13:42 +00:00
|
|
|
; CHECK: #NO_APP
|
2014-05-22 11:46:58 +00:00
|
|
|
tail call i32 asm sideeffect "addiu $0,$1,$2\0A\09 ", "=r,r,J"(i32 7, i16 0) nounwind
|
2012-05-07 03:13:42 +00:00
|
|
|
|
2012-05-07 05:46:29 +00:00
|
|
|
; Now K with 64
|
|
|
|
; CHECK: #APP
|
|
|
|
; CHECK: addu ${{[0-9]+}},${{[0-9]+}},64
|
|
|
|
; CHECK: #NO_APP
|
|
|
|
tail call i16 asm sideeffect "addu $0,$1,$2\0A\09 ", "=r,r,K"(i16 7, i16 64) nounwind
|
|
|
|
|
2012-05-07 05:46:37 +00:00
|
|
|
; Now L with 0x00100000
|
|
|
|
; CHECK: #APP
|
|
|
|
; CHECK: add ${{[0-9]+}},${{[0-9]+}},${{[0-9]+}}
|
|
|
|
; CHECK: #NO_APP
|
|
|
|
tail call i32 asm sideeffect "add $0,$1,$3\0A\09", "=r,r,L,r"(i32 7, i32 1048576, i32 0) nounwind
|
|
|
|
|
2012-05-07 05:46:43 +00:00
|
|
|
; Now N with -3
|
|
|
|
; CHECK: #APP
|
2014-05-22 11:46:58 +00:00
|
|
|
; CHECK: addiu ${{[0-9]+}},${{[0-9]+}},-3
|
2012-05-07 05:46:43 +00:00
|
|
|
; CHECK: #NO_APP
|
2014-05-22 11:46:58 +00:00
|
|
|
tail call i32 asm sideeffect "addiu $0,$1,$2", "=r,r,N"(i32 7, i32 -3) nounwind
|
2012-05-07 05:46:43 +00:00
|
|
|
|
2012-05-07 05:46:48 +00:00
|
|
|
; Now O with -3
|
|
|
|
; CHECK: #APP
|
2014-05-22 11:46:58 +00:00
|
|
|
; CHECK: addiu ${{[0-9]+}},${{[0-9]+}},-3
|
2012-05-07 05:46:48 +00:00
|
|
|
; CHECK: #NO_APP
|
2014-05-22 11:46:58 +00:00
|
|
|
tail call i32 asm sideeffect "addiu $0,$1,$2", "=r,r,O"(i32 7, i16 -3) nounwind
|
2012-05-07 05:46:48 +00:00
|
|
|
|
2012-05-07 06:25:02 +00:00
|
|
|
; Now P with 65535
|
|
|
|
; CHECK: #APP
|
2014-05-22 11:46:58 +00:00
|
|
|
; CHECK: addiu ${{[0-9]+}},${{[0-9]+}},65535
|
2012-05-07 06:25:02 +00:00
|
|
|
; CHECK: #NO_APP
|
2014-05-22 11:46:58 +00:00
|
|
|
tail call i32 asm sideeffect "addiu $0,$1,$2", "=r,r,P"(i32 7, i32 65535) nounwind
|
2012-05-07 06:25:02 +00:00
|
|
|
|
2013-03-04 21:33:15 +00:00
|
|
|
; Now R Which takes the address of c
|
|
|
|
%c = alloca i32, align 4
|
|
|
|
store i32 -4469539, i32* %c, align 4
|
2014-05-22 11:51:06 +00:00
|
|
|
%8 = call i32 asm sideeffect "lw $0, 1 + $1\0A\09lw $0, 2 + $1\0A\09", "=r,*R"(i32* %c) #1
|
2013-03-04 21:33:15 +00:00
|
|
|
; CHECK: #APP
|
2014-05-22 11:51:06 +00:00
|
|
|
; CHECK: lw ${{[0-9]+}}, 1 + 0(${{[0-9]+}})
|
|
|
|
; CHECK: lw ${{[0-9]+}}, 2 + 0(${{[0-9]+}})
|
2013-03-04 21:33:15 +00:00
|
|
|
; CHECK: #NO_APP
|
|
|
|
|
2012-05-07 03:13:32 +00:00
|
|
|
ret i32 0
|
|
|
|
}
|