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

	.include "media/testutils.inc"

	start
init:
	pta wrong, tr0

addzl1:
	movi 1, r0
	movi 2, r1
	addz.l r0, r1, r2
	bnei r2, 3, tr0

addzl2:
	movi 1, r0
	shlli r0, 32, r0
	addi r0, 2, r0
	movi 1, r1
	shlli r1, 32, r1
	addi r1, 2, r1
	addz.l r0, r1, r2
	bnei r2, 4, tr0

addzl3:
	movi 1, r0
	shlli r0, 31, r0
	addi r0, 2, r0
	movi 2, r1
	addz.l r0, r1, r2
	
okay:
	pass

wrong:
	fail
