From ec9c43fb3ffdfc7331f457b93b7f76e96b555e50 Mon Sep 17 00:00:00 2001 From: Pixel <> Date: Mon, 16 Apr 2001 19:47:30 +0000 Subject: Indentation --- lib/simulator.c | 90 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 45 insertions(+), 45 deletions(-) (limited to 'lib') diff --git a/lib/simulator.c b/lib/simulator.c index 64a2aff..d00a528 100644 --- a/lib/simulator.c +++ b/lib/simulator.c @@ -24,7 +24,7 @@ int HasToRun = 1, HasToReset; -Uint32 base_addr = 0; +Uint32 base_addr = 0; Uint32 LireInstruction(void) @@ -68,15 +68,15 @@ void Initialisation(void) for (i = 0; i < TAILLE_MEMOIRE; i++) Reset(&memoire_principale[i]); - InitRegistres(); /* initialisation des registres */ - EcrireRegistreSP(ADD_SP); /* initialisation du stack pointer */ + InitRegistres(); /* initialisation des registres */ + EcrireRegistreSP(ADD_SP); /* initialisation du stack pointer */ } void DecodeExec(Uint32 instruction, Uint32 entrypoint) { Uint32 champ_registre_resultat, val1, val2, resultat; int test1, test2; - Uint32 val; /* valeur qui va etre stockée */ + Uint32 val; /* valeur qui va etre stockée */ if (Opcode(instruction) & 0x80) { fpu(Opcode(instruction)); @@ -101,7 +101,7 @@ void DecodeExec(Uint32 instruction, Uint32 entrypoint) IncrementeCompteurOrdinal(); } } - if (ValeurBit(Extension(instruction), 1) == 0) {/* Teste si l'opération est signée ou pas */ + if (ValeurBit(Extension(instruction), 1) == 0) { /* Teste si l'opération est signée ou pas */ switch (Opcode(instruction)) { case 0: resultat = AdditionNonSigne(val1, val2); @@ -127,7 +127,7 @@ void DecodeExec(Uint32 instruction, Uint32 entrypoint) case 7: resultat = SHR(val1); break; - } + } } else { switch (Opcode(instruction)) { case 0: @@ -286,8 +286,8 @@ void DecodeExec(Uint32 instruction, Uint32 entrypoint) } if (test1) { Uint32 tmp; - - + + tmp = LireInstruction(); if (Opcode(instruction) & 1) { tmp += LireRegistrePC(); @@ -340,7 +340,7 @@ void DecodeExec(Uint32 instruction, Uint32 entrypoint) if (ValeurBit(Extension(instruction), 0)) { HasToRun = 0; /* Halt */ } else { - HasToReset = 1; /* Reset */ + HasToReset = 1; /* Reset */ ResetRegistres(); } break; @@ -389,56 +389,56 @@ void Debogueur(void) AfficheReg(); } -void ChargeBinaire(char * filename) +void ChargeBinaire(char *filename) { -FILE * file; -char message[BUFSIZ]; -Uint32 entrypoint, nb, ns, nbss, nr; -Uint32 * relocation_table; -int i; - -file = openfilereading(filename); -if (readword(file)==0x58454e4e) { /*verification de la signature*/ -sprintf(message,_("Total Size Of The Binary File: %d"),readword(file)); -pushcontext(message); -nb=readword(file); /* taille du segment text */ -ns=readword(file); /* taille des donnes statiques */ -nbss=readword(file); /* taille des donnees non init */ -nr=readword(file); /* taille de la table de relogement */ - -relocation_table=Emalloc(nr); -for (i=0;i