mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-27 06:17:47 +08:00
Fixes from Peter Schauer:
* config/mips/tm-mips.h (REGISTER_CONVERT_TO_TYPE, REGISTER_CONVERT_FROM_TYPE): Swap words if target, not host, is big-endian and if registers are 32 bits. * mips-tdep.c (mips_print_register, mips_extract_return_value, mips_store_return_value): Fix floating-point word-order problems on little-endian targets introduced by changes of Mar 21.
This commit is contained in:
@ -1,3 +1,13 @@
|
|||||||
|
Sun Mar 23 16:19:20 1997 Mark Alexander <marka@cygnus.com>
|
||||||
|
|
||||||
|
Fixes from Peter Schauer:
|
||||||
|
* config/mips/tm-mips.h (REGISTER_CONVERT_TO_TYPE,
|
||||||
|
REGISTER_CONVERT_FROM_TYPE): Swap words if target, not host,
|
||||||
|
is big-endian and if registers are 32 bits.
|
||||||
|
* mips-tdep.c (mips_print_register, mips_extract_return_value,
|
||||||
|
mips_store_return_value): Fix floating-point word-order problems on
|
||||||
|
little-endian targets introduced by changes of Mar 21.
|
||||||
|
|
||||||
Sun Mar 23 15:43:27 1997 Stan Shebs <shebs@andros.cygnus.com>
|
Sun Mar 23 15:43:27 1997 Stan Shebs <shebs@andros.cygnus.com>
|
||||||
|
|
||||||
* remote.c (target_resume_hook, target_wait_loop_hook): New
|
* remote.c (target_resume_hook, target_wait_loop_hook): New
|
||||||
|
@ -265,28 +265,32 @@ extern void mips_do_registers_info PARAMS ((int, int));
|
|||||||
? builtin_type_float : builtin_type_int)
|
? builtin_type_float : builtin_type_int)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HOST_BYTE_ORDER == BIG_ENDIAN
|
|
||||||
/* All mips targets store doubles in a register pair with the least
|
/* All mips targets store doubles in a register pair with the least
|
||||||
significant register in the lower numbered register.
|
significant register in the lower numbered register.
|
||||||
If the host is big endian, double register values need conversion between
|
If the target is big endian, double register values need conversion
|
||||||
memory and register formats. */
|
between memory and register formats. */
|
||||||
|
|
||||||
#define REGISTER_CONVERT_TO_TYPE(n, type, buffer) \
|
#define REGISTER_CONVERT_TO_TYPE(n, type, buffer) \
|
||||||
do {if ((n) >= FP0_REGNUM && (n) < FP0_REGNUM + 32 && \
|
do {if (TARGET_BYTE_ORDER == BIG_ENDIAN \
|
||||||
TYPE_CODE(type) == TYPE_CODE_FLT && TYPE_LENGTH(type) == 8) { \
|
&& REGISTER_RAW_SIZE (n) == 4 \
|
||||||
|
&& (n) >= FP0_REGNUM && (n) < FP0_REGNUM + 32 \
|
||||||
|
&& TYPE_CODE(type) == TYPE_CODE_FLT \
|
||||||
|
&& TYPE_LENGTH(type) == 8) { \
|
||||||
char __temp[4]; \
|
char __temp[4]; \
|
||||||
memcpy (__temp, ((char *)(buffer))+4, 4); \
|
memcpy (__temp, ((char *)(buffer))+4, 4); \
|
||||||
memcpy (((char *)(buffer))+4, (buffer), 4); \
|
memcpy (((char *)(buffer))+4, (buffer), 4); \
|
||||||
memcpy (((char *)(buffer)), __temp, 4); }} while (0)
|
memcpy (((char *)(buffer)), __temp, 4); }} while (0)
|
||||||
|
|
||||||
#define REGISTER_CONVERT_FROM_TYPE(n, type, buffer) \
|
#define REGISTER_CONVERT_FROM_TYPE(n, type, buffer) \
|
||||||
do {if ((n) >= FP0_REGNUM && (n) < FP0_REGNUM + 32 && \
|
do {if (TARGET_BYTE_ORDER == BIG_ENDIAN \
|
||||||
TYPE_CODE(type) == TYPE_CODE_FLT && TYPE_LENGTH(type) == 8) { \
|
&& REGISTER_RAW_SIZE (n) == 4 \
|
||||||
|
&& (n) >= FP0_REGNUM && (n) < FP0_REGNUM + 32 \
|
||||||
|
&& TYPE_CODE(type) == TYPE_CODE_FLT \
|
||||||
|
&& TYPE_LENGTH(type) == 8) { \
|
||||||
char __temp[4]; \
|
char __temp[4]; \
|
||||||
memcpy (__temp, ((char *)(buffer))+4, 4); \
|
memcpy (__temp, ((char *)(buffer))+4, 4); \
|
||||||
memcpy (((char *)(buffer))+4, (buffer), 4); \
|
memcpy (((char *)(buffer))+4, (buffer), 4); \
|
||||||
memcpy (((char *)(buffer)), __temp, 4); }} while (0)
|
memcpy (((char *)(buffer)), __temp, 4); }} while (0)
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Store the address of the place in which to copy the structure the
|
/* Store the address of the place in which to copy the structure the
|
||||||
subroutine will return. Handled by mips_push_arguments. */
|
subroutine will return. Handled by mips_push_arguments. */
|
||||||
|
Reference in New Issue
Block a user