QWord fails some simple maths masking and Maths tests.
Original Reporter info from Mantis: jmg
-
Reporter name:
Original Reporter info from Mantis: jmg
- Reporter name:
Description:
These style of construct work fine in all operand sizes, EXCEPT for 64 bits.
There is no reason 64 bits should not work correctly on these ?
I only tested QWord, as this is a simple bit-pattern extract.
BitString_64 := BitString_64 + BitSymbolC[ToStr > $7FFFFFFFFFFFFFFF];
ToStr := (ToStr+ToStr) AND $FFFFFFFFFFFFFFFF; // Shift left
Simply Trim the masks, for smaller variables.
A work-around is to recode, to this
BitString_64 := BitString_64 + BitSymbolC[ToStr SHR 63 <>0];
ToStr := (ToStr+ToStr); // Shift left
Steps to reproduce:
Compile the above lines, for QWord. In my case ToStr : QWord is a function parameter, but i think this issue is universal.
Mantis conversion info:
- Mantis ID: 20023
- OS: XP
- OS Build: XP
- Build: not known
- Platform: WIn32
- Version: 2.4.4