xref: /csrg-svn/sys/tahoe/align/Acvt.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  *	@(#)Acvt.c	7.1 (Berkeley) 12/06/90
11*45760Sbostic  */
1229601Ssam 
1345699Sbostic #include "align.h"
cvt(infop)1429601Ssam cvt(infop) 	process_info *infop;
1529601Ssam /*
1629601Ssam /*	Convert , checks overflow
1729601Ssam /*
1829601Ssam /****************************************/
1929601Ssam {
2029601Ssam 	register long result;
2129601Ssam 
2229601Ssam 	result = operand(infop,0)->data;
2329601Ssam 	if (result < 0 )  negative_1 ; else negative_0;
2429601Ssam 	if (result == 0 )  zero_1 ; else zero_0;
2529601Ssam 	carry_1; overflow_0;
2629601Ssam 		/* Overflow may be set by writing back */
2729601Ssam 	write_back (infop, result, operand(infop,1) );
2829601Ssam }
29