aboutsummaryrefslogtreecommitdiff
path: root/gdb/i960-tdep.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>1998-11-23 12:35:23 +0000
committerAndrew Cagney <cagney@redhat.com>1998-11-23 12:35:23 +0000
commit98760eab33f4963e075077cb094f9f195ca33d01 (patch)
tree60590f385f7cdd40ccf6ce14fa0437140b19686a /gdb/i960-tdep.c
parent554eb429e4555ceaa7892a8ab93c7a41045a6824 (diff)
downloadgdb-98760eab33f4963e075077cb094f9f195ca33d01.zip
gdb-98760eab33f4963e075077cb094f9f195ca33d01.tar.gz
gdb-98760eab33f4963e075077cb094f9f195ca33d01.tar.bz2
CARP: Convert macro definitions of USE_STRUCT_CONVENTION into target
specific functions.
Diffstat (limited to 'gdb/i960-tdep.c')
-rw-r--r--gdb/i960-tdep.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/gdb/i960-tdep.c b/gdb/i960-tdep.c
index a125ec2..c2625c0 100644
--- a/gdb/i960-tdep.c
+++ b/gdb/i960-tdep.c
@@ -31,6 +31,28 @@ static CORE_ADDR next_insn PARAMS ((CORE_ADDR memaddr,
unsigned int *pword1,
unsigned int *pword2));
+/* Does the specified function use the "struct returning" convention
+ or the "value returning" convention? The "value returning" convention
+ almost invariably returns the entire value in registers. The
+ "struct returning" convention often returns the entire value in
+ memory, and passes a pointer (out of or into the function) saying
+ where the value (is or should go).
+
+ Since this sometimes depends on whether it was compiled with GCC,
+ this is also an argument. This is used in call_function to build a
+ stack, and in value_being_returned to print return values.
+
+ On i960, a structure is returned in registers g0-g3, if it will fit.
+ If it's more than 16 bytes long, g13 pointed to it on entry. */
+
+int
+i960_use_struct_convention (gcc_p, type)
+ int gcc_p;
+ struct type *type;
+{
+ return (TYPE_LENGTH (type) > 16);
+}
+
/* gdb960 is always running on a non-960 host. Check its characteristics.
This routine must be called as part of gdb initialization. */