lock.cgs 317 B

12345678910111213141516171819202122232425
  1. # m32r testcase for lock $dr,@$sr
  2. # mach(): m32r m32rx
  3. .include "testutils.inc"
  4. start
  5. .global lock
  6. lock:
  7. mvaddr_h_gr r4, data_loc
  8. mvi_h_gr r5, 0
  9. lock r5, @r4
  10. test_h_gr r5, 0x12345678
  11. ; There is no way to test the lock bit
  12. unlock r5, @r4 ; Unlock the processor
  13. pass
  14. data_loc:
  15. .word 0x12345678