From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 865 invoked by alias); 28 Jan 2015 21:12:41 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 638 invoked by uid 55); 28 Jan 2015 21:12:31 -0000 From: "olegendo at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/64659] [SH] Immedate values not used for atomic ops Date: Wed, 28 Jan 2015 21:12:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: olegendo at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-01/txt/msg03312.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64659 --- Comment #3 from Oleg Endo --- Author: olegendo Date: Wed Jan 28 21:11:37 2015 New Revision: 220217 URL: https://gcc.gnu.org/viewcvs?rev=220217&root=gcc&view=rev Log: gcc/ PR target/64659 * config/sh/predicates.md (atomic_arith_operand, atomic_logical_operand): Remove. * config/sh/sync.md (fetchop_predicate, fetchop_constraint): Remove. (atomic_arith_operand_0): New predicate. (atomic_compare_and_swap): Use arith_reg_dest for output values. Use atomic_arith_operand_0 for input values. (atomic_compare_and_swapsi_hard, atomic_compare_and_swap_hard, atomic_compare_and_swap_soft_gusa, atomic_compare_and_swap_soft_tcb, atomic_compare_and_swap_soft_imask): Use arith_reg_dest and arith_reg_operand instead of register_operand. (atomic_exchange): Use arith_reg_dest for output value. Use atomic_arith_operand_0 for newval input. (atomic_exchangesi_hard, atomic_exchange_hard, atomic_exchange_soft_gusa, atomic_exchange_soft_tcb, atomic_exchange_soft_imask): Use arith_reg_dest and arith_reg_operand instead of register_operand. (atomic_arith_operand_1, atomic_logical_operand_1): New predicates. fetchop_predicate_1, fetchop_constraint_1_llcs, fetchop_constraint_1_gusa, fetchop_constraint_1_tcb, fetchop_constraint_1_imask): New code iterator attributes. (atomic_fetch_): Use arith_reg_dest instead of register_operand. Use fetchop_predicate_1. (atomic_fetch_si_hard, atomic_fetch__hard): Use arith_reg_dest instead of register_operand. Use fetchop_predicate_1, fetchop_constraint_1_llcs. (atomic_fetch__soft_gusa): Use arith_reg_dest and arith_reg_operand instead of register_operand. Use fetchop_predicate_1, fetchop_constraint_1_gusa. (atomic_fetch__soft_tcb): Use arith_reg_dest and arith_reg_operand instead of register_operand. Use fetchop_predicate_1, fetchop_constraint_1_tcb. Adjust asm sequence to allow R0 usage. (atomic_fetch__soft_imask): Use arith_reg_dest and arith_reg_operand instead of register_operand. Use fetchop_predicate_1, fetchop_constraint_1_imask. Adjust asm sequence to allow R0 usage. (atomic_fetch_nand): Use arith_reg_dest instead of register_operand. Use atomic_logical_operand_1. (atomic_fetch_nandsi_hard, atomic_fetch_nand_hard, atomic_fetch_nand_soft_gusa): Use arith_reg_dest and arith_reg_operand instead of register_operand. (atomic_fetch_nand_soft_tcb, atomic_fetch_nand_soft_imask): Use arith_reg_dest and arith_reg_operand instead of register_operand. Use logical_operand and rK08. Adjust asm sequence to allow R0 usage. (atomic__fetch): Use arith_reg_dest instead of register_operand. Use fetchop_predicate_1. (atomic__fetchsi_hard, atomic__fetch_hard): Use arith_reg_dest and arith_reg_operand instead of register_operand. Use fetchop_predicate_1, fetchop_constraint_1_llcs. (atomic__fetch_soft_gusa): Use arith_reg_dest and arith_reg_operand instead of register_operand. Use fetchop_predicate_1, fetchop_constraint_1_gusa. (atomic__fetch_soft_tcb): Use arith_reg_dest and arith_reg_operand instead of register_operand. Use fetchop_predicate_1, fetchop_constraint_1_tcb. Adjust asm sequence to allow R0 usage. (atomic__fetch_soft_imask): Use arith_reg_dest and arith_reg_operand instead of register_operand. Use fetchop_predicate_1, fetchop_constraint_1_imask. Adjust asm sequence to allow R0 usage. (atomic_nand_fetch): Use arith_reg_dest instead of register_operand. Use atomic_logical_operand_1. (atomic_nand_fetchsi_hard, atomic_nand_fetch_hard, atomic_nand_fetch_soft_gusa): Use arith_reg_dest and arith_reg_operand instead of register_operand. (atomic_nand_fetch_soft_tcb): Use arith_reg_dest and arith_reg_operand instead of register_operand. Use logical_operand and K08. Adjust asm sequence to allow R0 usage. (atomic_nand_fetch_soft_imask): Use arith_reg_dest and arith_reg_operand instead of register_operand. Use logical_operand and K08. gcc/testsuite/ PR target/64659 * gcc.target/sh/sh.exp (check_effective_target_atomic_model_soft_gusa_available, check_effective_target_atomic_model_soft_tcb_available, check_effective_target_atomic_model_soft_imask_available, check_effective_target_atomic_model_hard_llcs_available): New. * gcc.target/sh/pr64659-0.h: New. * gcc.target/sh/pr64659-1.c: New. * gcc.target/sh/pr64659-2.c: New. * gcc.target/sh/pr64659-3.c: New. * gcc.target/sh/pr64659-4.c: New. Added: trunk/gcc/testsuite/gcc.target/sh/pr64659-0.h trunk/gcc/testsuite/gcc.target/sh/pr64659-1.c trunk/gcc/testsuite/gcc.target/sh/pr64659-2.c trunk/gcc/testsuite/gcc.target/sh/pr64659-3.c trunk/gcc/testsuite/gcc.target/sh/pr64659-4.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/sh/predicates.md trunk/gcc/config/sh/sync.md trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.target/sh/sh.exp