2014-02-04 Ulrich Weigand <uweigand@de.ibm.com>
+ * ppc-sysv-tdep.c (ppc64_sysv_abi_push_freg): Use correct
+ offset on little-endian when passing _Decimal32.
+ (ppc64_sysv_abi_return_value_base): Likewise for return values.
+
+2014-02-04 Ulrich Weigand <uweigand@de.ibm.com>
+
* rs6000-tdep.c (efpr_pseudo_register_read): Use correct offset
of the overlapped FP register within the VSX register on little-
endian platforms.
if (argpos->regcache && argpos->freg <= 13)
{
int regnum = tdep->ppc_fp0_regnum + argpos->freg;
- int offset = 8 - TYPE_LENGTH (type);
+ int offset = 0;
+
+ if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
+ offset = 8 - TYPE_LENGTH (type);
regcache_cooked_write_part (argpos->regcache, regnum,
offset, TYPE_LENGTH (type), val);
&& TYPE_CODE (valtype) == TYPE_CODE_DECFLOAT)
{
int regnum = tdep->ppc_fp0_regnum + 1 + index;
- int offset = 8 - TYPE_LENGTH (valtype);
+ int offset = 0;
+
+ if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
+ offset = 8 - TYPE_LENGTH (valtype);
if (writebuf != NULL)
regcache_cooked_write_part (regcache, regnum,