aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
Diffstat (limited to 'sim')
-rw-r--r--sim/tic80/ChangeLog8
-rw-r--r--sim/tic80/cpu.h20
-rw-r--r--sim/tic80/misc.c44
3 files changed, 40 insertions, 32 deletions
diff --git a/sim/tic80/ChangeLog b/sim/tic80/ChangeLog
index 6bd219c..e5d4850 100644
--- a/sim/tic80/ChangeLog
+++ b/sim/tic80/ChangeLog
@@ -1,3 +1,11 @@
+Fri Feb 13 17:11:22 1998 Michael Meissner <meissner@cygnus.com>
+
+ * misc.c (tic80_trace_fpu*): Pass address of sim_fpu structure,
+ not the structure itself. Use %g consistantly to print floating
+ point.
+
+ * cpu.h: (tic80_trace_fpu*): Update prototypes.
+
Tue Feb 3 16:25:47 1998 Andrew Cagney <cagney@b1.cygnus.com>
* alu.h (IMEM32, IMEM32_IMMED): Rename IMEM and IMEM_IMMED so that
diff --git a/sim/tic80/cpu.h b/sim/tic80/cpu.h
index 6801c04..d8cfd0e 100644
--- a/sim/tic80/cpu.h
+++ b/sim/tic80/cpu.h
@@ -166,11 +166,11 @@ extern char *tic80_trace_alu3 PARAMS ((int, unsigned32, unsigned32, unsigned32
extern char *tic80_trace_cmp PARAMS ((int, unsigned32, unsigned32, unsigned32));
extern char *tic80_trace_alu2 PARAMS ((int, unsigned32, unsigned32));
extern char *tic80_trace_shift PARAMS ((int, unsigned32, unsigned32, int, int, int, int, int));
-extern void tic80_trace_fpu3 PARAMS ((SIM_DESC, sim_cpu *, sim_cia, int, sim_fpu, sim_fpu, sim_fpu));
-extern void tic80_trace_fpu2 PARAMS ((SIM_DESC, sim_cpu *, sim_cia, int, sim_fpu, sim_fpu));
-extern void tic80_trace_fpu1 PARAMS ((SIM_DESC, sim_cpu *, sim_cia, int, sim_fpu));
-extern void tic80_trace_fpu2i PARAMS ((SIM_DESC, sim_cpu *, sim_cia, int, unsigned32, sim_fpu, sim_fpu));
-extern void tic80_trace_fpu2cmp PARAMS ((SIM_DESC, sim_cpu *, sim_cia, int, unsigned32, sim_fpu, sim_fpu));
+extern void tic80_trace_fpu3 PARAMS ((SIM_DESC, sim_cpu *, sim_cia, int, sim_fpu *, sim_fpu *, sim_fpu *));
+extern void tic80_trace_fpu2 PARAMS ((SIM_DESC, sim_cpu *, sim_cia, int, sim_fpu *, sim_fpu *));
+extern void tic80_trace_fpu1 PARAMS ((SIM_DESC, sim_cpu *, sim_cia, int, sim_fpu *));
+extern void tic80_trace_fpu2i PARAMS ((SIM_DESC, sim_cpu *, sim_cia, int, unsigned32, sim_fpu *, sim_fpu *));
+extern void tic80_trace_fpu2cmp PARAMS ((SIM_DESC, sim_cpu *, sim_cia, int, unsigned32, sim_fpu *, sim_fpu *));
extern char *tic80_trace_nop PARAMS ((int));
extern char *tic80_trace_sink1 PARAMS ((int, unsigned32));
extern char *tic80_trace_sink2 PARAMS ((int, unsigned32, unsigned32));
@@ -220,7 +220,7 @@ do { \
do { \
if (TRACE_FPU_P (CPU)) { \
tic80_trace_fpu3 (SD, CPU, cia, MY_INDEX, \
- result, input1, input2); \
+ &result, &input1, &input2); \
} \
} while (0)
@@ -228,7 +228,7 @@ do { \
do { \
if (TRACE_FPU_P (CPU)) { \
tic80_trace_fpu2 (SD, CPU, cia, MY_INDEX, \
- result, input); \
+ &result, &input); \
} \
} while (0)
@@ -236,7 +236,7 @@ do { \
do { \
if (TRACE_FPU_P (CPU)) { \
tic80_trace_fpu1 (SD, CPU, cia, MY_INDEX, \
- result); \
+ &result); \
} \
} while (0)
@@ -244,7 +244,7 @@ do { \
do { \
if (TRACE_FPU_P (CPU)) { \
tic80_trace_fpu2i (SD, CPU, cia, MY_INDEX, \
- result, input1, input2); \
+ result, &input1, &input2); \
} \
} while (0)
@@ -252,7 +252,7 @@ do { \
do { \
if (TRACE_FPU_P (CPU)) { \
tic80_trace_fpu2cmp (SD, CPU, cia, MY_INDEX, \
- result, input1, input2); \
+ result, &input1, &input2); \
} \
} while (0)
diff --git a/sim/tic80/misc.c b/sim/tic80/misc.c
index 0548074..f9e4d3c 100644
--- a/sim/tic80/misc.c
+++ b/sim/tic80/misc.c
@@ -314,9 +314,9 @@ tic80_trace_fpu3 (SIM_DESC sd,
sim_cpu *cpu,
sim_cia cia,
int indx,
- sim_fpu result,
- sim_fpu input1,
- sim_fpu input2)
+ sim_fpu *result,
+ sim_fpu *input1,
+ sim_fpu *input2)
{
if (!tic80_size_name)
tic80_init_trace ();
@@ -325,9 +325,9 @@ tic80_trace_fpu3 (SIM_DESC sd,
itable[indx].file, itable[indx].line_nr, "fpu",
"%-*s %*g %*g => %*g",
tic80_size_name, itable[indx].name,
- SIZE_HEX + SIZE_DECIMAL + 3, sim_fpu_2d (&input1),
- SIZE_HEX + SIZE_DECIMAL + 3, sim_fpu_2d (&input2),
- SIZE_HEX + SIZE_DECIMAL + 3, sim_fpu_2d (&result));
+ SIZE_HEX + SIZE_DECIMAL + 3, sim_fpu_2d (input1),
+ SIZE_HEX + SIZE_DECIMAL + 3, sim_fpu_2d (input2),
+ SIZE_HEX + SIZE_DECIMAL + 3, sim_fpu_2d (result));
}
/* Trace the result of an FPU operation with 1 floating point input and a floating point output */
@@ -336,8 +336,8 @@ tic80_trace_fpu2 (SIM_DESC sd,
sim_cpu *cpu,
sim_cia cia,
int indx,
- sim_fpu result,
- sim_fpu input)
+ sim_fpu *result,
+ sim_fpu *input)
{
if (!tic80_size_name)
tic80_init_trace ();
@@ -346,9 +346,9 @@ tic80_trace_fpu2 (SIM_DESC sd,
itable[indx].file, itable[indx].line_nr, "fpu",
"%-*s %*g %-*s => %*g",
tic80_size_name, itable[indx].name,
- SIZE_HEX + SIZE_DECIMAL + 3, sim_fpu_2d (&input),
+ SIZE_HEX + SIZE_DECIMAL + 3, sim_fpu_2d (input),
SIZE_HEX + SIZE_DECIMAL + 3, "",
- SIZE_HEX + SIZE_DECIMAL, sim_fpu_2d (&result));
+ SIZE_HEX + SIZE_DECIMAL, sim_fpu_2d (result));
}
/* Trace the result of an FPU operation with 1 floating point input and a floating point output */
@@ -357,7 +357,7 @@ tic80_trace_fpu1 (SIM_DESC sd,
sim_cpu *cpu,
sim_cia cia,
int indx,
- sim_fpu result)
+ sim_fpu *result)
{
if (!tic80_size_name)
tic80_init_trace ();
@@ -368,7 +368,7 @@ tic80_trace_fpu1 (SIM_DESC sd,
tic80_size_name, itable[indx].name,
SIZE_HEX + SIZE_DECIMAL + 3, "",
SIZE_HEX + SIZE_DECIMAL + 3, "",
- SIZE_HEX + SIZE_DECIMAL, sim_fpu_2d (&result));
+ SIZE_HEX + SIZE_DECIMAL, sim_fpu_2d (result));
}
/* Trace the result of an FPU operation with 2 floating point inputs and an integer output */
@@ -378,18 +378,18 @@ tic80_trace_fpu2i (SIM_DESC sd,
sim_cia cia,
int indx,
unsigned32 result,
- sim_fpu input1,
- sim_fpu input2)
+ sim_fpu *input1,
+ sim_fpu *input2)
{
if (!tic80_size_name)
tic80_init_trace ();
trace_one_insn (sd, cpu, cia.ip, 1,
itable[indx].file, itable[indx].line_nr, "fpu",
- "%-*s %*f %*f => 0x%.*lx %-*ld",
+ "%-*s %*g %*g => 0x%.*lx %-*ld",
tic80_size_name, itable[indx].name,
- SIZE_HEX + SIZE_DECIMAL + 3, sim_fpu_2d (&input1),
- SIZE_HEX + SIZE_DECIMAL + 3, sim_fpu_2d (&input2),
+ SIZE_HEX + SIZE_DECIMAL + 3, sim_fpu_2d (input1),
+ SIZE_HEX + SIZE_DECIMAL + 3, sim_fpu_2d (input2),
SIZE_HEX, result, SIZE_DECIMAL, (long)(signed32)result);
}
@@ -401,18 +401,18 @@ tic80_trace_fpu2cmp (SIM_DESC sd,
sim_cia cia,
int indx,
unsigned32 result,
- sim_fpu input1,
- sim_fpu input2)
+ sim_fpu *input1,
+ sim_fpu *input2)
{
if (!tic80_size_name)
tic80_init_trace ();
trace_one_insn (sd, cpu, cia.ip, 1,
itable[indx].file, itable[indx].line_nr, "fpu",
- "%-*s %*f %*f => 0x%.*lx %s",
+ "%-*s %*g %*g => 0x%.*lx %s",
tic80_size_name, itable[indx].name,
- SIZE_HEX + SIZE_DECIMAL + 3, sim_fpu_2d (&input1),
- SIZE_HEX + SIZE_DECIMAL + 3, sim_fpu_2d (&input2),
+ SIZE_HEX + SIZE_DECIMAL + 3, sim_fpu_2d (input1),
+ SIZE_HEX + SIZE_DECIMAL + 3, sim_fpu_2d (input2),
SIZE_HEX, result, tic80_trace_cmp_internal (result));
}