aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/sync-3.c
AgeCommit message (Collapse)AuthorFilesLines
2008-11-20sync-2.c: Add type cast to avoid folding.Andreas Krebbel1-1/+1
2008-11-20 Andreas Krebbel <krebbel1@de.ibm.com> * gcc.dg/sync-2.c: Add type cast to avoid folding. * gcc.dg/sync-3.c: Likewise. From-SVN: r142064
2008-11-17re PR middle-end/37908 (atomic NAND op generate wrong code; ↵Uros Bizjak1-5/+97
__sync_nand_and_fetch, __sync_fetch_and_nand) PR middle-end/37908 * optabs.c (expand_sync_operation): Properly handle NAND case by calculating ~(t1 & val) instead of (~t1 & val). * builtins.c (expand_builtin_sync_operation): Warn for changed semantics in NAND builtins. * c.opt (Wsync-nand): New warning option. Describe -Wsync-nand. * doc/invoke.texi (Warning options): Add Wsync-nand. * doc/extend.texi (Atomic Builtins) [__sync_fetch_and_nand]: Correct __sync_fetch_and_nand builtin operation in the example. Add a note about changed semantics in GCC 4.4. [__sync_nand_and_fetch]: Correct __sync_nand_and_fetch builtin operation in the example. Add a note about changed semantics in GCC 4.4. testsuite/ChangeLog: PR middle-end/37908 * gcc.dg/pr37908.c: New test. * gcc.dg/ia64-sync-1.c: Correct __sync_fetch_and_nand and __sync_nand_and_fetch results. Add dg-message to look for the warning about changed semantics of NAND builtin. (init_si, init_di): Change init value for __sync_fetch_and_nand to -1. (test_si, test_di): Change expected result of __sync_nand_and_fetch to ~7. * gcc.dg/ia64-sync-2.c: Correct __sync_fetch_and_nand and __sync_nand_and_fetch results. Add dg-message to look for the warning about changed semantics of NAND builtin. (init_noret_si, init_noret_di): Change init value for __sync_fetch_and_nand to -1. (init_noret_si, init_noret_di): Change expected result of __sync_nand_and_fetch to ~7. * gcc.dg/sync-2.c: Correct __sync_fetch_and_nand and __sync_nand_and_fetch results. Add dg-message to look for the warning about changed semantics of NAND builtin. (init_qi, init_qi): Change init value for __sync_fetch_and_nand to -1. (init_hi, init_hi): Change expected result of __sync_nand_and_fetch to ~7. * gcc.dg/sync-3.c: Copy from sync-2.c instead of including the c source file. * gcc.c-torture/compile/sync-1.c: Add dg-message to look for the warning about changed semantics of NAND builtin. * gcc.c-torture/compile/sync-2.c: Ditto. * gcc.c-torture/compile/sync-3.c: Ditto. From-SVN: r141942
2007-08-30rs6000.c (rs6000_emit_sync): For QI or HI mode used_m...Jakub Jelinek1-0/+10
* config/rs6000/rs6000.c (rs6000_emit_sync): For QI or HI mode used_m, even if it is 32-bit aligned, adjust used_m MEM to have SImode and update m. Don't run gen_lowpart_common on arbitrary memory address, force it to register first. * gcc.dg/sync-2.c (AI_ALIGN): Define if not defined. (AI): Add AI_ALIGN. * gcc.dg/sync-3.c: New test. From-SVN: r127922