aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1995-08-22 08:13:34 +0000
committerJeff Law <law@redhat.com>1995-08-22 08:13:34 +0000
commit90df364f49a729b4dd8eef98704c04b2510310ad (patch)
tree01e1bcae625529f553114c8a72e72248a32674dd /gdb
parent7e72b115ada54faef45a03f47e3053f96786b7b8 (diff)
downloadgdb-90df364f49a729b4dd8eef98704c04b2510310ad.zip
gdb-90df364f49a729b4dd8eef98704c04b2510310ad.tar.gz
gdb-90df364f49a729b4dd8eef98704c04b2510310ad.tar.bz2
* tm-hppa.h (STORE_RETURN_VALUE): Fix to work with -msoft-float
calling conventions too. Use the TYPE of the return value, not its length to determine if it should also be copied into the floating point registers.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/config/pa/tm-hppa.h14
2 files changed, 16 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 44740bb..3a9f1f2 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
Tue Aug 22 02:00:47 1995 Jeff Law (law@snake.cs.utah.edu)
+ * tm-hppa.h (STORE_RETURN_VALUE): Fix to work with -msoft-float
+ calling conventions too. Use the TYPE of the return value, not
+ its length to determine if it should also be copied into the
+ floating point registers.
+
* tm-hppa.h (PROLOGUE_FIRSTLINE_OVERLAP): Delete. Causes more
problems than it fixes.
* hppa-tdep.c (skip_prologue): If we exit the main loop without
diff --git a/gdb/config/pa/tm-hppa.h b/gdb/config/pa/tm-hppa.h
index 142d8b3..1178f48 100644
--- a/gdb/config/pa/tm-hppa.h
+++ b/gdb/config/pa/tm-hppa.h
@@ -258,7 +258,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Extract from an array REGBUF containing the (raw) register state
a function return value of type TYPE, and copy that, in virtual format,
- into VALBUF. */
+ into VALBUF.
+
+ FIXME: Not sure what to do for soft float here. */
#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
{ \
@@ -274,10 +276,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
}
/* Write into appropriate registers a function return value
- of type TYPE, given in virtual format. */
+ of type TYPE, given in virtual format.
+
+ For software floating point the return value goes into the integer
+ registers. But we don't have any flag to key this on, so we always
+ store the value into the integer registers, and if it's a float value,
+ then we put it in the float registers too. */
#define STORE_RETURN_VALUE(TYPE,VALBUF) \
- write_register_bytes ((TYPE_LENGTH(TYPE) > 4 \
+ write_register_bytes (REGISTER_BYTE (28),(VALBUF), TYPE_LENGTH (TYPE)) ; \
+ write_register_bytes ((TYPE_CODE(TYPE) == TYPE_CODE_FLT \
? REGISTER_BYTE (FP4_REGNUM) \
: REGISTER_BYTE (28)), \
(VALBUF), TYPE_LENGTH (TYPE))