mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 04:00:07 +08:00
PowerPC64 little-endian fixes: structure passing
When passing a small structure in a GPR, the ABI specifies that it should be passed in the least-significant bytes of the register (or stack slot). On big-endian systems, this means the value needs to be stored at an offset, which is what current code does. However, on little-endian systems, the least-significant bytes are addresses with offset 0. This patch fixes that. gdb/ChangeLog: * ppc-sysv-tdep.c (ppc64_sysv_abi_push_val): Use correct offset on little-endian when passing small structures.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2014-02-04 Ulrich Weigand <uweigand@de.ibm.com>
|
||||||
|
|
||||||
|
* ppc-sysv-tdep.c (ppc64_sysv_abi_push_val): Use correct
|
||||||
|
offset on little-endian when passing small structures.
|
||||||
|
|
||||||
2014-02-04 Ulrich Weigand <uweigand@de.ibm.com>
|
2014-02-04 Ulrich Weigand <uweigand@de.ibm.com>
|
||||||
|
|
||||||
* ppc-sysv-tdep.c (get_decimal_float_return_value): Update comment.
|
* ppc-sysv-tdep.c (get_decimal_float_return_value): Update comment.
|
||||||
|
@ -1150,7 +1150,8 @@ ppc64_sysv_abi_push_val (struct gdbarch *gdbarch,
|
|||||||
doubleword are right-aligned and those larger are left-aligned.
|
doubleword are right-aligned and those larger are left-aligned.
|
||||||
GCC versions before 3.4 implemented this incorrectly; see
|
GCC versions before 3.4 implemented this incorrectly; see
|
||||||
<http://gcc.gnu.org/gcc-3.4/powerpc-abi.html>. */
|
<http://gcc.gnu.org/gcc-3.4/powerpc-abi.html>. */
|
||||||
if (len < tdep->wordsize)
|
if (len < tdep->wordsize
|
||||||
|
&& gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
|
||||||
offset = tdep->wordsize - len;
|
offset = tdep->wordsize - len;
|
||||||
|
|
||||||
if (argpos->regcache)
|
if (argpos->regcache)
|
||||||
|
Reference in New Issue
Block a user