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 * @(#)Acvtlw.c 7.1 (Berkeley) 12/06/90 11*45760Sbostic */ 1229603Ssam 1345699Sbostic #include "align.h" cvtlw(infop)1429603Ssamcvtlw(infop) 1529603Ssam process_info *infop; 1629603Ssam /* 1729603Ssam /* Convert longword to word 1829603Ssam /* 1929603Ssam /****************************************/ 2029603Ssam { 2129603Ssam register long result; 2229603Ssam 2329603Ssam result = operand(infop,0)->data; 2429603Ssam if (result < 0 ) negative_1 ; else negative_0; 2529603Ssam if (result == 0 ) zero_1 ; else zero_0; 2629603Ssam carry_1; 2729603Ssam if (result > 0x7fff || result <= -0x8000) overflow_1; 2829603Ssam else overflow_0; 2929603Ssam write_back (infop, result, operand(infop,1) ); 3029603Ssam } 31