From patchwork Sat Nov 2 11:36:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 287974 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)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 4A0A52C00B9 for ; Sat, 2 Nov 2013 22:36:56 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:date:message-id:subject:from:to:content-type; q= dns; s=default; b=i4NdTphHxdud+gDeCZ6FMYR97VdN6unb6EGeSMzM9YCNBR bY6K9aeBphOPQGf7E7yPmLmQoP8hBVMQbjLbyMn8H05JrqyQ0fSH9A5x6vu9QEOQ eGdtgJdQo2OjTE0pFnXXJrIcxckthEE0VU/Lgl7WmVV/LalWDzc0joUPLSGwg= 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 :mime-version:date:message-id:subject:from:to:content-type; s= default; bh=0uBWChPvJgb7jpE8YqtyZ+/sOis=; b=xCh6ayJU9Nw3c4OJFUEs VCdibyqqbAScLB5D0i9kTNvk4NShFX4QZoZonGF6bvpblYc4BqK78aY86/H8NTGu y9Vq14WgBtWbqQ/Pr9z5yZHRYXlozvv8zYKWVDhe4lJ0/06N7Nxs/vDBr6QEDBCW l6+R8Nrn/4uWZlJIi6kKQqU= Received: (qmail 8934 invoked by alias); 2 Nov 2013 11:36:50 -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 8923 invoked by uid 89); 2 Nov 2013 11:36:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ob0-f177.google.com Received: from mail-ob0-f177.google.com (HELO mail-ob0-f177.google.com) (209.85.214.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sat, 02 Nov 2013 11:36:48 +0000 Received: by mail-ob0-f177.google.com with SMTP id vb8so5507567obc.36 for ; Sat, 02 Nov 2013 04:36:46 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.60.149.169 with SMTP id ub9mr6035209oeb.39.1383392206236; Sat, 02 Nov 2013 04:36:46 -0700 (PDT) Received: by 10.182.137.136 with HTTP; Sat, 2 Nov 2013 04:36:46 -0700 (PDT) Date: Sat, 2 Nov 2013 12:36:46 +0100 Message-ID: Subject: [PATCH, i386]: Introduce Ts and Tv address constraints From: Uros Bizjak To: "gcc-patches@gcc.gnu.org" Hello! These two constraints go together with address_no_seg_operand and vsib_address_operand operand predicates. 2013-11-02 Uros Bizjak * config/i386/constraints.md (Ts, Tv): New address constrains. * config/i386/i386.md (*lea, *_): Use Ts constraint for address_no_seg_operand. * config/i386/sse.md (*avx512pf_gatherpf_mask) (*avx512pf_gatherpf, *avx512pf_scatterpf_mask) (*avx512pf_scatterpf, *avx2_gathersi) (*avx2_gathersi_2, *avx2_gatherdi, *avx2_gatherdi_2) (*avx2_gatherdi_3, *avx2_gatherdi_4) (*avx512f_gathersi, *avx512f_gathersi_2) (*avx512f_gatherdi, *avx512f_gatherdi_2) (*avx512f_scattersi *avx512f_scatterdi): Use Tv constraint for vsib_address_operand. Bootstrapped and regression tested on x86_64-pc-linux-gnu {,-m32} and committed to mainline SVN. Uros. Index: config/i386/constraints.md =================================================================== --- config/i386/constraints.md (revision 204298) +++ config/i386/constraints.md (working copy) @@ -237,9 +237,19 @@ (match_operand 0 "x86_64_zext_immediate_operand")) ;; T prefix is used for different address constraints +;; v - VSIB address +;; s - address with no segment register ;; i - address with no index and no rip ;; b - address with no base and no rip +(define_address_constraint "Tv" + "VSIB address operand" + (match_operand 0 "vsib_address_operand")) + +(define_address_constraint "Ts" + "Address operand without segment register" + (match_operand 0 "address_no_seg_operand")) + (define_address_constraint "Ti" "MPX address operand without index" (match_operand 0 "address_mpx_no_index_operand")) Index: config/i386/i386.md =================================================================== --- config/i386/i386.md (revision 204298) +++ config/i386/i386.md (working copy) @@ -5394,7 +5394,7 @@ (define_insn_and_split "*lea" [(set (match_operand:SWI48 0 "register_operand" "=r") - (match_operand:SWI48 1 "address_no_seg_operand" "p"))] + (match_operand:SWI48 1 "address_no_seg_operand" "Ts"))] "" { if (SImode_address_operand (operands[1], VOIDmode)) @@ -18297,7 +18297,7 @@ (define_insn "*_" [(parallel [(unspec [(match_operand:BND 0 "register_operand" "B") - (match_operand: 1 "address_no_seg_operand" "p")] BNDCHECK) + (match_operand: 1 "address_no_seg_operand" "Ts")] BNDCHECK) (set (match_operand:BLK 2 "bnd_mem_operator") (unspec:BLK [(match_dup 2)] UNSPEC_MPX_FENCE))])] "TARGET_MPX" Index: config/i386/sse.md =================================================================== --- config/i386/sse.md (revision 204298) +++ config/i386/sse.md (working copy) @@ -11462,7 +11462,7 @@ [(match_operand: 0 "register_operand" "k") (match_operator: 5 "vsib_mem_operator" [(unspec:P - [(match_operand:P 2 "vsib_address_operand" "p") + [(match_operand:P 2 "vsib_address_operand" "Tv") (match_operand:VI48_512 1 "register_operand" "v") (match_operand:SI 3 "const1248_operand" "n")] UNSPEC_VSIBADDR)]) @@ -11489,7 +11489,7 @@ [(const_int -1) (match_operator: 4 "vsib_mem_operator" [(unspec:P - [(match_operand:P 1 "vsib_address_operand" "p") + [(match_operand:P 1 "vsib_address_operand" "Tv") (match_operand:VI48_512 0 "register_operand" "v") (match_operand:SI 2 "const1248_operand" "n")] UNSPEC_VSIBADDR)]) @@ -11533,7 +11533,7 @@ [(match_operand: 0 "register_operand" "k") (match_operator: 5 "vsib_mem_operator" [(unspec:P - [(match_operand:P 2 "vsib_address_operand" "p") + [(match_operand:P 2 "vsib_address_operand" "Tv") (match_operand:VI48_512 1 "register_operand" "v") (match_operand:SI 3 "const1248_operand" "n")] UNSPEC_VSIBADDR)]) @@ -11560,7 +11560,7 @@ [(const_int -1) (match_operator: 4 "vsib_mem_operator" [(unspec:P - [(match_operand:P 1 "vsib_address_operand" "p") + [(match_operand:P 1 "vsib_address_operand" "Tv") (match_operand:VI48_512 0 "register_operand" "v") (match_operand:SI 2 "const1248_operand" "n")] UNSPEC_VSIBADDR)]) @@ -13650,7 +13650,7 @@ [(match_operand:VEC_GATHER_MODE 2 "register_operand" "0") (match_operator: 7 "vsib_mem_operator" [(unspec:P - [(match_operand:P 3 "vsib_address_operand" "p") + [(match_operand:P 3 "vsib_address_operand" "Tv") (match_operand: 4 "register_operand" "x") (match_operand:SI 6 "const1248_operand" "n")] UNSPEC_VSIBADDR)]) @@ -13670,7 +13670,7 @@ [(pc) (match_operator: 6 "vsib_mem_operator" [(unspec:P - [(match_operand:P 2 "vsib_address_operand" "p") + [(match_operand:P 2 "vsib_address_operand" "Tv") (match_operand: 3 "register_operand" "x") (match_operand:SI 5 "const1248_operand" "n")] UNSPEC_VSIBADDR)]) @@ -13712,7 +13712,7 @@ [(match_operand: 2 "register_operand" "0") (match_operator: 7 "vsib_mem_operator" [(unspec:P - [(match_operand:P 3 "vsib_address_operand" "p") + [(match_operand:P 3 "vsib_address_operand" "Tv") (match_operand: 4 "register_operand" "x") (match_operand:SI 6 "const1248_operand" "n")] UNSPEC_VSIBADDR)]) @@ -13732,7 +13732,7 @@ [(pc) (match_operator: 6 "vsib_mem_operator" [(unspec:P - [(match_operand:P 2 "vsib_address_operand" "p") + [(match_operand:P 2 "vsib_address_operand" "Tv") (match_operand: 3 "register_operand" "x") (match_operand:SI 5 "const1248_operand" "n")] UNSPEC_VSIBADDR)]) @@ -13757,7 +13757,7 @@ [(match_operand: 2 "register_operand" "0") (match_operator: 7 "vsib_mem_operator" [(unspec:P - [(match_operand:P 3 "vsib_address_operand" "p") + [(match_operand:P 3 "vsib_address_operand" "Tv") (match_operand: 4 "register_operand" "x") (match_operand:SI 6 "const1248_operand" "n")] UNSPEC_VSIBADDR)]) @@ -13780,7 +13780,7 @@ [(pc) (match_operator: 6 "vsib_mem_operator" [(unspec:P - [(match_operand:P 2 "vsib_address_operand" "p") + [(match_operand:P 2 "vsib_address_operand" "Tv") (match_operand: 3 "register_operand" "x") (match_operand:SI 5 "const1248_operand" "n")] UNSPEC_VSIBADDR)]) @@ -13822,7 +13822,7 @@ (match_operand: 7 "register_operand" "2") (match_operator: 6 "vsib_mem_operator" [(unspec:P - [(match_operand:P 4 "vsib_address_operand" "p") + [(match_operand:P 4 "vsib_address_operand" "Tv") (match_operand: 3 "register_operand" "v") (match_operand:SI 5 "const1248_operand" "n")] UNSPEC_VSIBADDR)])] @@ -13841,7 +13841,7 @@ (match_operand: 6 "register_operand" "1") (match_operator: 5 "vsib_mem_operator" [(unspec:P - [(match_operand:P 3 "vsib_address_operand" "p") + [(match_operand:P 3 "vsib_address_operand" "Tv") (match_operand: 2 "register_operand" "v") (match_operand:SI 4 "const1248_operand" "n")] UNSPEC_VSIBADDR)])] @@ -13880,7 +13880,7 @@ (match_operand:QI 7 "register_operand" "2") (match_operator: 6 "vsib_mem_operator" [(unspec:P - [(match_operand:P 4 "vsib_address_operand" "p") + [(match_operand:P 4 "vsib_address_operand" "Tv") (match_operand: 3 "register_operand" "v") (match_operand:SI 5 "const1248_operand" "n")] UNSPEC_VSIBADDR)])] @@ -13899,7 +13899,7 @@ (match_operand:QI 6 "register_operand" "1") (match_operator: 5 "vsib_mem_operator" [(unspec:P - [(match_operand:P 3 "vsib_address_operand" "p") + [(match_operand:P 3 "vsib_address_operand" "Tv") (match_operand: 2 "register_operand" "v") (match_operand:SI 4 "const1248_operand" "n")] UNSPEC_VSIBADDR)])] @@ -13936,7 +13936,7 @@ (define_insn "*avx512f_scattersi" [(set (match_operator:VI48F_512 5 "vsib_mem_operator" [(unspec:P - [(match_operand:P 0 "vsib_address_operand" "p") + [(match_operand:P 0 "vsib_address_operand" "Tv") (match_operand: 2 "register_operand" "v") (match_operand:SI 4 "const1248_operand" "n")] UNSPEC_VSIBADDR)]) @@ -13972,7 +13972,7 @@ (define_insn "*avx512f_scatterdi" [(set (match_operator:VI48F_512 5 "vsib_mem_operator" [(unspec:P - [(match_operand:P 0 "vsib_address_operand" "p") + [(match_operand:P 0 "vsib_address_operand" "Tv") (match_operand:V8DI 2 "register_operand" "v") (match_operand:SI 4 "const1248_operand" "n")] UNSPEC_VSIBADDR)])