aboutsummaryrefslogtreecommitdiff
path: root/gdb/config
diff options
context:
space:
mode:
authorZdenek Radouch <radouch@cygnus>1999-01-15 22:17:00 +0000
committerZdenek Radouch <radouch@cygnus>1999-01-15 22:17:00 +0000
commit517b49896ac8e19c24f896903ac9b0e4560de610 (patch)
tree2123f1856c6130071d0b1f2ca11353f7280610be /gdb/config
parent93b84526e8cb07325f5221c73c30806599a436cf (diff)
downloadgdb-517b49896ac8e19c24f896903ac9b0e4560de610.zip
gdb-517b49896ac8e19c24f896903ac9b0e4560de610.tar.gz
gdb-517b49896ac8e19c24f896903ac9b0e4560de610.tar.bz2
Changed ABI to match a GCC change. Structs passed by value are always
passed using a pointer.
Diffstat (limited to 'gdb/config')
-rw-r--r--gdb/config/fr30/tm-fr30.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/gdb/config/fr30/tm-fr30.h b/gdb/config/fr30/tm-fr30.h
index 3870f88..ea32792 100644
--- a/gdb/config/fr30/tm-fr30.h
+++ b/gdb/config/fr30/tm-fr30.h
@@ -213,9 +213,20 @@ fr30_push_arguments PARAMS ((int nargs, struct value **args, CORE_ADDR sp,
#define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP)
-/* always pass struct by value as a pointer */
-/* XXX Z.R. GCC does not do that today */
+/* Fujitsu's ABI requires all structs to be passed using a pointer.
+ That is obviously not very efficient, so I am leaving the definitions
+ to make gdb work with GCC style struct passing, in case we decide
+ to go for better performance, rather than for compatibility with
+ Fujitsu (just change STRUCT_ALWAYS_BY_ADDR to 0) */
+
+#define STRUCT_ALWAYS_BY_ADDR 1
+
+#if(STRUCT_ALWAYS_BY_ADDR)
+#define REG_STRUCT_HAS_ADDR(gcc_p,type) 1
+#else
+/* more standard GCC (optimized) */
#define REG_STRUCT_HAS_ADDR(gcc_p,type) \
((TYPE_LENGTH(type) > 4) && (TYPE_LENGTH(type) & 0x3))
+#endif
/* alway return struct by value by input pointer */
#define USE_STRUCT_CONVENTION(GCC_P, TYPE) 1