diff options
author | Pixel <> | 2001-04-23 19:09:29 +0000 |
---|---|---|
committer | Pixel <> | 2001-04-23 19:09:29 +0000 |
commit | a3456122423c7784a5f72c202f3636256e0da7c9 (patch) | |
tree | 640bb6d0aa68dbbba22fe0465d6c8f3177c81fef /lib | |
parent | 02217b72233529114b1665fe0b97008a38eaea71 (diff) |
Bug dans le simulateur
Diffstat (limited to 'lib')
-rw-r--r-- | lib/simulator.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/simulator.c b/lib/simulator.c index ea3b142..f2749e0 100644 --- a/lib/simulator.c +++ b/lib/simulator.c @@ -181,11 +181,13 @@ void DecodeExec(Uint32 instruction) break; } } - if ((Opcode(instruction) & 2) - && !(Opcode(instruction & 3))) { - EcrireRegistreRG(resultat); - EcrireRegistreRD(SecondResult); - } else { + switch (Opcode(instruction)) { + case 2: + case 3: + EcrireRegistreRD(resultat); + EcrireRegistreRG(SecondResult); + break; + default: EcrireRegistre(champ_registre_resultat, resultat); /* On écrit le résultat dans le registre de sortie */ } break; |