Make columns line up for fpu operation tracing
authorMichael Meissner <gnu@the-meissners.org>
Wed, 14 May 1997 22:06:45 +0000 (22:06 +0000)
committerMichael Meissner <gnu@the-meissners.org>
Wed, 14 May 1997 22:06:45 +0000 (22:06 +0000)
sim/tic80/ChangeLog
sim/tic80/misc.c

index 8ef6fec..9c6908d 100644 (file)
@@ -1,3 +1,9 @@
+Wed May 14 18:05:50 1997  Mike Meissner  <meissner@cygnus.com>
+
+       * misc.c (tic80_trace_fpu{3,2,2i}): Align columns with other
+       insns.  Use %g to print floating point instead of %f in case the
+       numbers are real large.
+
 Tue May 13 18:00:10 1997  Mike Meissner  <meissner@cygnus.com>
 
        * insns (do_trap): For system calls that are defined, but not
index e24efd3..33a2785 100644 (file)
@@ -239,11 +239,11 @@ tic80_trace_fpu3 (SIM_DESC sd,
 
   trace_one_insn (sd, cpu, cia.ip, 1,
                  itable[indx].file, itable[indx].line_nr, "fpu",
-                 "%-*s %*f %*f => %*f",
+                 "%-*s %*g %*g => %*g",
                  tic80_size_name, itable[indx].name,
-                 SIZE_HEX + SIZE_DECIMAL + 1, sim_fpu_2d (input1),
-                 SIZE_HEX + SIZE_DECIMAL + 1, sim_fpu_2d (input2),
-                 SIZE_HEX + SIZE_DECIMAL + 1, 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 */
@@ -260,10 +260,10 @@ tic80_trace_fpu2 (SIM_DESC sd,
 
   trace_one_insn (sd, cpu, cia.ip, 1,
                  itable[indx].file, itable[indx].line_nr, "fpu",
-                 "%-*s %*f %-*s => %*f",
+                 "%-*s %*g %-*s => %*g",
                  tic80_size_name, itable[indx].name,
-                 SIZE_HEX + SIZE_DECIMAL + 1, sim_fpu_2d (input),
-                 SIZE_HEX + SIZE_DECIMAL + 1, "",
+                 SIZE_HEX + SIZE_DECIMAL + 3, sim_fpu_2d (input),
+                 SIZE_HEX + SIZE_DECIMAL + 3, "",
                  SIZE_HEX + SIZE_DECIMAL, sim_fpu_2d (result));
 }