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] |
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?
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] |