- Timestamp:
- Apr 21, 2007 8:50:41 PM (18 years ago)
- svn:sync-xref-src-repo-rev:
- 20673
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/testcase/tstInlineAsm.cpp
r2303 r2306 825 825 CHECKVAL(u64, UINT64_C(0x924719355cd35a27), "%#018RX64"); 826 826 827 #if 0 /* question is whether this should trap or not */828 /*829 * r=frank: Of course it must trap:827 #if 0 /* bird: question is whether this should trap or not: 828 * 829 * frank: Of course it must trap: 830 830 * 831 831 * 0xfffffff8 * 0x77d7daf8 = 0x77d7daf441412840 … … 837 837 * 838 838 * which is definitely greater than 0x3b9aca00. 839 */ 840 /* 839 * 841 840 * bird: No, the C version does *not* crash. So, the question is whether there any 842 841 * code depending on it not crashing. … … 844 843 * Of course the assembly versions of the code crash right now for the reasons you've 845 844 * given, but the the 32-bit MSC version does not crash. 845 * 846 * frank: The C version does not crash but delivers incorrect results for this case. 847 * The reason is 848 * 849 * u.s.Hi = (unsigned long)(u64Hi / u32C); 850 * 851 * Here the division is actually 64-bit by 64-bit but the 64-bit result is truncated 852 * to 32 bit. If using this (optimized and fast) function we should just be sure that 853 * the operands are in a valid range. 846 854 */ 847 855 u64 = ASMMultU64ByU32DivByU32(UINT64_C(0xfffffff8c65d6731), UINT32_C(0x77d7daf8), UINT32_C(0x3b9aca00));
Note:
See TracChangeset
for help on using the changeset viewer.