Home | History | Annotate | Line # | Download | only in bfin
      1 # Blackfin testcase for overflow
      2 # mach: bfin
      3 
      4 	.include "testutils.inc"
      5 
      6 	start
      7 
      8 	# add 0x80000000 + 0x80000000
      9 	R1 = 1;
     10 	R1 <<= 31;
     11 	R0 = R1;
     12 	R0 = R0 + R1;
     13 	CC =  V;    // check to see if av0 and ac get set
     14 	CC &= AC0;
     15 	IF !CC JUMP art;
     16 	R1 = 0;
     17 	R1 += 0;
     18 	CC = AZ;
     19 	IF !CC JUMP art;
     20 	pass
     21 
     22 art:
     23 	R0 = CC;
     24 	R1 = 1 (Z);
     25 
     26 	CC = R1 == R0
     27 	if CC jump 1f;
     28 	fail
     29 1:
     30 	pass
     31