summaryrefslogtreecommitdiff
path: root/gdb/cris-tdep.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2004-01-18 00:01:32 +0000
committerAndrew Cagney <cagney@redhat.com>2004-01-18 00:01:32 +0000
commit53e5de5b06d4dba36e03f69c6f8132894a490894 (patch)
tree032f4ce0f961b1700ebba5dfb7dd811ff881beb5 /gdb/cris-tdep.c
parent00902094f7e99256c6b48c286f8cd8c160b46719 (diff)
downloadgdb-53e5de5b06d4dba36e03f69c6f8132894a490894.tar.gz
2004-01-17 Andrew Cagney <cagney@redhat.com>
* cris-tdep.c (cris_store_struct_return): Put back accidently deleted function.
Diffstat (limited to 'gdb/cris-tdep.c')
-rw-r--r--gdb/cris-tdep.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index fe8b9726972..6ef3b05c270 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -1076,6 +1076,17 @@ cris_abi_v2_extract_return_value (struct type *type, char *regbuf,
internal_error (__FILE__, __LINE__, "cris_abi_v2_extract_return_value: type length too large");
}
+/* Store the address of the place in which to copy the structure the
+ subroutine will return. In the CRIS ABI, R9 is used in order to
+ pass the address of the allocated area where a structure return
+ value must be stored. */
+
+static void
+cris_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
+{
+ write_register (STR_REGNUM, addr);
+}
+
/* Returns 1 if the given type will be passed by pointer rather than
directly. */