xref: /original-bsd/sys/tahoe/align/Amovzwl.c (revision d272e02a)
1 /*-
2  * Copyright (c) 1986 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * This code is derived from software contributed to Berkeley by
6  * Computer Consoles Inc.
7  *
8  * %sccs.include.redist.c%
9  *
10  *	@(#)Amovzwl.c	7.1 (Berkeley) 12/06/90
11  */
12 
13 #include "align.h"
14 movzwl(infop) 	process_info *infop;
15 /*
16 /*	Move word to longword, zero-extended
17 /*
18 /****************************************/
19 {
20 	register long result;
21 	register struct oprnd *oppnt;
22 
23 	oppnt = operand(infop,0);
24 	result = oppnt->data;
25 	negative_0;
26 	if (result == 0 )  zero_1 ; else zero_0;
27 	overflow_0;  carry_1;
28 	if ((oppnt->mode & 0xff) == Dir)
29 		write_back (infop, result , operand(infop,1) );
30 	else write_back (infop, result & 0xffff, operand(infop,1) );
31 }
32