1 ; Ensure that the MBlaze interrupt_handler calling convention (cc73) is handled 2 ; correctly correctly by the MBlaze backend. 3 ; 4 ; RUN: llc < %s -march=mblaze | FileCheck %s 5 6 @.str = private constant [28 x i8] c"The interrupt has gone off\0A\00" 7 @_interrupt_handler = alias void ()* @myintr 8 9 define cc73 void @myintr() nounwind noinline { 10 ; CHECK: myintr: 11 ; CHECK: swi r3, r1 12 ; CHECK: swi r4, r1 13 ; CHECK: swi r5, r1 14 ; CHECK: swi r6, r1 15 ; CHECK: swi r7, r1 16 ; CHECK: swi r8, r1 17 ; CHECK: swi r9, r1 18 ; CHECK: swi r10, r1 19 ; CHECK: swi r11, r1 20 ; CHECK: swi r12, r1 21 ; CHECK: swi r17, r1 22 ; CHECK: swi r18, r1 23 ; CHECK: mfs r11, rmsr 24 ; CHECK: swi r11, r1 25 entry: 26 %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([28 x i8]* @.str, i32 0, i32 0)) 27 ret void 28 29 ; CHECK: lwi r11, r1 30 ; CHECK: mts rmsr, r11 31 ; CHECK: lwi r18, r1 32 ; CHECK: lwi r17, r1 33 ; CHECK: lwi r12, r1 34 ; CHECK: lwi r11, r1 35 ; CHECK: lwi r10, r1 36 ; CHECK: lwi r9, r1 37 ; CHECK: lwi r8, r1 38 ; CHECK: lwi r7, r1 39 ; CHECK: lwi r6, r1 40 ; CHECK: lwi r5, r1 41 ; CHECK: lwi r4, r1 42 ; CHECK: lwi r3, r1 43 ; CHECK: rtid r14, 0 44 } 45 46 ; CHECK: .globl _interrupt_handler 47 ; CHECK: _interrupt_handler = myintr 48 declare i32 @printf(i8*, ...) 49