Home | History | Annotate | Line # | Download | only in m32r
lock.cgs revision 1.1
      1 # m32r testcase for lock $dr,@$sr
      2 # mach(): m32r m32rx
      3 
      4 	.include "testutils.inc"
      5 
      6 	start
      7 
      8 	.global lock
      9 lock:
     10 	mvaddr_h_gr r4, data_loc
     11 	mvi_h_gr    r5, 0
     12 
     13 	lock r5, @r4
     14 
     15 	test_h_gr r5, 0x12345678
     16 
     17 	; There is no way to test the lock bit
     18 
     19 	unlock r5, @r4 	; Unlock the processor
     20 
     21 	pass
     22 
     23 data_loc:
     24 	.word 0x12345678
     25 
     26