This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfa] Attempt #3: Eliminate HOST_*_FORMAT from arm-*tdep.c
- To: Fernando Nasser <fnasser at cygnus dot com>
- Subject: Re: [rfa] Attempt #3: Eliminate HOST_*_FORMAT from arm-*tdep.c
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Tue, 21 Aug 2001 00:28:29 -0400
- Cc: gdb-patches at sources dot redhat dot com
- References: <3B60DF2A.5020902@cygnus.com> <3B7086BC.5020908@cygnus.com> <3B81CA86.FEDFF20D@cygnus.com>
>
> Sorry for the delay Andrew.
>
> As per our conversation, this seems to be the correct thing to do.
> We haven't heard of any objection, so lets try it.
>
> Please check it in.
>
> Regards,
> Fernando
Thanks! I've taken the liberty of updating it slightly. Since there is
now a floatformat_arm_ext_littlebyte_bigword available, I'm able to
``FIX'' the fixme. It now uses floatformat_arm_ext_littlebyte_bigword
when the target is little endian.
I've attached the relevant bit of the patch.
Andrew
2001-07-24 Andrew Cagney <ac131313@redhat.com>
* arm-tdep.c (convert_from_extended, convert_to_extended): Delete
assembler version of function.
(convert_from_extended, convert_to_extended): Rewrite. Use
floatformat_to_doublest, floatformat_from_doublest,
floatformat_arm_ext_big, floatformat_arm_ext_littlebyte_bigword.
(arm_push_arguments): Use extract_floating and store_floating to
perform floating point conversions.
(SWAP_TARGET_AND_HOST): Delete macro.
* arm-linux-tdep.c (arm_linux_push_arguments): Use
extract_floating and store_floating to perform floating point
conversions.
print_fpu_flags (status);
}
! /* NOTE: cagney/2001-08-20: Both convert_from_extended() and
! convert_to_extended() use floatformat_arm_ext_littlebyte_bigword.
! It is thought that this is the floating-point register format on
! little-endian systems. */
static void
convert_from_extended (void *ptr, void *dbl)
{
! DOUBLEST d;
! if (TARGET_BYTE_ORDER == BIG_ENDIAN)
! floatformat_to_doublest (&floatformat_arm_ext_big, ptr, &d);
! else
! floatformat_to_doublest (&floatformat_arm_ext_littlebyte_bigword,
! ptr, &d);
! floatformat_from_doublest (TARGET_DOUBLE_FORMAT, &d, dbl);
}
void
convert_to_extended (void *dbl, void *ptr)
{
! DOUBLEST d;
! floatformat_to_doublest (TARGET_DOUBLE_FORMAT, ptr, &d);
! if (TARGET_BYTE_ORDER == BIG_ENDIAN)
! floatformat_from_doublest (&floatformat_arm_ext_big, &d, dbl);
! else
! floatformat_from_doublest (&floatformat_arm_ext_littlebyte_bigword,
! &d, dbl);
}
/* Nonzero if register N requires conversion from raw format to
virtual format. */