xref: /csrg-svn/sys/tahoe/align/Amovzwl.c (revision 45760)
1*45760Sbostic /*-
2*45760Sbostic  * Copyright (c) 1986 The Regents of the University of California.
3*45760Sbostic  * All rights reserved.
4*45760Sbostic  *
5*45760Sbostic  * This code is derived from software contributed to Berkeley by
6*45760Sbostic  * Computer Consoles Inc.
7*45760Sbostic  *
8*45760Sbostic  * %sccs.include.redist.c%
9*45760Sbostic  *
10*45760Sbostic  *	@(#)Amovzwl.c	7.1 (Berkeley) 12/06/90
11*45760Sbostic  */
1229619Ssam 
1345699Sbostic #include "align.h"
movzwl(infop)1429619Ssam movzwl(infop) 	process_info *infop;
1529619Ssam /*
1629619Ssam /*	Move word to longword, zero-extended
1729619Ssam /*
1829619Ssam /****************************************/
1929619Ssam {
2029619Ssam 	register long result;
2129619Ssam 	register struct oprnd *oppnt;
2229619Ssam 
2329619Ssam 	oppnt = operand(infop,0);
2429619Ssam 	result = oppnt->data;
2529619Ssam 	negative_0;
2629619Ssam 	if (result == 0 )  zero_1 ; else zero_0;
2729619Ssam 	overflow_0;  carry_1;
2829619Ssam 	if ((oppnt->mode & 0xff) == Dir)
2929619Ssam 		write_back (infop, result , operand(infop,1) );
3029619Ssam 	else write_back (infop, result & 0xffff, operand(infop,1) );
3129619Ssam }
32