[PATCH] MIPS: Fix __sync_nand for changed semantics.
David Daney
ddaney@caviumnetworks.com
Wed Dec 10 16:33:00 GMT 2008
Richard Sandiford wrote:
[...]
>
> David Daney <ddaney@caviumnetworks.com> writes:
>> + AND_OP are the instructions done after the INSN to mask the INSN's
>> + result with the mask. In the case of the sync_nand operation, it
>> + also does the bit-wise not that is required after the AND INSN. */
>
> How about:
>
> AND_OP is an instruction done after INSN to mask INSN's result with
> the mask. For most operations, this is an AND with the inclusive
> mask (%1). For nand operations -- where the result of INSN is
> already correctly masked -- it instead performs a bitwise not. */
>
[...]
>> - "\t" INSN "\t%0,%0,%2\n" \
>> + "\tnor\t%@,%0,%.\n" \
> ^^
> [*] copy-o: should be %0
>
> OK with those changes, thanks.
Thanks Richard,
Sorry about the number if iterations this has taken.
For the record, this is the patch I committed:
2008-12-09 David Daney <ddaney@caviumnetworks.com>
* config/mips/sync.md (sync_<optab>_12): Replace
MIPS_SYNC_OP_12_NOT_NOP with MIPS_SYNC_OP_12_AND.
(sync_old_<optab>_12): Remove third paramater to
MIPS_SYNC_OLD_OP_12 macro, replace MIPS_SYNC_OLD_OP_12_NOT_NOP
with MIPS_SYNC_OLD_OP_12_AND.
(sync_new_<optab>_12): Replace MIPS_SYNC_NEW_OP_12_NOT_NOP
with MIPS_SYNC_NEW_OP_12_AND.
(sync_nand_12): Replace MIPS_SYNC_OP_12_NOT_NOT with
MIPS_SYNC_OP_12_XOR, reduce length attribute to 40.
(sync_old_nand_12): Remove third paramater to MIPS_SYNC_OLD_OP_12
macro, replace MIPS_SYNC_OLD_OP_12_NOT_NOT with
MIPS_SYNC_OLD_OP_12_XOR and reduce length attribute to 40.
(sync_new_nand_12): Replace MIPS_SYNC_NEW_OP_12_NOT_NOT with
MIPS_SYNC_NEW_OP_12_XOR.
* config/mips/mips.h (MIPS_SYNC_OP_12, MIPS_SYNC_OP_12_NOT_NOP,
MIPS_SYNC_OP_12_NOT_NOT,MIPS_SYNC_OLD_OP_12_NOT_NOP,
MIPS_SYNC_OLD_OP_12_NOT_NOT, MIPS_SYNC_NEW_OP_12,
MIPS_SYNC_NEW_OP_12_NOT_NOP, MIPS_SYNC_NEW_OP_12_NOT_NOT,
MIPS_SYNC_NAND, MIPS_SYNC_OLD_NAND, MIPS_SYNC_NEW_NAND): Rewritten
to implement new __sync_nand semantics.
(MIPS_SYNC_OLD_OP_12): Implement new __sync_nand semantics, and
remove third parameter.
(MIPS_SYNC_OLD_OP_12_NOT_NOP_REG,
MIPS_SYNC_OLD_OP_12_NOT_NOT_REG): Removed.
(MIPS_SYNC_OP_12_NOT_NOP): Renamed to MIPS_SYNC_OP_12_AND.
(MIPS_SYNC_OP_12_NOT_NOT): Renamed to MIPS_SYNC_OP_12_XOR.
(MIPS_SYNC_OLD_OP_12_NOT_NOP): Renamed to MIPS_SYNC_OLD_OP_12_AND.
(MIPS_SYNC_OLD_OP_12_NOT_NOT): Renamed to MIPS_SYNC_OLD_OP_12_XOR.
(MIPS_SYNC_NEW_OP_12_NOT_NOP): Renamed to MIPS_SYNC_NEW_OP_12_AND.
(MIPS_SYNC_NEW_OP_12_NOT_NOT): Renamed to MIPS_SYNC_NEW_OP_12_XOR
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: nand-fix-v5.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20081210/9fcfc06d/attachment.ksh>
More information about the Gcc-patches
mailing list