tbitw.cgs 370 B

123456789101112131415161718192021222324252627282930313233
  1. # cr16 testcase for tbitw
  2. # mach: cr16
  3. .include "testutils.inc"
  4. start
  5. .global tbitw
  6. tbitw:
  7. movw $0, r1
  8. lpr r1, psr
  9. tbitw $0,_y
  10. spr psr, r1
  11. cmpb $0x20, r1
  12. beq ok1
  13. not_ok:
  14. fail
  15. ok1:
  16. movw $0, r1
  17. lpr r1, psr
  18. movd $_y, (r1,r0)
  19. tbitw $1,0(r1,r0)
  20. loadw _y, r1
  21. spr psr, r1
  22. cmpb $0x20, r1
  23. beq ok2
  24. br not_ok
  25. ok2:
  26. pass
  27. _y: .word 0xf7