PowerPC64 little-endian fixes: 128-bit DFP parameters / registers
The powerpc64le-linux ABI specifies that when a 128-bit DFP value is
passed in a pair of floating-point registers, the first register holds
the most-significant part of the value. This is as opposed to the
usual rule on little-endian systems, where the first register would
hold the least-significant part.
This affects two places in GDB, the read/write routines for the
128-bit DFP pseudo-registers, and the function call / return
sequence. For the former, current code already distinguishes
between big- and little-endian targets, but gets the latter
wrong. This is presumably because *GCC* also got it wrong,
and GDB matches the old GCC behavior. But GCC is now fixed:
http://gcc.gnu.org/ml/gcc-patches/2013-11/msg02145.html
so GDB needs to be fixed too. (Old code shouldn't really be
an issue since there is no code "out there" so far that uses
dfp128 on little-endian ...)
gdb/ChangeLog:
* ppc-sysv-tdep.c (ppc64_sysv_abi_push_freg): Use correct order
within a register pair holding a DFP 128-bit value on little-endian.
(ppc64_sysv_abi_return_value_base): Likewise.
* rs6000-tdep.c (dfp_pseudo_register_read): Likewise.
(dfp_pseudo_register_write): Likewise.
gdb/testsuite/ChangeLog:
* gdb.arch/powerpc-d128-regs.exp: Enable on powerpc64*-*.