brintos

brintos / llvm-project-archived public Read only

0
0
Text · 971 B · 603e52d Raw
32 lines · plain
1; RUN: llc -mtriple=arm-eabi -no-integrated-as %s -o /dev/null2 3; Test ARM-mode "I" constraint, for any Data Processing immediate.4define i32 @testI(i32 %x) {5	%y = call i32 asm "add $0, $1, $2", "=r,r,I"( i32 %x, i32 65280 ) nounwind6	ret i32 %y7}8 9; Test ARM-mode "J" constraint, for compatibility with unknown use in GCC.10define void @testJ() {11	tail call void asm sideeffect ".word $0", "J"( i32 4080 ) nounwind12	ret void13}14 15; Test ARM-mode "K" constraint, for bitwise inverted Data Processing immediates.16define void @testK() {17	tail call void asm sideeffect ".word $0", "K"( i32 16777215 ) nounwind18	ret void19}20 21; Test ARM-mode "L" constraint, for negated Data Processing immediates.22define void @testL() {23	tail call void asm sideeffect ".word $0", "L"( i32 -65280 ) nounwind24	ret void25}26 27; Test ARM-mode "M" constraint, for value between 0 and 32.28define i32 @testM(i32 %x) {29	%y = call i32 asm "lsl $0, $1, $2", "=r,r,M"( i32 %x, i32 31 ) nounwind30	ret i32 %y31}32