From patchwork Thu Feb 23 23:04:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 731802 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vTqZD6L0cz9s7D for ; Fri, 24 Feb 2017 10:04:52 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="g/JC3Nyx"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=Z+1N7fmoUNAGVdBl wzBUSQ+ZaknIXvC+UD4ZyAATsRx3//3zLAyg2Ds8BA/lecCdDbYFb30h+1Uo8OA/ xjG6zPPSoPMaoPuIKS9exuiDSFy3ciLVFs18xcI4C8lyX9Uc4cNv41x9r/0599sT 1XvWnjvXF4+clWUARhWv9xHSlV4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=default; bh=EDa73fJUl89TfmI43VHO5Q 1Xoxw=; b=g/JC3NyxT5TjgOZYve1m7Cm7dYqx63GgDIDwntJ735+iCYry5imeeG /AFfb/9J+Pbm40cB8QMLmCmSjAp6UZntFSxXAZ3iwbNqq3GWrEkcj2VAJCvDYRYO s02i9n7IYikG3HXKx7plknr7wtACqgCVubTMqgcI/X0a6IhvHZ8JY= Received: (qmail 61728 invoked by alias); 23 Feb 2017 23:04:40 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 61662 invoked by uid 89); 23 Feb 2017 23:04:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=ccc, famous X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 23 Feb 2017 23:04:37 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id C9DB4814E1 for ; Fri, 24 Feb 2017 00:04:34 +0100 (CET) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Qaz59uiiUMUO for ; Fri, 24 Feb 2017 00:04:34 +0100 (CET) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id A2922814D1 for ; Fri, 24 Feb 2017 00:04:34 +0100 (CET) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: [visium] Clean up C testsuite Date: Fri, 24 Feb 2017 00:04:34 +0100 Message-ID: <2291135.QGQ5rKtBj9@polaris> User-Agent: KMail/4.14.10 (Linux/3.16.7-53-desktop; KDE/4.14.9; x86_64; ; ) MIME-Version: 1.0 This eliminates all the regressions that recently crept in (except for the famous gcc.dg/tree-ssa/ssa-thread-14.c present on several other platforms). Tested on visium-elf, applied on the mainline. 2017-02-23 Eric Botcazou * config/visium/visium.md (type): Add trap. (b): New mode attribute. (*btst): Rename into... (*btst): ...this and adjust. (*cbranchsi4_btst_insn): Rename into... (*cbranch4_btst_insn): ...this and adjust. (trap): New define_insn. 2017-02-23 Eric Botcazou * gcc.target/visium/bit_test.c: Accept any lsr form. * gcc.target/visium/block_move.c: Tweak. Index: config/visium/visium.md =================================================================== --- config/visium/visium.md (revision 245625) +++ config/visium/visium.md (working copy) @@ -137,9 +137,10 @@ (define_c_enum "unspecv" [ ;nop No operation. ;multi Multiple instructions which split. ;asm User asm instructions. +;trap Trap instructions. (define_attr "type" -"imm_reg,mem_reg,eam_reg,fp_reg,reg_mem,reg_eam,reg_fp,arith,arith2,logic,abs_branch,branch,bmi,call,ret,rfi,dsi,cmp,div,divd,mul,shiftdi,fdiv,fsqrt,ftoi,itof,fmove,fcmp,fp,nop,multi,asm" (const_string "logic")) +"imm_reg,mem_reg,eam_reg,fp_reg,reg_mem,reg_eam,reg_fp,arith,arith2,logic,abs_branch,branch,bmi,call,ret,rfi,dsi,cmp,div,divd,mul,shiftdi,fdiv,fsqrt,ftoi,itof,fmove,fcmp,fp,nop,multi,asm,trap" (const_string "logic")) ; Those insns that occupy 4 bytes. (define_attr "single_insn" "no,yes" @@ -205,6 +206,7 @@ (define_attr "cpu" "gr5,gr6" (const (sym (define_mode_iterator QHI [QI HI]) (define_mode_iterator I [QI HI SI]) +(define_mode_attr b [(QI "8") (HI "16") (SI "32")]) (define_mode_attr s [(QI ".b") (HI ".w") (SI ".l")]) ; This code iterator allows signed and unsigned widening multiplications @@ -1986,15 +1988,15 @@ (define_insn_and_split "*zero_extendsidi ; BITS_BIG_ENDIAN is defined to 1 so operand #1 counts from the MSB. -(define_insn "*btst" +(define_insn "*btst" [(set (reg:CCC R_FLAGS) - (compare:CCC (zero_extract:SI - (match_operand:SI 0 "register_operand" "r") + (compare:CCC (zero_extract:I + (match_operand:I 0 "register_operand" "r") (const_int 1) (match_operand:QI 1 "const_shift_operand" "K")) (const_int 0)))] "reload_completed" - "lsr.l r0,%0,32-%1" + "lsr r0,%0,-%1" [(set_attr "type" "logic")]) ;; @@ -2373,11 +2375,11 @@ (define_insn_and_split "*cbranch4_ } [(set_attr "type" "cmp")]) -(define_insn_and_split "*cbranchsi4_btst_insn" +(define_insn_and_split "*cbranch4_btst_insn" [(set (pc) (if_then_else (match_operator 0 "visium_equality_comparison_operator" - [(zero_extract:SI - (match_operand:SI 1 "register_operand" "r") + [(zero_extract:I + (match_operand:I 1 "register_operand" "r") (const_int 1) (match_operand:QI 2 "const_shift_operand" "K")) (const_int 0)]) @@ -2512,6 +2514,20 @@ (define_insn "tablejump" ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; trap instructions +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; + +(define_insn "trap" + [(trap_if (const_int 1) (const_int 0))] + "" + "stop 0,r0" + [(set_attr "type" "trap")]) + +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Subprogram call instructions ;;