Home | History | Annotate | Line # | Download | only in bfin
      1 //Original:/testcases/core/c_progctrl_call_pcpr/c_progctrl_call_pcpr.dsp
      2 // Spec Reference: progctrl call (pc+pr)
      3 # mach: bfin
      4 
      5 .include "testutils.inc"
      6 	start
      7 
      8 	INIT_R_REGS 0;
      9 
     10 	ASTAT = r0;
     11 
     12 	FP = SP;
     13 
     14 	P2 = 0x0006;
     15 
     16 JMP:
     17 	CALL ( PC + P2 );
     18 	JUMP.S JMP;
     19 
     20 STOP:
     21 	JUMP.S END;
     22 
     23 LAB1:
     24 	P2 = 0x000e;
     25 	R1 = 0x1111 (X);
     26 	RTS;
     27 
     28 LAB2:
     29 	P2 = 0x0016;
     30 	R2 = 0x2222 (X);
     31 	RTS;
     32 
     33 LAB3:
     34 	P2 = 0x001e;
     35 	R3 = 0x3333 (X);
     36 	RTS;
     37 
     38 LAB4:
     39 	P2 = 0x0026;
     40 	R4 = 0x4444 (X);
     41 	RTS;
     42 
     43 LAB5:
     44 	P2 = 0x0004;
     45 	R5 = 0x5555 (X);
     46 	RTS;
     47 
     48 END:
     49 
     50 	CHECKREG r0, 0x00000000;
     51 	CHECKREG r1, 0x00001111;
     52 	CHECKREG r2, 0x00002222;
     53 	CHECKREG r3, 0x00003333;
     54 	CHECKREG r4, 0x00004444;
     55 	CHECKREG r5, 0x00005555;
     56 	CHECKREG r6, 0x00000000;
     57 	CHECKREG r7, 0x00000000;
     58 
     59 	pass
     60 
     61 	.data
     62 DATA:
     63 	.space (0x0100);
     64