public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [3.4-BIB] x86-64 sibcall fixes
@ 2002-10-15 10:58 Jan Hubicka
  2002-10-15 12:41 ` Michael Matz
                   ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Jan Hubicka @ 2002-10-15 10:58 UTC (permalink / raw)
  To: gcc-patches, rth

Hi,
this patch fix two problems I found while looking into the sibcall
code on x86-64.  Otherwise it seems to do the sibcalls
What else is missing?

Honza

Tue Oct 15 19:55:00 CEST 2002  Jan Hubicka  <jh@suse.cz>
	* i386.h (FUNCTION_OK_FOR_SIBCALL): Allow sibcalls in 64bit PIC.
	(override_options): Disable MASK_FLOAT_RETURNS for 64bit ABI.
*** i386.h	Mon Oct 14 12:07:58 2002
--- /abuild/jh/egcs1/gcc/config/i386/i386.h	Tue Oct 15 18:25:28 2002
*************** typedef struct ix86_args {
*** 1686,1692 ****
     instruction will wind up after the sibcall jump, and not be executed.) */
  #define FUNCTION_OK_FOR_SIBCALL(DECL)					\
    ((DECL)								\
!    && (! flag_pic || ! TREE_PUBLIC (DECL))				\
     && (! TARGET_FLOAT_RETURNS_IN_80387					\
         || ! FLOAT_MODE_P (TYPE_MODE (TREE_TYPE (TREE_TYPE (DECL))))	\
         || FLOAT_MODE_P (TYPE_MODE (TREE_TYPE (TREE_TYPE (cfun->decl))))))
--- 1686,1692 ----
     instruction will wind up after the sibcall jump, and not be executed.) */
  #define FUNCTION_OK_FOR_SIBCALL(DECL)					\
    ((DECL)								\
!    && (TARGET_64BIT || ! flag_pic || ! TREE_PUBLIC (DECL))		\
     && (! TARGET_FLOAT_RETURNS_IN_80387					\
         || ! FLOAT_MODE_P (TYPE_MODE (TREE_TYPE (TREE_TYPE (DECL))))	\
         || FLOAT_MODE_P (TYPE_MODE (TREE_TYPE (TREE_TYPE (cfun->decl))))))
*** i386.c	Tue Oct 15 10:24:34 2002
--- /abuild/jh/egcs1/gcc/config/i386/i386.c	Tue Oct 15 18:26:31 2002
*************** override_options ()
*** 1226,1231 ****
--- 1226,1233 ----
  	error ("-mrtd calling convention not supported in the 64bit mode");
        /* Enable by default the SSE and MMX builtins.  */
        target_flags |= (MASK_SSE2 | MASK_SSE | MASK_MMX | MASK_128BIT_LONG_DOUBLE);
+       /* We always return floats in SSE, not 80387.  */
+       target_flags &= MASK_FLOAT_RETURNS;
        ix86_fpmath = FPMATH_SSE;
       }
    else

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2002-10-29 15:51 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-15 10:58 [3.4-BIB] x86-64 sibcall fixes Jan Hubicka
2002-10-15 12:41 ` Michael Matz
2002-10-15 12:44   ` Jan Hubicka
2002-10-15 13:45 ` Richard Henderson
2002-10-27 11:32   ` Jan Hubicka
2002-10-27 12:59     ` Jan Hubicka
2002-10-27 13:16       ` [3.4-BIB] x86-64 sibcall fixes try III Jan Hubicka
2002-10-27 13:44         ` Jakub Jelinek
2002-10-27 13:57           ` Jan Hubicka
2002-10-29  5:43             ` Richard Henderson
2002-10-29  5:48               ` Jan Hubicka
2002-10-27 14:46         ` Andreas Bauer
2002-10-27 17:41         ` Fergus Henderson
2002-10-28  2:51           ` Jan Hubicka
2002-10-28  2:53           ` Michael Matz
2002-10-28  2:57             ` Jan Hubicka
2002-10-28  3:13               ` Michael Matz
2002-10-28  4:25                 ` Jan Hubicka
2002-10-28  6:26                   ` [3.4-BIB] x86-64 sibcall fixes try IV Jan Hubicka
2002-10-28 19:32                     ` Fergus Henderson
2002-10-29  7:51                     ` Richard Henderson
2002-10-29  5:43     ` [3.4-BIB] x86-64 sibcall fixes Richard Henderson
2002-10-29  5:45       ` Jan Hubicka
2002-10-20 19:54 ` Andreas Bauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).