* PA fixes for return2.exp
@ 2001-12-19 10:19 law
2001-12-19 10:55 ` Andrew Cagney
0 siblings, 1 reply; 3+ messages in thread
From: law @ 2001-12-19 10:19 UTC (permalink / raw)
To: gdb-patches
This patch fixes the assorted failures in return2.exp. In a nutshell, for
sub-word return types, we stored the return value into the wrong location
in the register array.
This patch makes STORE_RETURN_VALUE act like EXTRACT_RETURN_VALUE and fixes
the return2.exp failures.
* tm-hppa.h (STORE_RETURN_VALUE): Update to deal with sub-word
return types.
Index: tm-hppa.h
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/config/pa/tm-hppa.h,v
retrieving revision 1.86
diff -c -3 -p -r1.86 tm-hppa.h
*** tm-hppa.h 2001/06/14 21:03:22 1.86
--- tm-hppa.h 2001/12/19 18:13:19
*************** extern use_struct_convention_fn hppa_use
*** 361,371 ****
then we put it in the float registers too. */
#define STORE_RETURN_VALUE(TYPE,VALBUF) \
! write_register_bytes (REGISTER_BYTE (28),(VALBUF), TYPE_LENGTH (TYPE)) ; \
! if (!SOFT_FLOAT) \
! write_register_bytes ((TYPE_CODE(TYPE) == TYPE_CODE_FLT \
! ? REGISTER_BYTE (FP4_REGNUM) \
! : REGISTER_BYTE (28)), \
(VALBUF), TYPE_LENGTH (TYPE))
/* Extract from an array REGBUF containing the (raw) register state
--- 361,373 ----
then we put it in the float registers too. */
#define STORE_RETURN_VALUE(TYPE,VALBUF) \
! write_register_bytes (REGISTER_BYTE (28) + \
! (TYPE_LENGTH (TYPE) > 4 \
! ? (8 - TYPE_LENGTH (TYPE)) \
! : (4 - TYPE_LENGTH (TYPE))), \
! (VALBUF), TYPE_LENGTH (TYPE)); \
! if (!SOFT_FLOAT && TYPE_CODE (TYPE) == TYPE_CODE_FLT) \
! write_register_bytes (REGISTER_BYTE (FP4_REGNUM), \
(VALBUF), TYPE_LENGTH (TYPE))
/* Extract from an array REGBUF containing the (raw) register state
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: PA fixes for return2.exp
2001-12-19 10:19 PA fixes for return2.exp law
@ 2001-12-19 10:55 ` Andrew Cagney
2001-12-19 12:12 ` law
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Cagney @ 2001-12-19 10:55 UTC (permalink / raw)
To: law; +Cc: gdb-patches
> This patch fixes the assorted failures in return2.exp. In a nutshell, for
> sub-word return types, we stored the return value into the wrong location
> in the register array.
>
> This patch makes STORE_RETURN_VALUE act like EXTRACT_RETURN_VALUE and fixes
> the return2.exp failures.
>
> * tm-hppa.h (STORE_RETURN_VALUE): Update to deal with sub-word
> return types.
Can you please first convert the macro to a function (such 1 by 1 conversions are considered obvious).
After that the change is fine.
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2001-12-19 20:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-19 10:19 PA fixes for return2.exp law
2001-12-19 10:55 ` Andrew Cagney
2001-12-19 12:12 ` law
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox