This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: [PATCH] MIPS: Implement built-in atomic memory operations.
David Daney wrote:
[snip]
>>> +/* ISA includes ll and sc. */
>>> +#define ISA_HAS_LL_SC (mips_isa >= 2 && !TARGET_MIPS16)
>>>
>>
>> For a Linux configuration with MIPS I this should also be true,
>> the kernel emulates ll/sc in those cases.
>>
>>
> In this case could you "lie" to the compiler by passing -mips2 on the
> command line?
No, -mips2 enables a number of things which aren't emulated by the
kernel. The current technique is a .set mips2 ... .set mips0 pair
around handwritten ll/sc code.
> Otherwise we would have to either leave it as it is or add a
> new command line parameter to explicitly enable ll/sc.
Couldn't linux.h simply override the default definition in mips.h?
Thiemo