# sh testcase for shari.l $rm, $imm6, $rd -*- Asm -*-
# mach: all
# as: -isa=shmedia
# ld: -m shelf64

	.include "media/testutils.inc"

	start

init:
	pta wrong, tr0

sharil1:
	movi 0x1020, r0
	shlli r0, 8, r0
	ori r0, 0x30, r0
	shlli r0, 8, r0
	ori r0, 0x40, r0
	shlli r0, 8, r0
	ori r0, 0x50, r0
	shlli r0, 8, r0
	ori r0, 0x60, r0
	shlli r0, 8, r0
	ori r0, 0x70, r0
	shlli r0, 8, r0
	ori r0, 0x80, r0

	movi 1, r1
	shari.l r0, 1, r0
	shari.l r0, 1, r0
	shari.l r0, 1, r0
	shari.l r0, 1, r0
	shari.l r0, 1, r0
	shari.l r0, 1, r0
	shari.l r0, 1, r0
	shari.l r0, 1, r0
	shari.l r0, 20, r0
	bnei r0, 5, tr0

okay:	
	pass

wrong:
	fail

