Author: aandrejevic
Date: Sun Nov 10 03:11:56 2013
New Revision: 60912
URL: http://svn.reactos.org/svn/reactos?rev=60912&view=rev
Log:
[FAST486]
The number of bit places in a shift operation is ANDed by the width of the type
when it is in a register, so (1 << c), when c is 32, is actually 1, and not 0.
Fix the calculation of MaxValue by using SignFlag | (SignFlag - 1) instead.
Modified:
branches/ntvdm/lib/fast486/opgroups.c
Modified: branches/ntvdm/lib/fast486/opgroups.c
URL: http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/opgroups.c?re…
==============================================================================
--- branches/ntvdm/lib/fast486/opgroups.c [iso-8859-1] (original)
+++ branches/ntvdm/lib/fast486/opgroups.c [iso-8859-1] Sun Nov 10 03:11:56 2013
@@ -43,7 +43,7 @@
{
ULONG Result;
ULONG SignFlag = 1 << (Bits - 1);
- ULONG MaxValue = (1 << Bits) - 1;
+ ULONG MaxValue = (SignFlag - 1) | SignFlag;
/* Make sure the values don't exceed the maximum for their size */
FirstValue &= MaxValue;