This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PR25042 (i386 libcalls)
- From: Jan Hubicka <jh at suse dot cz>
- To: gcc-patches at gcc dot gnu dot org, rth at redhat dot com
- Date: Tue, 10 Jan 2006 23:56:15 +0100
- Subject: PR25042 (i386 libcalls)
Hi,
this patch both disable the __float128 on 32bit compilation where it
don't work very well (ie it is refused without -mmmx) and makes
ix86_function_regparm to not ICE on libcalls that pass identifier node
as fndecl. I am somewhat puzzled that we didn't hit the ICE eariler in
other cases but we do relatively few libcalls overall on i386.
Bootstrapped/regtested i686-linux, OK for mainline/4.1?
extern void abort (void);
extern void exit (int);
int
main (void)
{
static volatile int i;
static volatile __float128 a;
a = i;
if (0 != a)
abort ();
exit (0);
}
2006-01-10 Jan Hubicka <jh@suse.cz>
PR target/25042
* i386.c (ix86_function_regparm): fndecl might be identifier node
(ix86_init_mmx_sse_builtins): Do not delcare float128
Index: config/i386/i386.c
===================================================================
*** config/i386/i386.c (revision 108753)
--- config/i386/i386.c (working copy)
*************** ix86_function_regparm (tree type, tree d
*** 2179,2184 ****
--- 2179,2186 ----
/* Use register calling convention for local functions when possible. */
if (!TARGET_64BIT && !user_convention && decl
+ /* Libcalls pass IDENTIFIER_NODE as an decl. */
+ && TREE_CODE (decl) == FUNCTION_DECL
&& flag_unit_at_a_time && !profile_flag)
{
struct cgraph_local_info *i = cgraph_local_info (decl);
*************** ix86_init_mmx_sse_builtins (void)
*** 14567,14576 ****
(*lang_hooks.types.register_builtin_type) (float80_type, "__float80");
}
! float128_type = make_node (REAL_TYPE);
! TYPE_PRECISION (float128_type) = 128;
! layout_type (float128_type);
! (*lang_hooks.types.register_builtin_type) (float128_type, "__float128");
/* Add all builtins that are more or less simple operations on two
operands. */
--- 14781,14793 ----
(*lang_hooks.types.register_builtin_type) (float80_type, "__float80");
}
! if (TARGET_64BIT)
! {
! float128_type = make_node (REAL_TYPE);
! TYPE_PRECISION (float128_type) = 128;
! layout_type (float128_type);
! (*lang_hooks.types.register_builtin_type) (float128_type, "__float128");
! }
/* Add all builtins that are more or less simple operations on two
operands. */