summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
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);
}