1//Original:/testcases/seq/se_rets_hazard/se_rets_hazard.dsp 2# mach: bfin 3 4.include "testutils.inc" 5 start 6 7 8BOOT: 9 FP = SP; // and frame pointer 10 11 INIT_R_REGS 0; // initialize general purpose regs 12 13 14 15 16 ASTAT = r0; // reset sequencer registers 17 18// The Main Program 19 20 21START: 22 loadsym r1, SUB1; 23 RETS = r1; 24 RTS; 25 26MID1: 27 CHECKREG r6, 0; // shouldn't be BAD 28 R6.L = 0xBAD2; // In case we come back to MID1 29 loadsym P1, MID2; 30 CALL ( P1 ); 31 RTS; 32 33MID2: 34 loadsym R1, END; 35 RETS = r1; 36 [ -- SP ] = I0; 37 LINK 0; 38 I0 = FP; 39 UNLINK; 40 RTS; 41 42END: 43 44 pass // Call Endtest Macro 45 46// Subroutines and Functions 47 48SUB1: // Code goes here 49 CHECKREG r7, 0; // should be if sub executed 50 R7.L = 0xBAD; // In case we come back to SUB1 51 loadsym R2, MID1; 52 [ -- SP ] = R2; 53 RETS = [sp++]; 54 RTS; 55 R6.L = 0xBAD; 56