summaryrefslogtreecommitdiff
path: root/lib/alu.c
diff options
context:
space:
mode:
authorPixel <>2001-04-16 15:12:16 +0000
committerPixel <>2001-04-16 15:12:16 +0000
commite09044e963015cf672d0f992264ee1563717602a (patch)
tree1a55d7d5e46401a41ca7bc24e597d90b0b720601 /lib/alu.c
parent3953a2906211a6c0007079dcafe66aa372ab33d1 (diff)
Indentation
Diffstat (limited to 'lib/alu.c')
-rw-r--r--lib/alu.c82
1 files changed, 65 insertions, 17 deletions
diff --git a/lib/alu.c b/lib/alu.c
index b394b09..94f06ba 100644
--- a/lib/alu.c
+++ b/lib/alu.c
@@ -2,21 +2,69 @@
// rajouter les overflow...
-/*****************************************/
-/** **/
-/** GESTION DE L'UNITE DE CALCUL **/
-/** **/
-/*****************************************/
+/*****************************************/
+/** **/
+/** GESTION DE L'UNITE DE CALCUL **/
+/** **/
+/*****************************************/
+ Uint32 AdditionNonSigne(Uint32 a, Uint32 b)
+{
+ return (a + b);
+}
+
+ Uint32 AdditionSigne(Uint32 a, Uint32 b)
+{
+ return (a + b);
+}
+
+ Uint32 SoustractionNonSigne(Uint32 a, Uint32 b)
+{
+ return (a - b);
+}
+
+ Uint32 SoustractionSigne(Uint32 a, Uint32 b)
+{
+ return (a - b);
+}
+
+ Uint32 MultiplicationNonSigne(Uint32 a, Uint32 b)
+{
+ return (a * b);
+}
+
+ Uint32 MultiplicationSigne(Uint32 a, Uint32 b)
+{
+ return (a * b);
+}
+
+ Uint32 DivisionNonSigne(Uint32 a, Uint32 b)
+{
+ return (a / b);
+}
+
+ Uint32 DivisionSigne(Uint32 a, Uint32 b)
+{
+ return (a / b);
+}
+
+ Uint32 AND(Uint32 a, Uint32 b)
+{
+ return (a & b);
+}
+
+ Uint32 OR(Uint32 a, Uint32 b)
+{
+ return (a | b);
+}
+
+ Uint32 SHL(Uint32 a)
+{
+ return (a >> 1);
+}
+
+ Uint32 SHR(Uint32 a)
+{
+ return (a << 1);
+}
+
-Uint32 AdditionNonSigne(Uint32 a, Uint32 b) { return (a + b); }
-Uint32 AdditionSigne(Uint32 a, Uint32 b) { return (a + b); }
-Uint32 SoustractionNonSigne(Uint32 a, Uint32 b) { return (a - b); }
-Uint32 SoustractionSigne(Uint32 a, Uint32 b) { return (a - b); }
-Uint32 MultiplicationNonSigne(Uint32 a, Uint32 b) { return (a * b); }
-Uint32 MultiplicationSigne(Uint32 a, Uint32 b) { return (a * b); }
-Uint32 DivisionNonSigne(Uint32 a, Uint32 b) { return (a / b); }
-Uint32 DivisionSigne(Uint32 a, Uint32 b) { return (a / b); }
-Uint32 AND(Uint32 a, Uint32 b) { return (a & b); }
-Uint32 OR(Uint32 a, Uint32 b) { return (a | b); }
-Uint32 SHL(Uint32 a) { return (a >> 1); }
-Uint32 SHR(Uint32 a) { return (a << 1); }