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: RFC: [PATCH] MIPS: Implement built-in atomic memory operations.


Maciej W. Rozycki wrote:
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? Otherwise we would have to either leave it as it is or add a new
command line parameter to explicitly enable ll/sc.

I would feel a bit uneasy about adding the implication of the availability of ll/sc based on the target operating system. Using a switch like "-march=mips2" is unacceptable as it enables some other instructions. I would be in favour to an additional option along the lines of -mbranch-likely.


Something like -mllsc. The default value could be set at configure time with --with-llsc=[true|false]. Perhaps mips*-*-linux* would imply --with-llsc=true unless overridden. Done in a similar manner to the default -march and -msoft-float settings.

Perhaps Richard could opine on the matter.

David Daney


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