blob: 6b1870248c1109549b1e8c2108ff8e8d790191a5 [file] [log] [blame]
//Original:/testcases/core/c_ccflag_pr_imm3_uu/c_ccflag_pr_imm3_uu.dsp
// Spec Reference: ccflag pr-imm3 (uu)
# mach: bfin
.include "testutils.inc"
start
INIT_R_REGS 0;
//imm32 p0, 0x00000001;
imm32 p1, 0x00000001;
imm32 p2, 0x00000002;
imm32 p3, 0x00000003;
imm32 p4, 0x00000004;
imm32 p5, 0x00000005;
imm32 sp, 0x00000006;
imm32 fp, 0x00000007;
R0 = 0;
ASTAT = R0;
// positive preg EQUAL to positive imm3
CC = P1 == 1;
R0 = ASTAT;
CC = P1 < 1 (IU);
R1 = ASTAT;
CC = P1 <= 1 (IU);
R2 = ASTAT;
CC = P2 == 2;
R3 = ASTAT;
CC = P2 < 2 (IU);
R4 = ASTAT;
CC = P2 <= 2 (IU);
R5 = ASTAT;
CHECKREG r0, 0x00000020;
CHECKREG r1, 0x00000000;
CHECKREG r2, 0x00000020;
CHECKREG r3, 0x00000020;
CHECKREG r4, 0x00000000;
CHECKREG r5, 0x00000020;
CC = P3 == 3;
R0 = ASTAT;
CC = P3 < 3 (IU);
R1 = ASTAT;
CC = P3 <= 3 (IU);
R2 = ASTAT;
CC = P4 == 3;
R3 = ASTAT;
CC = P4 < 4 (IU);
R4 = ASTAT;
CC = P4 <= 4 (IU);
R5 = ASTAT;
CHECKREG r0, 0x00000020;
CHECKREG r1, 0x00000000;
CHECKREG r2, 0x00000020;
CHECKREG r3, 0x00000000;
CHECKREG r4, 0x00000000;
CHECKREG r5, 0x00000020;
CC = P5 == 3;
R0 = ASTAT;
CC = P5 < 5 (IU);
R1 = ASTAT;
CC = P5 <= 5 (IU);
R2 = ASTAT;
CC = SP == 3;
R3 = ASTAT;
CC = SP < 6 (IU);
R4 = ASTAT;
CC = SP <= 6 (IU);
R5 = ASTAT;
CHECKREG r0, 0x00000000;
CHECKREG r1, 0x00000000;
CHECKREG r2, 0x00000020;
CHECKREG r3, 0x00000000;
CHECKREG r4, 0x00000000;
CHECKREG r5, 0x00000020;
CC = FP == 3;
R5 = ASTAT;
CC = FP < 7 (IU);
R6 = ASTAT;
CC = FP <= 7 (IU);
R7 = ASTAT;
CHECKREG r5, 0x00000000;
CHECKREG r6, 0x00000000;
CHECKREG r7, 0x00000020;
// positive preg GREATER than positive imm3
CC = P1 == 0;
R0 = ASTAT;
CC = P1 < 0 (IU);
R1 = ASTAT;
CC = P1 <= 0 (IU);
R2 = ASTAT;
CC = P2 == 1;
R3 = ASTAT;
CC = P2 < 1 (IU);
R4 = ASTAT;
CC = P2 <= 1 (IU);
R5 = ASTAT;
CHECKREG r0, 0x00000000;
CHECKREG r1, 0x00000000;
CHECKREG r2, 0x00000000;
CHECKREG r3, 0x00000000;
CHECKREG r4, 0x00000000;
CHECKREG r5, 0x00000000;
CC = P3 == 2;
R0 = ASTAT;
CC = P3 < 2 (IU);
R1 = ASTAT;
CC = P3 <= 2 (IU);
R2 = ASTAT;
CC = P4 == 3;
R3 = ASTAT;
CC = P4 < 3 (IU);
R4 = ASTAT;
CC = P4 <= 3 (IU);
R5 = ASTAT;
CHECKREG r0, 0x00000000;
CHECKREG r1, 0x00000000;
CHECKREG r2, 0x00000000;
CHECKREG r3, 0x00000000;
CHECKREG r4, 0x00000000;
CHECKREG r5, 0x00000000;
CC = P5 == 3;
R0 = ASTAT;
CC = P5 < 4 (IU);
R1 = ASTAT;
CC = P5 <= 4 (IU);
R2 = ASTAT;
CC = SP == 3;
R3 = ASTAT;
CC = SP < 5 (IU);
R4 = ASTAT;
CC = SP <= 5 (IU);
R5 = ASTAT;
CHECKREG r0, 0x00000000;
CHECKREG r1, 0x00000000;
CHECKREG r2, 0x00000000;
CHECKREG r3, 0x00000000;
CHECKREG r4, 0x00000000;
CHECKREG r5, 0x00000000;
CC = FP == 3;
R5 = ASTAT;
CC = FP < 6 (IU);
R6 = ASTAT;
CC = FP <= 6 (IU);
R7 = ASTAT;
CHECKREG r5, 0x00000000;
CHECKREG r6, 0x00000000;
CHECKREG r7, 0x00000000;
// positive preg LESS than positive imm3
imm32 p1, 0x00000000;
imm32 p2, 0x00000001;
imm32 p3, 0x00000002;
imm32 p4, 0x00000003;
imm32 p5, 0x00000004;
imm32 sp, 0x00000005;
imm32 fp, 0x00000006;
CC = P1 == 2;
R0 = ASTAT;
CC = P1 < 2 (IU);
R1 = ASTAT;
CC = P1 <= 2 (IU);
R2 = ASTAT;
CC = P2 == 3;
R3 = ASTAT;
CC = P2 < 3 (IU);
R4 = ASTAT;
CC = P2 <= 3 (IU);
R5 = ASTAT;
CHECKREG r0, 0x00000000;
CHECKREG r1, 0x00000020;
CHECKREG r2, 0x00000020;
CHECKREG r3, 0x00000000;
CHECKREG r4, 0x00000020;
CHECKREG r5, 0x00000020;
CC = P3 == 3;
R0 = ASTAT;
CC = P3 < 4 (IU);
R1 = ASTAT;
CC = P3 <= 4 (IU);
R2 = ASTAT;
CC = P4 == 3;
R3 = ASTAT;
CC = P4 < 5 (IU);
R4 = ASTAT;
CC = P4 <= 5 (IU);
R5 = ASTAT;
CHECKREG r0, 0x00000000;
CHECKREG r1, 0x00000020;
CHECKREG r2, 0x00000020;
CHECKREG r3, 0x00000020;
CHECKREG r4, 0x00000020;
CHECKREG r5, 0x00000020;
CC = P5 == 3;
R0 = ASTAT;
CC = P5 < 6 (IU);
R1 = ASTAT;
CC = P5 <= 6 (IU);
R2 = ASTAT;
CC = SP == 3;
R3 = ASTAT;
CC = SP < 7 (IU);
R4 = ASTAT;
CC = SP <= 7 (IU);
R5 = ASTAT;
CHECKREG r0, 0x00000000;
CHECKREG r1, 0x00000020;
CHECKREG r2, 0x00000020;
CHECKREG r3, 0x00000000;
CHECKREG r4, 0x00000020;
CHECKREG r5, 0x00000020;
CC = FP == 3;
R5 = ASTAT;
CC = FP < 7 (IU);
R6 = ASTAT;
CC = FP <= 7 (IU);
R7 = ASTAT;
CHECKREG r5, 0x00000000;
CHECKREG r6, 0x00000020;
CHECKREG r7, 0x00000020;
pass