xref: /csrg-svn/sys/tahoe/align/Amovzb.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  *	@(#)Amovzb.c	7.1 (Berkeley) 12/06/90
11*45760Sbostic  */
1229618Ssam 
1345699Sbostic #include "align.h"
movzb(infop)1429618Ssam movzb(infop) 	process_info *infop;
1529618Ssam /*
1629618Ssam /*	Move byte to word or longword, zero-extended
1729618Ssam /*
1829618Ssam /****************************************/
1929618Ssam {
2029618Ssam 	register long result;
2129618Ssam 	register struct oprnd *oppnt;
2229618Ssam 
2329618Ssam 	oppnt = operand(infop,0);
2429618Ssam 	result = oppnt->data;
2529618Ssam 	negative_0;
2629618Ssam 	if (result == 0 )  zero_1 ; else zero_0;
2729618Ssam 	overflow_0;  carry_1;
2829618Ssam 	if ((oppnt->mode & 0xff) == Dir)
2929618Ssam 		write_back (infop, result , operand(infop,1) );
3029618Ssam 	else write_back (infop, result & 0xff, operand(infop,1) );
3129618Ssam }
32