From: Stanislav S. <ssh...@us...> - 2010-02-26 23:09:39
|
Update of /cvsroot/bochs/bochs/cpu In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv10833 Modified Files: shift16.cc Log Message: optimization Index: shift16.cc =================================================================== RCS file: /cvsroot/bochs/bochs/cpu/shift16.cc,v retrieving revision 1.52 retrieving revision 1.53 diff -u -d -r1.52 -r1.53 --- shift16.cc 4 Dec 2009 16:53:12 -0000 1.52 +++ shift16.cc 26 Feb 2010 23:09:30 -0000 1.53 @@ -153,7 +153,7 @@ SET_FLAGS_OSZAPC_LOGIC_16(result_16); cf = (op1_16 >> (count - 1)) & 0x1; - of = (((result_16 << 1) ^ result_16) >> 15) & 0x1; // of = result14 ^ result15 + of = ((Bit16u)((result_16 << 1) ^ result_16) >> 15) & 0x1; // of = result14 ^ result15 SET_FLAGS_OxxxxC(of, cf); } @@ -194,7 +194,7 @@ SET_FLAGS_OSZAPC_LOGIC_16(result_16); cf = (op1_16 >> (count - 1)) & 0x1; - of = (((result_16 << 1) ^ result_16) >> 15) & 0x1; // of = result14 ^ result15 + of = ((Bit16u)((result_16 << 1) ^ result_16) >> 15) & 0x1; // of = result14 ^ result15 SET_FLAGS_OxxxxC(of, cf); } @@ -382,7 +382,7 @@ } cf = (op1_16 >> (count - 1)) & 0x1; - of = (((result_16 << 1) ^ result_16) >> 15) & 0x1; // of = result15 ^ result14 + of = ((Bit16u)((result_16 << 1) ^ result_16) >> 15) & 0x1; // of = result15 ^ result14 SET_FLAGS_OxxxxC(of, cf); } @@ -470,7 +470,7 @@ cf = (op1_16 >> (count - 1)) & 0x1; // note, that of == result15 if count == 1 and // of == 0 if count >= 2 - of = (((result_16 << 1) ^ result_16) >> 15) & 0x1; + of = ((Bit16u)((result_16 << 1) ^ result_16) >> 15) & 0x1; SET_FLAGS_OSZAPC_LOGIC_16(result_16); SET_FLAGS_OxxxxC(of, cf); |