Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: law@redhat.com
To: gdb-patches@sources.redhat.com
Subject: PA fixes for return2.exp
Date: Wed, 19 Dec 2001 10:19:00 -0000	[thread overview]
Message-ID: <21842.1008785818@porcupine.cygnus.com> (raw)


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




             reply	other threads:[~2001-12-19 18:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-19 10:19 law [this message]
2001-12-19 10:55 ` Andrew Cagney
2001-12-19 12:12   ` law

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=21842.1008785818@porcupine.cygnus.com \
    --to=law@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox