aboutsummaryrefslogtreecommitdiff
path: root/sim/testsuite/cr16/cbitw.cgs
blob: a97698c46b7a26d31305dab51f3a8307cb34cba8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# cr16 testcase for cbitw
# mach:	 cr16

	.include "testutils.inc"

	start

	.global cbitw
cbitw:
	cbitw	$4,_y
	loadw   _y, r1
	cmpb    $0xef, r1
	beq ok1
not_ok:
	fail

ok1:
	movd   $_y, (r1,r0)
	cbitw	$5,0(r1,r0)
	loadw   _y, r1
	cmpb    $0xcf, r1
	beq ok2
	br not_ok
ok2:

	movw   $_y, r1
	cbitw	$6,0(r1)
	loadw   _y, r1
	cmpb    $0x8f, r1
	beq ok3
	br not_ok
ok3:
	pass

_y:	.word	0xff