This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Allow -mcmodel=large for x86-64 target
- From: Jan Hubicka <jh at suse dot cz>
- To: Jason R Thorpe <thorpej at wasabisystems dot com>, gcc-patches at gcc dot gnu dot org
- Date: Sat, 29 Dec 2001 21:59:10 +0100
- Subject: Re: [patch] Allow -mcmodel=large for x86-64 target
- References: <20011229120140.E2892@dr-evil.shagadelic.org>
> The following patch allows -mcmodel=large to be specified for the
> x86-64 target. The large code model does work, and the NetBSD/x86_64
It does not work - at least not fully.
Large code model specifies no limitations for the code size so the
jumps needs not to be relative that are limited to 32bit. THis is tricky
and expensive to implement.
What exactly do you need? Why medium is not enought?
Honza
> kernel currently requires it.
>
> 2001-12-29 Jason Thorpe <thorpej@wasabisystems.com>
>
> * config/i386/i386.c (override_options): Do not report
> an error if -mcmodel=large is specified.
>
> --
> -- Jason R. Thorpe <thorpej@wasabisystems.com>
Content-Description: patch2
> Index: gcc/config/i386/i386.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.c,v
> retrieving revision 1.350
> diff -c -r1.350 i386.c
> *** i386.c 2001/12/23 16:07:13 1.350
> --- i386.c 2001/12/29 19:49:26
> ***************
> *** 948,955 ****
> if ((TARGET_64BIT == 0) != (ix86_cmodel == CM_32))
> error ("code model `%s' not supported in the %s bit mode",
> ix86_cmodel_string, TARGET_64BIT ? "64" : "32");
> - if (ix86_cmodel == CM_LARGE)
> - sorry ("code model `large' not supported yet");
> if ((TARGET_64BIT != 0) != ((target_flags & MASK_64BIT) != 0))
> sorry ("%i-bit mode not compiled in",
> (target_flags & MASK_64BIT) ? 64 : 32);
> --- 948,953 ----