This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: mcmodel=large problem
- From: Ian Lance Taylor <iant at google dot com>
- To: Zeng Bin <ezengbin at gmail dot com>
- Cc: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Fri, 17 Feb 2012 16:13:34 -0800
- Subject: Re: mcmodel=large problem
- Authentication-results: mr.google.com; spf=pass (google.com: domain of iant@google.com designates 10.68.210.12 as permitted sender) smtp.mail=iant@google.com; dkim=pass header.i=iant@google.com
- References: <CAFU2bD2emjchjwQkid-qQvB4=TTZzBp_4EhUO2NRnEA6oyjMYg@mail.gmail.com> <mcrwr7lzdql.fsf@dhcp-172-18-216-180.mtv.corp.google.com> <CAFU2bD201pPfL37VzR0r6jbiW+C-EcOVXYAKgcT9bwKf-uaX7A@mail.gmail.com>
Zeng Bin <ezengbin@gmail.com> writes:
> It reported the following error message during compilation:
>
> ../../../src/libgcc/config/libbid/bid_decimal_globals.c: In function
> â__dfp_set_roundâ:
> ../../../src/libgcc/config/libbid/bid_decimal_globals.c:34:1: error:
> unrecognizable insn:
> (call_insn/u 6 5 7 3 (parallel [
> (set (reg:DI 0 ax)
> (call:DI (mem:QI (symbol_ref:DI ("__tls_get_addr")) [0 S1
> A8])
> (const_int 0 [0])))
> (unspec:DI [
> (symbol_ref:DI ("__bid_IDEC_glbround") [flags 0x10]
> <var_decl 0x2b9b4508f000 __bid_IDEC_glbround>)
> ] UNSPEC_TLS_GD)
> ]) ../../../src/libgcc/config/libbid/bid_decimal_globals.c:33 -1
> (expr_list:REG_EH_REGION (const_int -2147483648 [0xffffffff80000000])
> (nil))
> (nil))
> ../../../src/libgcc/config/libbid/bid_decimal_globals.c:34:1: internal
> compiler error: in extract_insn, at recog.c:2109
> Please submit a full bug report,
This is a compiler bug. Please submit a bug report, as described at
http://gcc.gnu.org/bugs. Thanks.
> BTW, I am using Ubuntu with gcc-4.6.1. I am trying to compile gcc-4.6.2
> with -mcmodel=large.
Relatively few people use -mcmodel=large, because of the performance
penalty. I suspect that it is not well-tested, hence this sort of
problem.
Another approach you can take to running a program at high addresses is
to use -fPIE and -pie, which lets you move the program around in
memory.
Ian