| 1 |
; RUN: llc < %s | FileCheck %s |
| 2 |
target datalayout = "e-p:16:8:8-i8:8:8-i16:8:8-i32:8:8" |
| 3 |
target triple = "msp430-generic-generic" |
| 4 |
|
| 5 |
; Test that correct register names are accepted *inside* inline asm listings. |
| 6 |
; Tested with PUSH instruction since it does not support memory operands. |
| 7 |
|
| 8 |
define void @accepted_rN() nounwind { |
| 9 |
; CHECK-LABEL: accepted_rN |
| 10 |
call void asm sideeffect "push r0", ""() nounwind |
| 11 |
; CHECK: push r0 |
| 12 |
call void asm sideeffect "push r1", ""() nounwind |
| 13 |
; CHECK: push r1 |
| 14 |
call void asm sideeffect "push r2", ""() nounwind |
| 15 |
; CHECK: push r2 |
| 16 |
call void asm sideeffect "push r3", ""() nounwind |
| 17 |
; CHECK: push r3 |
| 18 |
call void asm sideeffect "push r4", ""() nounwind |
| 19 |
; CHECK: push r4 |
| 20 |
call void asm sideeffect "push r5", ""() nounwind |
| 21 |
; CHECK: push r5 |
| 22 |
call void asm sideeffect "push r6", ""() nounwind |
| 23 |
; CHECK: push r6 |
| 24 |
call void asm sideeffect "push r7", ""() nounwind |
| 25 |
; CHECK: push r7 |
| 26 |
call void asm sideeffect "push r8", ""() nounwind |
| 27 |
; CHECK: push r8 |
| 28 |
call void asm sideeffect "push r9", ""() nounwind |
| 29 |
; CHECK: push r9 |
| 30 |
call void asm sideeffect "push r10", ""() nounwind |
| 31 |
; CHECK: push r10 |
| 32 |
call void asm sideeffect "push r11", ""() nounwind |
| 33 |
; CHECK: push r11 |
| 34 |
call void asm sideeffect "push r12", ""() nounwind |
| 35 |
; CHECK: push r12 |
| 36 |
call void asm sideeffect "push r13", ""() nounwind |
| 37 |
; CHECK: push r13 |
| 38 |
call void asm sideeffect "push r14", ""() nounwind |
| 39 |
; CHECK: push r14 |
| 40 |
call void asm sideeffect "push r15", ""() nounwind |
| 41 |
; CHECK: push r15 |
| 42 |
ret void |
| 43 |
} |
| 44 |
|
| 45 |
define void @accepted_reg_aliases() nounwind { |
| 46 |
; CHECK-LABEL: accepted_reg_aliases |
| 47 |
; Ensure register aliases are renamed as expected |
| 48 |
call void asm sideeffect "push pc", ""() nounwind |
| 49 |
; CHECK: push r0 |
| 50 |
call void asm sideeffect "push sp", ""() nounwind |
| 51 |
; CHECK: push r1 |
| 52 |
call void asm sideeffect "push sr", ""() nounwind |
| 53 |
; CHECK: push r2 |
| 54 |
call void asm sideeffect "push cg", ""() nounwind |
| 55 |
; CHECK: push r3 |
| 56 |
call void asm sideeffect "push fp", ""() nounwind |
| 57 |
; CHECK: push r4 |
| 58 |
ret void |
| 59 |
} |