PowerPC64 little-endian fixes: 128-bit DFP parameters / registers
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Tue, 4 Feb 2014 17:34:19 +0000 (18:34 +0100)
committerUlrich Weigand <ulrich.weigand@de.ibm.com>
Tue, 4 Feb 2014 17:36:54 +0000 (18:36 +0100)
commit0ff3e01fdc67a3842ee54224cf197e9a55f0a750
tree6701305e41191a62601abc754dee8fd5013d9072
parent5b757e5ddbd9ad252d9c51103f1aa52b41c2e947
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*-*.
gdb/ChangeLog
gdb/ppc-sysv-tdep.c
gdb/rs6000-tdep.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.arch/powerpc-d128-regs.exp
This page took 0.025958 seconds and 4 git commands to generate.