cc0.s 369 B

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