Changed ABI to match a GCC change. Structs passed by value are always
authorZdenek Radouch <radouch@cygnus>
Fri, 15 Jan 1999 22:17:00 +0000 (22:17 +0000)
committerZdenek Radouch <radouch@cygnus>
Fri, 15 Jan 1999 22:17:00 +0000 (22:17 +0000)
passed using a pointer.

gdb/ChangeLog
gdb/config/fr30/tm-fr30.h

index df444e8e42a64f77b7a063a57c75cf20a8ec5413..8e52b1f9f4a2c858ce8d2306d1494c428414b990 100644 (file)
@@ -1,3 +1,9 @@
+
+Fri Jan 15 17:11:48 EST 1999  Zdenek Radouch   (radouch@cygnus.com)
+
+       * config/fr30/tm-fr30.h:  Changed ABI to match GCC change
+         (always use pointer for structs passed by value).
+
 1999-01-15  Fernando Nasser  <fnasser@totem.to.cygnus.com>
 
        * target.h: added entry for target queries (to_query)
index 3870f88483a261356a633b9a136b0170cd01b83b..ea32792dcc440718c7b28a2338a7a0236c06c4a1 100644 (file)
@@ -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