Output hex with local_hex_string for Modula-2 support.

This commit is contained in:
John Gilmore 1991-09-19 07:39:54 +00:00
parent 35505d07d7
commit d8b3b00eb2
2 changed files with 16 additions and 7 deletions

View File

@ -67,7 +67,7 @@ void
print_387_control_word (control) print_387_control_word (control)
unsigned short control; unsigned short control;
{ {
printf ("control %s: ", hex_to_string(control)); printf ("control %s: ", local_hex_string(control));
printf ("compute to "); printf ("compute to ");
switch ((control >> 8) & 3) switch ((control >> 8) & 3)
{ {
@ -97,14 +97,14 @@ unsigned short control;
} }
printf ("\n"); printf ("\n");
if (control & 0xe080) printf ("warning: reserved bits on: %s\n", if (control & 0xe080) printf ("warning: reserved bits on: %s\n",
hex_to_string(control & 0xe080)); local_hex_string(control & 0xe080));
} }
void void
print_387_status_word (status) print_387_status_word (status)
unsigned short status; unsigned short status;
{ {
printf ("status %s: ", hex_to_string (status)); printf ("status %s: ", local_hex_string (status));
if (status & 0xff) if (status & 0xff)
{ {
printf ("exceptions:"); printf ("exceptions:");

View File

@ -25,7 +25,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* FIXME: Can a MIPS porter/tester determine which of these include /* FIXME: Can a MIPS porter/tester determine which of these include
files we still need? -- gnu@cygnus.com */ files we still need? -- gnu@cygnus.com */
#include <stdio.h> #include <stdio.h>
#ifdef sgi
#include <sys/inst.h>
#else
#include <mips/inst.h> #include <mips/inst.h>
#endif
#include "defs.h" #include "defs.h"
#include "param.h" #include "param.h"
#include "frame.h" #include "frame.h"
@ -536,7 +540,8 @@ mips_pop_frame()
set_current_frame (create_new_frame (new_sp, read_pc ())); set_current_frame (create_new_frame (new_sp, read_pc ()));
} }
static mips_print_register(regnum, all) static
mips_print_register(regnum, all)
int regnum, all; int regnum, all;
{ {
unsigned char raw_buffer[8]; unsigned char raw_buffer[8];
@ -574,13 +579,13 @@ static mips_print_register(regnum, all)
if (val == 0) if (val == 0)
printf_filtered ("0"); printf_filtered ("0");
else if (all) else if (all)
printf_filtered ("0x%x", val); printf_filtered (local_hex_format(), val);
else else
printf_filtered ("0x%x=%d", val, val); printf_filtered ("%s=%d", local_hex_string(val), val);
} }
} }
/* Replacement for generic do_registers_info. fpregs is currently ignored. */ /* Replacement for generic do_registers_info. */
mips_do_registers_info (regnum, fpregs) mips_do_registers_info (regnum, fpregs)
int regnum; int regnum;
int fpregs; int fpregs;
@ -591,6 +596,10 @@ mips_do_registers_info (regnum, fpregs)
} }
else { else {
for (regnum = 0; regnum < NUM_REGS; ) { for (regnum = 0; regnum < NUM_REGS; ) {
if ((!fpregs) && regnum >= FP0_REGNUM && regnum <= FCRIR_REGNUM) {
regnum++;
continue;
}
mips_print_register (regnum, 1); mips_print_register (regnum, 1);
regnum++; regnum++;
if ((regnum & 3) == 0 || regnum == NUM_REGS) if ((regnum & 3) == 0 || regnum == NUM_REGS)