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: Patch to fix optabs.c when SWITCHABLE_TARGETS is defined.


On 11/07/2011 04:49 PM, Andrew MacLeod wrote:
> On 11/07/2011 09:43 AM, Tom de Vries wrote:
>> On 11/06/2011 04:04 PM, Andrew MacLeod wrote:
>>> 	(get_atomic_op_for_code): New.  Return an opcode table entry.
>> I'm getting these errors with a MIPS cross build:
>> ...
>> /scratch/vries/b4/ref-mips-ml-11-11-07/src/gcc-mainline/gcc/optabs.c: In
>> function 'get_atomic_op_for_code':
>> /scratch/vries/b4/ref-mips-ml-11-11-07/src/gcc-mainline/gcc/optabs.c:7556:
>> error: initializer element is not constant
>> /scratch/vries/b4/ref-mips-ml-11-11-07/src/gcc-mainline/gcc/optabs.c:7556:
>> error: (near initialization for 'add_op.mem_fetch_before')
>> /scratch/vries/b4/ref-mips-ml-11-11-07/src/gcc-mainline/gcc/optabs.c:7556:
>> error: initializer element is not constant
>> ...
> 
> When SWITCHABLE_TARGETS is defined, the various direct optab entries can 
> be changed on the fly, so the direct_optab tables no longer become 
> something that can be filled in statically at compile time.
> 
> This patch changes it so that we just fill in a table entry on demand.
> 
> bootstrapped and no new regressions on  x86_64-unknown-linux-gnu in the 
> atomic testsuite.    (full testuite run still underway)
> 
> Tom does this fix the mips problem?  it seems to compile here now.

I was able to complete the MIPS cross build using the patch.

Thanks,
- Tom

> 
> Presuming the full testsuite run comes out fine, ok for mainline?
> 
> Andrew


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