1*29603Ssam /* Acvtlw.c 1.1 86/07/20 */ 2*29603Ssam 3*29603Ssam #include "../tahoealign/align.h" 4*29603Ssam cvtlw(infop) 5*29603Ssam process_info *infop; 6*29603Ssam /* 7*29603Ssam /* Convert longword to word 8*29603Ssam /* 9*29603Ssam /****************************************/ 10*29603Ssam { 11*29603Ssam register long result; 12*29603Ssam 13*29603Ssam result = operand(infop,0)->data; 14*29603Ssam if (result < 0 ) negative_1 ; else negative_0; 15*29603Ssam if (result == 0 ) zero_1 ; else zero_0; 16*29603Ssam carry_1; 17*29603Ssam if (result > 0x7fff || result <= -0x8000) overflow_1; 18*29603Ssam else overflow_0; 19*29603Ssam write_back (infop, result, operand(infop,1) ); 20*29603Ssam } 21