From patchwork Thu Sep 15 19:13:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 114815 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 724D2B70C2 for ; Fri, 16 Sep 2011 05:13:58 +1000 (EST) Received: (qmail 6958 invoked by alias); 15 Sep 2011 19:13:57 -0000 Received: (qmail 6946 invoked by uid 22791); 15 Sep 2011 19:13:56 -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_ZJ, T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-gw0-f51.google.com (HELO mail-gw0-f51.google.com) (74.125.83.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 15 Sep 2011 19:13:42 +0000 Received: by gwj17 with SMTP id 17so3144461gwj.10 for ; Thu, 15 Sep 2011 12:13:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.146.58.22 with SMTP id g22mr1202478yaa.34.1316114021438; Thu, 15 Sep 2011 12:13:41 -0700 (PDT) Received: by 10.147.171.6 with HTTP; Thu, 15 Sep 2011 12:13:41 -0700 (PDT) Date: Thu, 15 Sep 2011 21:13:41 +0200 Message-ID: Subject: [PATCH, i386]: A couple of cleanups. From: Uros Bizjak To: gcc-patches@gcc.gnu.org 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! No functional change. 2011-09-15 Uros Bizjak * config/i386/i386.c (output_fp_compare): Return %v prefixed instruction mnemonics for TARGET_AVX. * config/i386/i386.md (*movdf_internal_rex64): use cond RTX in "type" attribute calculation. (*movdf_internal): Ditto. (*movsf_internal): Ditto. Tested on x86_64-pc-linux-gnu {,-m32}, committed to mainline SVN. Uros. Index: i386.md =================================================================== --- i386.md (revision 178889) +++ i386.md (working copy) @@ -3028,7 +3030,17 @@ gcc_unreachable(); } } - [(set_attr "type" "fmov,fmov,fmov,imov,imov,imov,multi,sselog1,ssemov,ssemov,ssemov,ssemov,ssemov") + [(set (attr "type") + (cond [(eq_attr "alternative" "0,1,2") + (const_string "fmov") + (eq_attr "alternative" "3,4,5") + (const_string "imov") + (eq_attr "alternative" "6") + (const_string "multi") + (eq_attr "alternative" "7") + (const_string "sselog1") + ] + (const_string "ssemov"))) (set (attr "modrm") (if_then_else (and (eq_attr "alternative" "5") (eq_attr "type" "imov")) @@ -3158,7 +3170,15 @@ (if_then_else (eq_attr "alternative" "5,6,7,8") (const_string "sse2") (const_string "*"))) - (set_attr "type" "fmov,fmov,fmov,multi,multi,sselog1,ssemov,ssemov,ssemov,sselog1,ssemov,ssemov,ssemov") + (set (attr "type") + (cond [(eq_attr "alternative" "0,1,2") + (const_string "fmov") + (eq_attr "alternative" "3,4") + (const_string "multi") + (eq_attr "alternative" "5,9") + (const_string "sselog1") + ] + (const_string "ssemov"))) (set (attr "prefix") (if_then_else (eq_attr "alternative" "0,1,2,3,4") (const_string "orig") @@ -3272,7 +3292,17 @@ gcc_unreachable (); } } - [(set_attr "type" "fmov,fmov,fmov,imov,imov,sselog1,ssemov,ssemov,ssemov,mmxmov,mmxmov,mmxmov,ssemov,ssemov,mmxmov,mmxmov") + [(set (attr "type") + (cond [(eq_attr "alternative" "0,1,2") + (const_string "fmov") + (eq_attr "alternative" "3,4") + (const_string "multi") + (eq_attr "alternative" "5") + (const_string "sselog1") + (eq_attr "alternative" "9,10,11,14,15") + (const_string "mmxmov") + ] + (const_string "ssemov"))) (set (attr "prefix") (if_then_else (eq_attr "alternative" "5,6,7,8,12,13") (const_string "maybe_vex") Index: i386.c =================================================================== --- i386.c (revision 178889) +++ i386.c (working copy) @@ -14900,21 +14900,16 @@ output_fp_compare (rtx insn, rtx *operands, bool e if (is_sse) { - static const char ucomiss[] = "vucomiss\t{%1, %0|%0, %1}"; - static const char ucomisd[] = "vucomisd\t{%1, %0|%0, %1}"; - static const char comiss[] = "vcomiss\t{%1, %0|%0, %1}"; - static const char comisd[] = "vcomisd\t{%1, %0|%0, %1}"; - if (GET_MODE (operands[0]) == SFmode) if (unordered_p) - return &ucomiss[TARGET_AVX ? 0 : 1]; + return "%vucomiss\t{%1, %0|%0, %1}"; else - return &comiss[TARGET_AVX ? 0 : 1]; + return "%vcomiss\t{%1, %0|%0, %1}"; else if (unordered_p) - return &ucomisd[TARGET_AVX ? 0 : 1]; + return "%vucomisd\t{%1, %0|%0, %1}"; else - return &comisd[TARGET_AVX ? 0 : 1]; + return "%vcomisd\t{%1, %0|%0, %1}"; } gcc_assert (STACK_TOP_P (cmp_op0));