(SKIP_CALLERS_UNIMP_P): Make agree with test used in call.
authorRichard Kenner <kenner@gcc.gnu.org>
Sat, 2 Mar 1996 17:44:23 +0000 (12:44 -0500)
committerRichard Kenner <kenner@gcc.gnu.org>
Sat, 2 Mar 1996 17:44:23 +0000 (12:44 -0500)
From-SVN: r11402

gcc/config/sparc/sparc.c

index f34a369797d53208da58d34dd3940f6441d7515d..8bf67aa24e5a05b1050aa533b9aadb6cc86c73ca 100644 (file)
@@ -39,9 +39,14 @@ Boston, MA 02111-1307, USA.  */
 
 /* 1 if the caller has placed an "unimp" insn immediately after the call.
    This is used in v8 code when calling a function that returns a structure.
-   v9 doesn't have this.  */
-
-#define SKIP_CALLERS_UNIMP_P (!TARGET_ARCH64 && current_function_returns_struct)
+   v9 doesn't have this.  Be careful to have this test be the same as that
+   used on the call.  */
+
+#define SKIP_CALLERS_UNIMP_P  \
+(!TARGET_ARCH64 && current_function_returns_struct                     \
+ && ! integer_zerop (DECL_SIZE (DECL_RESULT (current_function_decl)))  \
+ && (TREE_CODE (DECL_SIZE (DECL_RESULT (current_function_decl)))       \
+     == INTEGER_CST))
 
 /* Global variables for machine-dependent things.  */