• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -mtriple=thumbv7-linux-gnu -no-integrated-as %s -o /dev/null
2
3; Test thumb2-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 ) nounwind
6	ret i32 %y
7}
8
9; Test thumb2-mode "J" constraint, for compatibility with unknown use in GCC.
10define void @testJ() {
11	tail call void asm sideeffect ".word $0", "J"( i32 4080 ) nounwind
12	ret void
13}
14
15; Test thumb2-mode "K" constraint, for bitwise inverted Data Processing immediates.
16define void @testK() {
17	tail call void asm sideeffect ".word $0", "K"( i32 16777215 ) nounwind
18	ret void
19}
20
21; Test thumb2-mode "L" constraint, for negated Data Processing immediates.
22define void @testL() {
23	tail call void asm sideeffect ".word $0", "L"( i32 -65280 ) nounwind
24	ret void
25}
26
27; Test thumb2-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 ) nounwind
30	ret i32 %y
31}
32