This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [committed] Change "Q" and "T" constraints to memory constraints


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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]