ftno.cgs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # frv testcase for ftno
  2. # mach: all
  3. .include "testutils.inc"
  4. start
  5. .global ftnev
  6. ftnev:
  7. and_spr_immed -4081,tbr ; clear tbr.tt
  8. set_gr_spr tbr,gr7
  9. inc_gr_immed 2112,gr7 ; address of exception handler
  10. set_mem_limmed 0x0038,0x2000,gr7 ; bctrlr 0,0
  11. set_spr_immed 128,lcr
  12. set_spr_addr bad,lr
  13. set_gr_immed 0,gr7
  14. set_gr_immed 4,gr8
  15. set_fcc 0x0 0
  16. ftno ; should branch to tbr + (128 + 4)*16
  17. set_fcc 0x1 0
  18. ftno ; should branch to tbr + (128 + 4)*16
  19. set_fcc 0x2 0
  20. ftno ; should branch to tbr + (128 + 4)*16
  21. set_fcc 0x3 0
  22. ftno ; should branch to tbr + (128 + 4)*16
  23. set_fcc 0x4 0
  24. ftno ; should branch to tbr + (128 + 4)*16
  25. set_fcc 0x5 0
  26. ftno ; should branch to tbr + (128 + 4)*16
  27. set_fcc 0x6 0
  28. ftno ; should branch to tbr + (128 + 4)*16
  29. set_fcc 0x7 0
  30. ftno ; should branch to tbr + (128 + 4)*16
  31. set_fcc 0x8 0
  32. ftno ; should branch to tbr + (128 + 4)*16
  33. set_fcc 0x9 0
  34. ftno ; should branch to tbr + (128 + 4)*16
  35. set_fcc 0xa 0
  36. ftno ; should branch to tbr + (128 + 4)*16
  37. set_fcc 0xb 0
  38. ftno ; should branch to tbr + (128 + 4)*16
  39. set_fcc 0xc 0
  40. ftno ; should branch to tbr + (128 + 4)*16
  41. set_fcc 0xd 0
  42. ftno ; should branch to tbr + (128 + 4)*16
  43. set_fcc 0xe 0
  44. ftno ; should branch to tbr + (128 + 4)*16
  45. set_fcc 0xf 0
  46. ftno ; should branch to tbr + (128 + 4)*16
  47. pass
  48. bad:
  49. fail