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] MIPS: Add atomic memory operations for QI and HI modes.


David Daney wrote:
This patch adds support for QI and HI mode atomic memory operations to
MIPS.  This is a minimal implementation of the QI and HI mode operations
as it only implements sync_compare_and_swap for those modes.  A possible
future enhancement would be to implement the full set of atomic insns
for QI and HI modes, but this should be enough to get libstdc++ building
again.

The patch borrows from the sparc implementation.

Currently testing on mipsel-linux with all languages,

OK to commit if it tests good?


And it did:


http://gcc.gnu.org/ml/gcc-testresults/2008-04/msg01887.html

This gets us back to clean C++ and libstdc++ test results (except for pr31863.C, which times out occasionally when the system is heavily loaded).


2008-04-23 David Daney <ddaney@avtrex.com>

    * config/mips/mips.md (UNSPEC_COMPARE_AND_SWAP_12): New
    unspec_volitile.
    (UNSPEC_SYNC_OLD_OP, UNSPEC_SYNC_NEW_OP, UNSPEC_SYNC_EXCHANGE,
    UNSPEC_MEMORY_BARRIER, UNSPEC_SET_GOT_VERSION,
    UNSPEC_UPDATE_GOT_VERSION): Renumber.
    (sync_compare_and_swap<mode>): New expand for QI and HI modes.
    (compare_and_swap_12): New insn.
    * config/mips/mips-protos.h (mips_expand_compare_and_swap_12): Declare.
    * config/mips/mips.c (mips_expand_compare_and_swap_12): New function.
    * config/mips/mips.h (MIPS_COMPARE_AND_SWAP_12): New macro.





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