e0.s 801 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. // assert that we can issue a software exception
  2. // and that the expt number is passed correctly through
  3. // SEQSTAT.
  4. # mach: bfin
  5. # sim: --environment operating
  6. .include "testutils.inc"
  7. start
  8. .ifndef BFIN_HOST
  9. imm32 p0, 0xFFE02000; /* EVT0 */
  10. P1 = re (Z); // load a pointer to ihandler interrupt 1
  11. P1.H = re;
  12. [ P0 + (4*3) ] = P1;
  13. R0 = -1; /* unmask all interrupts */
  14. imm32 p1, 0xFFE02104;
  15. [P1] = R0;
  16. R0 = start_uspace (Z);
  17. R0.H = start_uspace;
  18. RETI = R0;
  19. RTI;
  20. start_uspace:
  21. EXCPT 10;
  22. DBGA ( R1.L , 0x1238 );
  23. dbg_pass;
  24. // ihandler
  25. re:
  26. R0 = SEQSTAT;
  27. R0 <<= (32-6);
  28. R0 >>= (32-6);
  29. R2 = 0x20;
  30. CC = R0 < R2;
  31. IF !CC JUMP _error;
  32. DBGA ( R0.L , 0xa );
  33. R1 = 0x1234 (X);
  34. R1 += 1;
  35. R1 += 1;
  36. R1 += 1;
  37. R1 += 1;
  38. RTX;
  39. _error:
  40. DBGA ( R0.L , EXCPT_PROTVIOL );
  41. dbg_fail;
  42. .endif