summaryrefslogtreecommitdiff
path: root/sim/testsuite/sim/sh64/compact/and.cgs
blob: e1452752ae0ef9f6e4c6e4670cb04cc3fd7e4b3c (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
# sh testcase for and $rm64, $rn64 -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32

	.include "compact/testutils.inc"

	start

	.global and
and:
	mov #1, r1
	mov #7, r2
	rotr r2
	rotr r2
	and r1, r2

	# R1 & R2 = 1.
	assert r2, #1

another:
	mov #192, r1
	mov #0, r2
	and r1, r2

	# R1 & R2 = 0.
	assert r2, #0

okay:
	pass

wrong:
	fail