* i387-tdep.c, i386-tdep.c i386v-nat.c, i386aix-nat.c,
i386m3-nat.c, config/m68k/tm-m68k.h, i960-tdep.c config/i960/tm-i960.h, remote-nindy.c, config/m88k/tm-m88k.h, m88k-tdep.c: Use floatformat.h instead of ieee-float.h. * sparc-tdep.c: Remove now-obsolete ieee-float.h stuff * findvar.c: Update comment regarding ieee-float.h.
This commit is contained in:
parent
b30601cb28
commit
4879254531
|
@ -166,15 +166,15 @@ extern CORE_ADDR saved_pc_after_call ();
|
||||||
|
|
||||||
#define REGISTER_CONVERTIBLE(N) ((N) >= FP0_REGNUM)
|
#define REGISTER_CONVERTIBLE(N) ((N) >= FP0_REGNUM)
|
||||||
|
|
||||||
|
#include "floatformat.h"
|
||||||
|
|
||||||
/* Convert data from raw format for register REGNUM in buffer FROM
|
/* Convert data from raw format for register REGNUM in buffer FROM
|
||||||
to virtual format with type TYPE in buffer TO. */
|
to virtual format with type TYPE in buffer TO. */
|
||||||
|
|
||||||
extern struct ext_format ext_format_i960;
|
|
||||||
|
|
||||||
#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,TYPE,FROM,TO) \
|
#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,TYPE,FROM,TO) \
|
||||||
{ \
|
{ \
|
||||||
double val; \
|
double val; \
|
||||||
ieee_extended_to_double (&ext_format_i960, (FROM), &val); \
|
floatformat_to_double (&floatformat_i960_ext, (FROM), &val); \
|
||||||
store_floating ((TO), TYPE_LENGTH (TYPE), val); \
|
store_floating ((TO), TYPE_LENGTH (TYPE), val); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ extern struct ext_format ext_format_i960;
|
||||||
#define REGISTER_CONVERT_TO_RAW(TYPE,REGNUM,FROM,TO) \
|
#define REGISTER_CONVERT_TO_RAW(TYPE,REGNUM,FROM,TO) \
|
||||||
{ \
|
{ \
|
||||||
double val = extract_floating ((FROM), TYPE_LENGTH (TYPE)); \
|
double val = extract_floating ((FROM), TYPE_LENGTH (TYPE)); \
|
||||||
double_to_ieee_extended (&ext_format_i960, &val, (TO)); \
|
floatformat_from_double (&floatformat_i960_ext, &val, (TO)); \
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the GDB type object for the "standard" data type
|
/* Return the GDB type object for the "standard" data type
|
||||||
|
|
|
@ -18,8 +18,6 @@ You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
#include "ieee-float.h"
|
|
||||||
|
|
||||||
/* g++ support is not yet included. */
|
/* g++ support is not yet included. */
|
||||||
|
|
||||||
/* Define the bit, byte, and word ordering of the machine. */
|
/* Define the bit, byte, and word ordering of the machine. */
|
||||||
|
@ -388,7 +386,7 @@ if (!target_is_m88110) \
|
||||||
|
|
||||||
#define REGISTER_CONVERTIBLE(N) ((N) >= XFP_REGNUM)
|
#define REGISTER_CONVERTIBLE(N) ((N) >= XFP_REGNUM)
|
||||||
|
|
||||||
extern const struct ext_format ext_format_m88110;
|
#include "floatformat.h"
|
||||||
|
|
||||||
/* Convert data from raw format for register REGNUM in buffer FROM
|
/* Convert data from raw format for register REGNUM in buffer FROM
|
||||||
to virtual format with type TYPE in buffer TO. */
|
to virtual format with type TYPE in buffer TO. */
|
||||||
|
@ -396,7 +394,7 @@ extern const struct ext_format ext_format_m88110;
|
||||||
#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,TYPE,FROM,TO) \
|
#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,TYPE,FROM,TO) \
|
||||||
{ \
|
{ \
|
||||||
double val; \
|
double val; \
|
||||||
ieee_extended_to_double (&ext_format_m88110, (FROM), &val); \
|
floatformat_to_double (&floatformat_m88110_ext, (FROM), &val); \
|
||||||
store_floating ((TO), TYPE_LENGTH (TYPE), val); \
|
store_floating ((TO), TYPE_LENGTH (TYPE), val); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -406,7 +404,7 @@ extern const struct ext_format ext_format_m88110;
|
||||||
#define REGISTER_CONVERT_TO_RAW(TYPE,REGNUM,FROM,TO) \
|
#define REGISTER_CONVERT_TO_RAW(TYPE,REGNUM,FROM,TO) \
|
||||||
{ \
|
{ \
|
||||||
double val = extract_floating ((FROM), TYPE_LENGTH (TYPE)); \
|
double val = extract_floating ((FROM), TYPE_LENGTH (TYPE)); \
|
||||||
double_to_ieee_extended (&ext_format_m88110, &val, (TO)); \
|
floatformat_from_double (&floatformat_m88110_ext, &val, (TO)); \
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the GDB type object for the "standard" data type
|
/* Return the GDB type object for the "standard" data type
|
||||||
|
|
|
@ -195,9 +195,8 @@ store_address (addr, len, val)
|
||||||
formats. So if host is IEEE floating and target is VAX floating,
|
formats. So if host is IEEE floating and target is VAX floating,
|
||||||
or vice-versa, it loses. This means that we can't (yet) use these
|
or vice-versa, it loses. This means that we can't (yet) use these
|
||||||
routines for extendeds. Extendeds are handled by
|
routines for extendeds. Extendeds are handled by
|
||||||
REGISTER_CONVERTIBLE. What we want is a fixed version of
|
REGISTER_CONVERTIBLE. What we want is to use floatformat.h, but that
|
||||||
ieee-float.c (the current version can't deal with single or double,
|
doesn't yet handle VAX floating at all.
|
||||||
and I suspect it is probably broken for some extendeds too).
|
|
||||||
|
|
||||||
2. We can't deal with it if there is more than one floating point
|
2. We can't deal with it if there is more than one floating point
|
||||||
format in use. This has to be fixed at the unpack_double level.
|
format in use. This has to be fixed at the unpack_double level.
|
||||||
|
@ -423,14 +422,14 @@ value_of_register (regnum)
|
||||||
{
|
{
|
||||||
CORE_ADDR addr;
|
CORE_ADDR addr;
|
||||||
int optim;
|
int optim;
|
||||||
register value val;
|
register value reg_val;
|
||||||
char raw_buffer[MAX_REGISTER_RAW_SIZE];
|
char raw_buffer[MAX_REGISTER_RAW_SIZE];
|
||||||
enum lval_type lval;
|
enum lval_type lval;
|
||||||
|
|
||||||
get_saved_register (raw_buffer, &optim, &addr,
|
get_saved_register (raw_buffer, &optim, &addr,
|
||||||
selected_frame, regnum, &lval);
|
selected_frame, regnum, &lval);
|
||||||
|
|
||||||
val = allocate_value (REGISTER_VIRTUAL_TYPE (regnum));
|
reg_val = allocate_value (REGISTER_VIRTUAL_TYPE (regnum));
|
||||||
|
|
||||||
/* Convert raw data to virtual format if necessary. */
|
/* Convert raw data to virtual format if necessary. */
|
||||||
|
|
||||||
|
@ -438,17 +437,17 @@ value_of_register (regnum)
|
||||||
if (REGISTER_CONVERTIBLE (regnum))
|
if (REGISTER_CONVERTIBLE (regnum))
|
||||||
{
|
{
|
||||||
REGISTER_CONVERT_TO_VIRTUAL (regnum, REGISTER_VIRTUAL_TYPE (regnum),
|
REGISTER_CONVERT_TO_VIRTUAL (regnum, REGISTER_VIRTUAL_TYPE (regnum),
|
||||||
raw_buffer, VALUE_CONTENTS_RAW (val));
|
raw_buffer, VALUE_CONTENTS_RAW (reg_val));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
memcpy (VALUE_CONTENTS_RAW (val), raw_buffer,
|
memcpy (VALUE_CONTENTS_RAW (reg_val), raw_buffer,
|
||||||
REGISTER_RAW_SIZE (regnum));
|
REGISTER_RAW_SIZE (regnum));
|
||||||
VALUE_LVAL (val) = lval;
|
VALUE_LVAL (reg_val) = lval;
|
||||||
VALUE_ADDRESS (val) = addr;
|
VALUE_ADDRESS (reg_val) = addr;
|
||||||
VALUE_REGNO (val) = regnum;
|
VALUE_REGNO (reg_val) = regnum;
|
||||||
VALUE_OPTIMIZED_OUT (val) = optim;
|
VALUE_OPTIMIZED_OUT (reg_val) = optim;
|
||||||
return val;
|
return reg_val;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Low level examining and depositing of registers.
|
/* Low level examining and depositing of registers.
|
||||||
|
|
|
@ -22,12 +22,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
#include "gdbcore.h"
|
#include "gdbcore.h"
|
||||||
#include "target.h"
|
#include "target.h"
|
||||||
<<<<<<< i386-tdep.c
|
|
||||||
#include "floatformat.h"
|
#include "floatformat.h"
|
||||||
||||||| 1.26
|
|
||||||
=======
|
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
>>>>>>> 1.27
|
|
||||||
|
|
||||||
static long
|
static long
|
||||||
i386_get_frame_setup PARAMS ((int));
|
i386_get_frame_setup PARAMS ((int));
|
||||||
|
|
|
@ -47,11 +47,10 @@ extern int errno;
|
||||||
#include <sys/reg.h>
|
#include <sys/reg.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "ieee-float.h"
|
#include "floatformat.h"
|
||||||
|
|
||||||
#include "target.h"
|
#include "target.h"
|
||||||
|
|
||||||
extern struct ext_format ext_format_i387;
|
|
||||||
|
|
||||||
/* this table must line up with REGISTER_NAMES in tm-i386v.h */
|
/* this table must line up with REGISTER_NAMES in tm-i386v.h */
|
||||||
/* symbols like 'EAX' come from <sys/reg.h> */
|
/* symbols like 'EAX' come from <sys/reg.h> */
|
||||||
|
|
|
@ -55,8 +55,6 @@ FIXME!! UPAGES is neither 2 nor 16
|
||||||
extern void print_387_control_word (); /* i387-tdep.h */
|
extern void print_387_control_word (); /* i387-tdep.h */
|
||||||
extern void print_387_status_word ();
|
extern void print_387_status_word ();
|
||||||
|
|
||||||
extern struct ext_format ext_format_i387;
|
|
||||||
|
|
||||||
#define private static
|
#define private static
|
||||||
|
|
||||||
|
|
||||||
|
@ -313,7 +311,7 @@ print_387_status (status, ep)
|
||||||
for (i = 9; i >= 0; i--)
|
for (i = 9; i >= 0; i--)
|
||||||
printf_unfiltered ("%02x", ep->regs[fpreg][i]);
|
printf_unfiltered ("%02x", ep->regs[fpreg][i]);
|
||||||
|
|
||||||
ieee_extended_to_double (&ext_format_i387, (char *)ep->regs[fpreg],
|
floatformat_to_double (&floatformat_i387_ext, (char *)ep->regs[fpreg],
|
||||||
&val);
|
&val);
|
||||||
printf_unfiltered (" %g\n", val);
|
printf_unfiltered (" %g\n", val);
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,16 +27,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
#include "value.h"
|
#include "value.h"
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "ieee-float.h"
|
#include "floatformat.h"
|
||||||
#include "target.h"
|
#include "target.h"
|
||||||
|
|
||||||
/* Structure of i960 extended floating point format. */
|
|
||||||
|
|
||||||
const struct ext_format ext_format_i960 = {
|
|
||||||
/* tot sbyte smask expbyte manbyte */
|
|
||||||
12, 9, 0x80, 9,8, 4,0, /* i960 */
|
|
||||||
};
|
|
||||||
|
|
||||||
/* gdb960 is always running on a non-960 host. Check its characteristics.
|
/* gdb960 is always running on a non-960 host. Check its characteristics.
|
||||||
This routine must be called as part of gdb initialization. */
|
This routine must be called as part of gdb initialization. */
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
#include "setjmp.h"
|
#include "setjmp.h"
|
||||||
#include "value.h"
|
#include "value.h"
|
||||||
#include "ieee-float.h" /* for ext_format & friends */
|
|
||||||
|
|
||||||
/* Size of an instruction */
|
/* Size of an instruction */
|
||||||
#define BYTES_PER_88K_INSN 4
|
#define BYTES_PER_88K_INSN 4
|
||||||
|
@ -37,13 +36,6 @@ void frame_find_saved_regs ();
|
||||||
relevance for the ways in which we screw with instruction pointers. */
|
relevance for the ways in which we screw with instruction pointers. */
|
||||||
int target_is_m88110 = 0;
|
int target_is_m88110 = 0;
|
||||||
|
|
||||||
/* FIXME: this is really just a guess based on m88110 being big
|
|
||||||
endian. */
|
|
||||||
const struct ext_format ext_format_m88110 = {
|
|
||||||
/* tot sbyte smask expbyte manbyte */
|
|
||||||
10, 0, 0x80, 0,1, 4,8 /* m88110 */
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Given a GDB frame, determine the address of the calling function's frame.
|
/* Given a GDB frame, determine the address of the calling function's frame.
|
||||||
This will be used to create a new GDB frame struct, and then
|
This will be used to create a new GDB frame struct, and then
|
||||||
INIT_EXTRA_FRAME_INFO and INIT_FRAME_PC will be called for the new frame.
|
INIT_EXTRA_FRAME_INFO and INIT_FRAME_PC will be called for the new frame.
|
||||||
|
|
|
@ -107,7 +107,7 @@ NINDY ROM monitor at the other end of the line.
|
||||||
#include "target.h"
|
#include "target.h"
|
||||||
#include "gdbcore.h"
|
#include "gdbcore.h"
|
||||||
#include "command.h"
|
#include "command.h"
|
||||||
#include "ieee-float.h"
|
#include "floatformat.h"
|
||||||
|
|
||||||
#include "wait.h"
|
#include "wait.h"
|
||||||
#include <sys/file.h>
|
#include <sys/file.h>
|
||||||
|
@ -129,7 +129,6 @@ extern void generic_mourn_inferior ();
|
||||||
|
|
||||||
extern struct target_ops nindy_ops;
|
extern struct target_ops nindy_ops;
|
||||||
extern GDB_FILE *instream;
|
extern GDB_FILE *instream;
|
||||||
extern struct ext_format ext_format_i960; /* i960-tdep.c */
|
|
||||||
|
|
||||||
extern char ninStopWhy ();
|
extern char ninStopWhy ();
|
||||||
extern int ninMemGet ();
|
extern int ninMemGet ();
|
||||||
|
@ -442,7 +441,7 @@ nindy_fetch_registers(regno)
|
||||||
&nindy_regs.fp_as_double[8 * (regnum - FP0_REGNUM)],
|
&nindy_regs.fp_as_double[8 * (regnum - FP0_REGNUM)],
|
||||||
&inv);
|
&inv);
|
||||||
/* dub now in host byte order */
|
/* dub now in host byte order */
|
||||||
double_to_ieee_extended (&ext_format_i960, &dub,
|
floatformat_from_double (&floatformat_i960_ext, &dub,
|
||||||
®isters[REGISTER_BYTE (regnum)]);
|
®isters[REGISTER_BYTE (regnum)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -471,7 +470,7 @@ nindy_store_registers(regno)
|
||||||
memcpy (nindy_regs.tcw, ®isters[REGISTER_BYTE (TCW_REGNUM)], 1*4);
|
memcpy (nindy_regs.tcw, ®isters[REGISTER_BYTE (TCW_REGNUM)], 1*4);
|
||||||
for (regnum = FP0_REGNUM; regnum < FP0_REGNUM + 4; regnum++)
|
for (regnum = FP0_REGNUM; regnum < FP0_REGNUM + 4; regnum++)
|
||||||
{
|
{
|
||||||
ieee_extended_to_double (&ext_format_i960,
|
floatformat_to_double (&floatformat_i960_ext,
|
||||||
®isters[REGISTER_BYTE (regnum)], &dub);
|
®isters[REGISTER_BYTE (regnum)], &dub);
|
||||||
store_floating (&nindy_regs.fp_as_double[8 * (regnum - FP0_REGNUM)],
|
store_floating (&nindy_regs.fp_as_double[8 * (regnum - FP0_REGNUM)],
|
||||||
REGISTER_VIRTUAL_SIZE (regnum),
|
REGISTER_VIRTUAL_SIZE (regnum),
|
||||||
|
|
|
@ -22,7 +22,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
#include "obstack.h"
|
#include "obstack.h"
|
||||||
#include "target.h"
|
#include "target.h"
|
||||||
#include "ieee-float.h"
|
#include "value.h"
|
||||||
|
|
||||||
#include "symfile.h" /* for objfiles.h */
|
#include "symfile.h" /* for objfiles.h */
|
||||||
#include "objfiles.h" /* for find_pc_section */
|
#include "objfiles.h" /* for find_pc_section */
|
||||||
|
@ -164,6 +164,29 @@ sparc_frame_saved_pc (frame)
|
||||||
char buf[MAX_REGISTER_RAW_SIZE];
|
char buf[MAX_REGISTER_RAW_SIZE];
|
||||||
CORE_ADDR addr;
|
CORE_ADDR addr;
|
||||||
|
|
||||||
|
if (frame->signal_handler_caller)
|
||||||
|
{
|
||||||
|
/* This is the signal trampoline frame.
|
||||||
|
Get the saved PC from the sigcontext structure. */
|
||||||
|
|
||||||
|
#ifndef SIGCONTEXT_PC_OFFSET
|
||||||
|
#define SIGCONTEXT_PC_OFFSET 12
|
||||||
|
#endif
|
||||||
|
|
||||||
|
CORE_ADDR sigcontext_addr;
|
||||||
|
char scbuf[TARGET_PTR_BIT / HOST_CHAR_BIT];
|
||||||
|
|
||||||
|
/* The sigcontext address is contained in register O2. */
|
||||||
|
get_saved_register (buf, (int *)NULL, (CORE_ADDR *)NULL,
|
||||||
|
frame, O0_REGNUM + 2, (enum lval_type *)NULL);
|
||||||
|
sigcontext_addr = extract_address (buf, REGISTER_RAW_SIZE (O0_REGNUM));
|
||||||
|
|
||||||
|
/* Don't cause a memory_error when accessing sigcontext in case the
|
||||||
|
stack layout has changed or the stack is corrupt. */
|
||||||
|
target_read_memory (sigcontext_addr + SIGCONTEXT_PC_OFFSET,
|
||||||
|
scbuf, sizeof (scbuf));
|
||||||
|
return extract_address (scbuf, sizeof (scbuf));
|
||||||
|
}
|
||||||
addr = (frame->bottom + FRAME_SAVED_I0 +
|
addr = (frame->bottom + FRAME_SAVED_I0 +
|
||||||
REGISTER_RAW_SIZE (I7_REGNUM) * (I7_REGNUM - I0_REGNUM));
|
REGISTER_RAW_SIZE (I7_REGNUM) * (I7_REGNUM - I0_REGNUM));
|
||||||
read_memory (addr, buf, REGISTER_RAW_SIZE (I7_REGNUM));
|
read_memory (addr, buf, REGISTER_RAW_SIZE (I7_REGNUM));
|
||||||
|
@ -568,16 +591,6 @@ sparc_pc_adjust(pc)
|
||||||
else
|
else
|
||||||
return pc+8;
|
return pc+8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Structure of SPARC extended floating point numbers.
|
|
||||||
This information is not currently used by GDB, since no current SPARC
|
|
||||||
implementations support extended float. */
|
|
||||||
|
|
||||||
const struct ext_format ext_format_sparc = {
|
|
||||||
/* tot sbyte smask expbyte manbyte */
|
|
||||||
16, 0, 0x80, 0,1, 4,8, /* sparc */
|
|
||||||
};
|
|
||||||
|
|
||||||
#ifdef USE_PROC_FS /* Target dependent support for /proc */
|
#ifdef USE_PROC_FS /* Target dependent support for /proc */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue