aboutsummaryrefslogtreecommitdiff
path: root/sim/mips/sim-main.h
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>1998-11-12 06:42:34 +0000
committerAndrew Cagney <cagney@redhat.com>1998-11-12 06:42:34 +0000
commitd1cbd70abba43c47cbbbf759e225bd946538325a (patch)
tree8f6c98c595892a4a3ed48c0e3c7b5ba29506b06a /sim/mips/sim-main.h
parent93db5513ee4fd5bfd3e556638cc1331d8d0a9533 (diff)
downloadgdb-d1cbd70abba43c47cbbbf759e225bd946538325a.zip
gdb-d1cbd70abba43c47cbbbf759e225bd946538325a.tar.gz
gdb-d1cbd70abba43c47cbbbf759e225bd946538325a.tar.bz2
Add configury for mips-lsi-elf target (32 bit MIPS16).
Fix numerous problems with PENDING_* code. In old gencode simulator, don't double tick each cycle. Add BREAK instruction to MIPS16 gencode simulator.
Diffstat (limited to 'sim/mips/sim-main.h')
-rw-r--r--sim/mips/sim-main.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/sim/mips/sim-main.h b/sim/mips/sim-main.h
index 95b04fd..42c152c 100644
--- a/sim/mips/sim-main.h
+++ b/sim/mips/sim-main.h
@@ -449,7 +449,7 @@ typedef struct _pending_write_queue {
#define PENDING_OUT ((CPU)->pending.out)
#define PENDING_TOTAL ((CPU)->pending.total)
#define PENDING_SLOT_SIZE ((CPU)->pending.slot_size)
-#define PENDING_SLOT_BIT ((CPU)->pending.slot_size)
+#define PENDING_SLOT_BIT ((CPU)->pending.slot_bit)
#define PENDING_SLOT_DELAY ((CPU)->pending.slot_delay)
#define PENDING_SLOT_DEST ((CPU)->pending.slot_dest)
#define PENDING_SLOT_VALUE ((CPU)->pending.slot_value)
@@ -472,12 +472,17 @@ memset (&(CPU)->pending, 0, sizeof ((CPU)->pending))
sim_engine_abort (SD, CPU, cia, \
"PENDING_SCHED - buffer overflow\n"); \
if (PENDING_TRACE) \
- sim_io_printf (SD, "PENDING_SCHED - dest 0x%lx, val 0x%lx, pending_in %d, pending_out %d, pending_total %d\n", (unsigned long) (DEST), (unsigned long) (VAL), PENDING_IN, PENDING_OUT, PENDING_TOTAL); \
+ sim_io_eprintf (SD, "PENDING_SCHED - 0x%lx - dest 0x%lx, val 0x%lx, bit %d, size %d, pending_in %d, pending_out %d, pending_total %d\n", \
+ (unsigned long) cia, (unsigned long) &(DEST), \
+ (unsigned long) (VAL), (BIT), (int) sizeof (DEST),\
+ PENDING_IN, PENDING_OUT, PENDING_TOTAL); \
PENDING_SLOT_DELAY[PENDING_IN] = (DELAY) + 1; \
PENDING_SLOT_DEST[PENDING_IN] = &(DEST); \
PENDING_SLOT_VALUE[PENDING_IN] = (VAL); \
PENDING_SLOT_SIZE[PENDING_IN] = sizeof (DEST); \
PENDING_SLOT_BIT[PENDING_IN] = (BIT); \
+ PENDING_IN = (PENDING_IN + 1) % PSLOTS; \
+ PENDING_TOTAL += 1; \
} while (0)
#define PENDING_WRITE(DEST,VAL,DELAY) PENDING_SCHED(DEST,VAL,DELAY,-1)
@@ -492,9 +497,12 @@ memset (&(CPU)->pending, 0, sizeof ((CPU)->pending))
#define PENDING_FILL(R,VAL) \
{ \
if ((R) >= FGRIDX && (R) < FGRIDX + NR_FGR) \
- PENDING_SCHED(FGR[(R) - FGRIDX], VAL, 2, -1); \
+ { \
+ PENDING_SCHED(FGR[(R) - FGRIDX], VAL, 1, -1); \
+ PENDING_SCHED(FPR_STATE[(R) - FGRIDX], fmt_uninterpreted, 1, -1); \
+ } \
else \
- PENDING_SCHED(GPR[(R)], VAL, 2, -1); \
+ PENDING_SCHED(GPR[(R)], VAL, 1, -1); \
}