From: Jeff Law Date: Sat, 22 Apr 1995 07:30:32 +0000 (+0000) Subject: * config/pa/tm-hppa.h (EXTRACT_RETURN_VALUE): Rewrite to correctly X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=61fe99b477d1573229285d89dc74466b3fb9a0ee;p=binutils-gdb.git * config/pa/tm-hppa.h (EXTRACT_RETURN_VALUE): Rewrite to correctly handle "short", "int" and small structures returned in registers. --- diff --git a/gdb/config/pa/tm-hppa.h b/gdb/config/pa/tm-hppa.h index e346f3a2006..d3ec6cf0f61 100644 --- a/gdb/config/pa/tm-hppa.h +++ b/gdb/config/pa/tm-hppa.h @@ -238,8 +238,17 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ into VALBUF. */ #define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ - memcpy (VALBUF, (REGBUF) + REGISTER_BYTE(TYPE_LENGTH(TYPE) > 4 ? \ - FP4_REGNUM :28), TYPE_LENGTH (TYPE)) + { \ + if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \ + memcpy ((VALBUF), \ + ((int *)(REGBUF)) + REGISTER_BYTE (FP4_REGNUM), \ + TYPE_LENGTH (TYPE)); \ + else \ + memcpy ((VALBUF), \ + (char *)(REGBUF) + REGISTER_BYTE (28) + \ + (TYPE_LENGTH (TYPE) >= 4 ? 0 : 4 - TYPE_LENGTH (TYPE)), \ + TYPE_LENGTH (TYPE)); \ + } /* Write into appropriate registers a function return value of type TYPE, given in virtual format. */