diff options
author | Pixel <> | 2001-04-16 16:35:18 +0000 |
---|---|---|
committer | Pixel <> | 2001-04-16 16:35:18 +0000 |
commit | 2f733d9f0da3d3a7032aea4f94be6a5fd257f193 (patch) | |
tree | aabc23389ce712f3dbd12ed27a0ac1052afa5a2d /lib/alu.c | |
parent | ddb272490e8c958e2c46db9e145f518c4c656cf0 (diff) |
Fast ALU mul & div fixed
Diffstat (limited to 'lib/alu.c')
-rw-r--r-- | lib/alu.c | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -36,21 +36,31 @@ Uint32 RSoustractionSigne(Uint32 a, Uint32 b) Uint32 RMultiplicationNonSigne(Uint32 a, Uint32 b) { - return (a * b); + unsigned long long temp; + + temp = a * b; + SecondResult = temp >> 32; + return (temp & ((1 << 32) -1)); } Uint32 RMultiplicationSigne(Uint32 a, Uint32 b) { - return (a * b); + unsigned long long temp; + + temp = a * b; + SecondResult = temp >> 32; + return (temp & ((1 << 32) -1)); } Uint32 RDivisionNonSigne(Uint32 a, Uint32 b) { + SecondResult = a % b; return (a / b); } Uint32 RDivisionSigne(Uint32 a, Uint32 b) { + SecondResuld = a % b; return (a / b); } |