From patchwork Sat Aug 6 08:19:31 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 108763 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]) by ozlabs.org (Postfix) with SMTP id 9A4C7B6F77 for ; Sat, 6 Aug 2011 18:19:54 +1000 (EST) Received: (qmail 24137 invoked by alias); 6 Aug 2011 08:19:50 -0000 Received: (qmail 24129 invoked by uid 22791); 6 Aug 2011 08:19:47 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, TW_AV, TW_VX, TW_ZJ, T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-pz0-f49.google.com (HELO mail-pz0-f49.google.com) (209.85.210.49) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 06 Aug 2011 08:19:31 +0000 Received: by pzk6 with SMTP id 6so5670498pzk.8 for ; Sat, 06 Aug 2011 01:19:31 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.142.1 with SMTP id p1mr2950094wfd.71.1312618771325; Sat, 06 Aug 2011 01:19:31 -0700 (PDT) Received: by 10.143.34.2 with HTTP; Sat, 6 Aug 2011 01:19:31 -0700 (PDT) Date: Sat, 6 Aug 2011 10:19:31 +0200 Message-ID: Subject: [PATCH, i386]: Add castmode mode attribute From: Uros Bizjak To: gcc-patches@gcc.gnu.org Cc: Kirill Yukhin 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 Hello! This patch will simplify macroization of AVX2 stuff. No functional changes. 2011-08-06 Uros Bizjak * config/i386/i386.md (ssemodesuffix): Remove V8SI mode. * config/i386/sse.md (castmode): New mode attribute. (avx__): Rename from avx__. Bootstrapped on x86_64-pc-linux-gnu, committed to mainline SVN. Uros. Index: i386.md =================================================================== --- i386.md (revision 177503) +++ i386.md (working copy) @@ -935,8 +935,7 @@ [(SF "ss") (DF "sd") (V8SF "ps") (V4DF "pd") (V4SF "ps") (V2DF "pd") - (V16QI "b") (V8HI "w") (V4SI "d") (V2DI "q") - (V8SI "si")]) + (V16QI "b") (V8HI "w") (V4SI "d") (V2DI "q")]) ;; SSE vector suffix for floating point modes (define_mode_attr ssevecmodesuffix [(SF "ps") (DF "pd")]) Index: sse.md =================================================================== --- sse.md (revision 177503) +++ sse.md (working copy) @@ -178,6 +178,9 @@ (define_mode_attr sserotatemax [(V16QI "7") (V8HI "15") (V4SI "31") (V2DI "63")]) +;; Mapping of mode to cast intrinsic name +(define_mode_attr castmode [(V8SI "si") (V8SF "ps") (V4DF "pd")]) + ;; Instruction suffix for sign and zero extensions. (define_code_attr extsuffix [(sign_extend "sx") (zero_extend "zx")]) @@ -10233,7 +10236,7 @@ (set_attr "prefix" "vex") (set_attr "mode" "")]) -(define_insn_and_split "avx__" +(define_insn_and_split "avx__" [(set (match_operand:AVX256MODE2P 0 "nonimmediate_operand" "=x,m") (unspec:AVX256MODE2P [(match_operand: 1 "nonimmediate_operand" "xm,x")]