Skip to content
Extraits de code Groupes Projets
Valider e7a0da57 rédigé par Etienne BRATEAU's avatar Etienne BRATEAU
Parcourir les fichiers

reindent logsimasm

parent a4d69e9e
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -18,7 +18,8 @@ ...@@ -18,7 +18,8 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* C equivalent code for the assembly-language portions of logsim. /* C equivalent code for the assembly-language portions of logsim.
...@@ -31,8 +32,8 @@ ...@@ -31,8 +32,8 @@
#include "logsima.h" #include "logsima.h"
#include "node.h" #include "node.h"
#include "logstuff.h"
static int trace_16 = 0;
#define trace_16 (logsima_action.lact->quiet ? -1 : 0) #define trace_16 (logsima_action.lact->quiet ? -1 : 0)
#define TRACE_ENBL 0 #define TRACE_ENBL 0
...@@ -44,14 +45,9 @@ static int trace_16 = 0; ...@@ -44,14 +45,9 @@ static int trace_16 = 0;
extern int findprocedure (char *name, void (**start)());
static int callcache_next; static int callcache_next;
static void (*callcache[255-32])(log_16_action *); /* first 32 are unused */ static void (*callcache[255-32])(log_16_action *); /* first 32 are unused */
static void nullproc_16(log_16_action *act) static void nullproc_16(log_16_action *act)
{ {
/* do nothing */ /* do nothing */
...@@ -98,7 +94,7 @@ void copynodes(log_nrec *n, int *stable) ...@@ -98,7 +94,7 @@ void copynodes(log_nrec *n, int *stable)
if ((nip->truev = newv = nip->v0) == log_none) if ((nip->truev = newv = nip->v0) == log_none)
newv = nip->defv; newv = nip->defv;
if (TRACE_COPY) if (TRACE_COPY)
nc_printf("Setting node %x to %d\n", (unsigned int)nip, newv); nc_printf("Setting node %p to %d\n", nip, newv);
if (newv != (nip->v00 = nip->v)) if (newv != (nip->v00 = nip->v))
{ {
nip->v = newv; nip->v = newv;
...@@ -359,7 +355,7 @@ static log_16_value g_expr() ...@@ -359,7 +355,7 @@ static log_16_value g_expr()
case 0xb0: /* high pin */ case 0xb0: /* high pin */
nip = g_pins[*g_proc++]->info; nip = g_pins[*g_proc++]->info;
if (TRACE_VAL) nc_printf(" Value of %x is %d\n", (unsigned int)nip, (int)nip->v - 1); if (TRACE_VAL) nc_printf(" Value of %p is %d\n", nip, (int)nip->v - 1);
return nip->v; return nip->v;
case 0xb1: /* STRONG */ case 0xb1: /* STRONG */
...@@ -369,7 +365,7 @@ static log_16_value g_expr() ...@@ -369,7 +365,7 @@ static log_16_value g_expr()
case16(0xc0): /* pin */ case16(0xc0): /* pin */
case16(0xd0): case16(0xd0):
nip = g_pins[ch & 0x1f]->info; nip = g_pins[ch & 0x1f]->info;
if (TRACE_VAL) nc_printf(" Value of %x is %d\n", (unsigned int)nip, (int)nip->v - 1); if (TRACE_VAL) nc_printf(" Value of %p is %d\n", nip, (int)nip->v - 1);
return nip->v; return nip->v;
case16(0xe0): /* var */ case16(0xe0): /* var */
...@@ -571,7 +567,7 @@ out_node: ...@@ -571,7 +567,7 @@ out_node:
{ {
case log_zero: case log_zero:
nip = np->info; nip = np->info;
if (TRACE_VAL) nc_printf(" Output 0 to %x (was %d)\n", (unsigned int)nip, nip->v0); if (TRACE_VAL) nc_printf(" Output 0 to %p (was %d)\n", nip, nip->v0);
if (nip->v0 == log_one) if (nip->v0 == log_one)
record_conflict(np); record_conflict(np);
else else
...@@ -580,7 +576,7 @@ out_node: ...@@ -580,7 +576,7 @@ out_node:
case log_one: case log_one:
nip = np->info; nip = np->info;
if (TRACE_VAL) nc_printf(" Output 1 to %x (was %d)\n", (unsigned int)nip, nip->v0); if (TRACE_VAL) nc_printf(" Output 1 to %p (was %d)\n", nip, nip->v0);
if (nip->v0 == log_zero) if (nip->v0 == log_zero)
record_conflict(np); record_conflict(np);
else else
...@@ -600,7 +596,7 @@ oc_out_node: ...@@ -600,7 +596,7 @@ oc_out_node:
if (g_expr() == log_zero) if (g_expr() == log_zero)
{ {
nip = np->info; nip = np->info;
if (TRACE_VAL) nc_printf(" Output 0 to %x (was %d)\n", (unsigned int)nip, nip->v0); if (TRACE_VAL) nc_printf(" Output 0 to %p (was %d)\n", nip, nip->v0);
if (nip->v0 == log_one) if (nip->v0 == log_one)
record_conflict(np); record_conflict(np);
else else
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter