This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [committed] Change "Q" and "T" constraints to memory constraints
- From: John David Anglin <dave dot anglin at bell dot net>
- To: Richard Henderson <rth at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 14 Feb 2015 09:50:01 -0500
- Subject: Re: [committed] Change "Q" and "T" constraints to memory constraints
- Authentication-results: sourceware.org; auth=none
- References: <BLU436-SMTP164FFBA31AD0A827A87B35997230 at phx dot gbl> <54DE2FA0 dot 7050800 at redhat dot com>
On 2015-02-13, at 12:08 PM, Richard Henderson wrote:
> On 02/13/2015 05:22 AM, John David Anglin wrote:
>> + /* Reload sometimes tries to put const data symbolic operands in
>> + readonly memory. The HP SOM linker doesn't allow symbolic data
>> + in readonly memory. */
>> + if (TARGET_SOM
>> + && !function_label_operand (x, VOIDmode)
>> + && symbolic_operand (x, VOIDmode))
>> + return true;
>
> You probably want to remove the SOM test. Even if ELF can represent this, it
> will lead to DT_TEXTREL and relocations against the read-only memory.
Unfortunately, this creates new problems. When there is a constant offset that won't fit
in 14 bits, we ICE. I think this could be improved to 21 bits but it's tough to load an operand
with a larger offset with just one register, particularly when generating PIC code. I need
to research what happens on SOM with large offsets.
Possibly the constant can somehow be forced into the data section where the relocations
aren't a problem?
Dave
--
John David Anglin dave.anglin@bell.net