short return values for sparc and 68k. Patch from Paul Eggert.
Fri Oct 25 16:06:38 1991 Stu Grossman (grossman at cygnus.com)
+ * tm-sparc.h, tm-68k.h (EXTRACT_RETURN_VALUE): fix output of
+ short return values for sparc and 68k. Patch from Paul Eggert.
+
* coffread.c, coredep.c, i386-xdep.c: install patches for
SysV/386 3.2 from Mauro DePalma.
#if !defined (EXTRACT_RETURN_VALUE)
#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
- bcopy (REGBUF, VALBUF, TYPE_LENGTH (TYPE))
+ bcopy ((char *)(REGBUF) + \
+ (TYPE_LENGTH(TYPE) >= 4 ? 0 : 4 - TYPE_LENGTH(TYPE)), \
+ VALBUF, TYPE_LENGTH(TYPE))
#endif
/* Write into appropriate registers a function return value
(VALBUF), TYPE_LENGTH(TYPE)); \
} \
else \
- bcopy (((int *)(REGBUF))+8, (VALBUF), TYPE_LENGTH (TYPE)); \
+ bcopy ((char *)(REGBUF) + 4 * 8 + \
+ (TYPE_LENGTH(TYPE) >= 4 ? 0 : 4 - TYPE_LENGTH(TYPE)), \
+ (VALBUF), TYPE_LENGTH(TYPE)); \
}
/* Write into appropriate registers a function return value