summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPixel <>2001-04-16 16:35:18 +0000
committerPixel <>2001-04-16 16:35:18 +0000
commit2f733d9f0da3d3a7032aea4f94be6a5fd257f193 (patch)
treeaabc23389ce712f3dbd12ed27a0ac1052afa5a2d /lib
parentddb272490e8c958e2c46db9e145f518c4c656cf0 (diff)
Fast ALU mul & div fixed
Diffstat (limited to 'lib')
-rw-r--r--lib/alu.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/alu.c b/lib/alu.c
index 0419ffd..ffbf9c8 100644
--- a/lib/alu.c
+++ b/lib/alu.c
@@ -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);
}