summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPixel <>2001-04-16 17:06:05 +0000
committerPixel <>2001-04-16 17:06:05 +0000
commitd27f5513775730b3e8581fe06400c6122161a19a (patch)
treeaf48b4b3966a204f38118ad9a1142579b9eeca44 /lib
parent06c7f715e1a31dd71a54f21705c4a28ec78a3652 (diff)
Blah
Diffstat (limited to 'lib')
-rw-r--r--lib/alu.c6
-rw-r--r--lib/simulator.c10
2 files changed, 8 insertions, 8 deletions
diff --git a/lib/alu.c b/lib/alu.c
index 14136a0..5a2819a 100644
--- a/lib/alu.c
+++ b/lib/alu.c
@@ -42,7 +42,7 @@ Uint32 RMultiplicationNonSigne(Uint32 a, Uint32 b)
temp = a * b;
SecondResult = temp >> 32;
- return (temp & ((1 << 32) -1));
+ return (temp);
}
Uint32 RMultiplicationSigne(Uint32 a, Uint32 b)
@@ -51,7 +51,7 @@ Uint32 RMultiplicationSigne(Uint32 a, Uint32 b)
temp = a * b;
SecondResult = temp >> 32;
- return (temp & ((1 << 32) -1));
+ return (temp);
}
Uint32 RDivisionNonSigne(Uint32 a, Uint32 b)
@@ -62,7 +62,7 @@ Uint32 RDivisionNonSigne(Uint32 a, Uint32 b)
Uint32 RDivisionSigne(Uint32 a, Uint32 b)
{
- SecondResuld = a % b;
+ SecondResult = a % b;
return (a / b);
}
diff --git a/lib/simulator.c b/lib/simulator.c
index dd213fe..5ce27b7 100644
--- a/lib/simulator.c
+++ b/lib/simulator.c
@@ -62,15 +62,17 @@ Uint32 Adresse(Uint32 u, Uint32 instruction)
void Initialisation(void)
{
int i;
-
+/*
for (i = 0; i < TAILLE_MEMOIRE; i++)
- Reset(&memoire_principale[i]);
+ Reset(&memoire_principale[i]); */
EcrireRegistreSP(ADD_SP);
}
void DecodeExec(Uint32 instruction, Uint32 entrypoint)
{
Uint32 champ_registre_resultat, val1, val2, resultat;
+ int test1, test2;
+ Uint32 val; /* valeur qui va etre stockée */
if (Opcode(instruction) & 0x80) {
fpu(Opcode(instruction));
@@ -152,7 +154,7 @@ void DecodeExec(Uint32 instruction, Uint32 entrypoint)
}
if ((Opcode(instruction) & 2) && !(Opcode(instruction & 3))) {
EcrireRegistreRG(resultat);
- EcrireRegistreRD(SecondResultat);
+ EcrireRegistreRD(SecondResult);
} else {
EcrireRegistre(champ_registre_resultat, resultat); /* On écrit le résultat dans le registre de sortie */
}
@@ -231,7 +233,6 @@ void DecodeExec(Uint32 instruction, Uint32 entrypoint)
case 10: /* J[cond] */
case 11:
- int test1, test2;
switch (champ(Extension(instruction), 4)) {
case 0:
@@ -316,7 +317,6 @@ void DecodeExec(Uint32 instruction, Uint32 entrypoint)
}
break;
case 14: /* PUSH */
- Uint32 val; /* valeur qui va etre stockée */
if (ValeurBit(Extension(instruction), 0) == 0)
val = LireRegistre(Champ1(instruction));