From patchwork Wed Mar 19 19:33:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Schmidt X-Patchwork-Id: 331854 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 D60B92C0096 for ; Thu, 20 Mar 2014 06:34: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 :message-id:subject:from:to:cc:date:content-type :content-transfer-encoding:mime-version; q=dns; s=default; b=wMg UM8080cbLXq7rSh6HRgGkxw7DSodl+IWXc7FdbuAH5saINp2fxl8fWcpR50P5WU4 awyjvoNTsFS2YXx9iGQ68XJ5iAmTljZf8CNnUcVb0WzHEpUbxyaX1ehvAVqVlbOL v7YinK1hlDh2G1qwxdprwipFLkZtWQf4t3nJcmpE= 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 :message-id:subject:from:to:cc:date:content-type :content-transfer-encoding:mime-version; s=default; bh=+zxWqZs5d +cSIIBGIFJC7CU20HA=; b=eJp6OfaQ0rvDFpsc1rmxMOu47RqWMgqUn1bef1BSD DpVRQ4i5J4zQdCue1gTLu7GLXynGq2iK4Qd5QDidjWIdMuwqG3XNjnKviy9pySDd 45nlRgOgdFAVOTDS4Jj/06N7XrmGwdwy/iFzv3YKXiigkCgh20zpNfygtOjq39r6 xU= Received: (qmail 28661 invoked by alias); 19 Mar 2014 19:33:16 -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 28577 invoked by uid 89); 19 Mar 2014 19:33:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: e28smtp06.in.ibm.com Received: from e28smtp06.in.ibm.com (HELO e28smtp06.in.ibm.com) (122.248.162.6) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 19 Mar 2014 19:33:10 +0000 Received: from /spool/local by e28smtp06.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 20 Mar 2014 01:03:06 +0530 Received: from d28dlp02.in.ibm.com (9.184.220.127) by e28smtp06.in.ibm.com (192.168.1.136) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 20 Mar 2014 01:03:03 +0530 Received: from d28relay02.in.ibm.com (d28relay02.in.ibm.com [9.184.220.59]) by d28dlp02.in.ibm.com (Postfix) with ESMTP id F2C01394005C for ; Thu, 20 Mar 2014 01:03:02 +0530 (IST) Received: from d28av04.in.ibm.com (d28av04.in.ibm.com [9.184.220.66]) by d28relay02.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s2JJWvN222085710 for ; Thu, 20 Mar 2014 01:02:57 +0530 Received: from d28av04.in.ibm.com (localhost [127.0.0.1]) by d28av04.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s2JJX2H8027621 for ; Thu, 20 Mar 2014 01:03:02 +0530 Received: from [9.50.16.86] (dyn9050016086.mts.ibm.com [9.50.16.86] (may be forged)) by d28av04.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id s2JJWxp4027478; Thu, 20 Mar 2014 01:03:01 +0530 Message-ID: <1395257593.17148.19.camel@gnopaine> Subject: [4.8, PATCH 17/26] Backport Power8 and LE support: Direct moves From: Bill Schmidt To: gcc-patches@gcc.gnu.org Cc: dje.gcc@gmail.com Date: Wed, 19 Mar 2014 14:33:13 -0500 Mime-Version: 1.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14031919-9574-0000-0000-00000C8637F8 X-IsSubscribed: yes Hi, This patch (diff-direct-move) backports support for the Power8 direct move instructions for little endian. Thanks, Bill 2014-03-19 Bill Schmidt Backport from mainline 2013-10-23 Pat Haugen * gcc.target/powerpc/direct-move.h: Fix header for executable tests. Back port from mainline 2014-01-16 Michael Meissner PR target/59844 * config/rs6000/rs6000.md (reload_vsx_from_gprsf): Add little endian support, remove tests for WORDS_BIG_ENDIAN. (p8_mfvsrd_3_): Likewise. (reload_gpr_from_vsx): Likewise. (reload_gpr_from_vsxsf): Likewise. (p8_mfvsrd_4_disf): Likewise. Index: gcc-4_8-test/gcc/config/rs6000/rs6000.md =================================================================== --- gcc-4_8-test.orig/gcc/config/rs6000/rs6000.md +++ gcc-4_8-test/gcc/config/rs6000/rs6000.md @@ -9438,7 +9438,7 @@ (unspec:SF [(match_operand:SF 1 "register_operand" "r")] UNSPEC_P8V_RELOAD_FROM_GPR)) (clobber (match_operand:DI 2 "register_operand" "=r"))] - "TARGET_POWERPC64 && TARGET_DIRECT_MOVE && WORDS_BIG_ENDIAN" + "TARGET_POWERPC64 && TARGET_DIRECT_MOVE" "#" "&& reload_completed" [(const_int 0)] @@ -9465,7 +9465,7 @@ [(set (match_operand:DF 0 "register_operand" "=r") (unspec:DF [(match_operand:FMOVE128_GPR 1 "register_operand" "wa")] UNSPEC_P8V_RELOAD_FROM_VSX))] - "TARGET_POWERPC64 && TARGET_DIRECT_MOVE && WORDS_BIG_ENDIAN" + "TARGET_POWERPC64 && TARGET_DIRECT_MOVE" "mfvsrd %0,%x1" [(set_attr "type" "mftgpr")]) @@ -9475,7 +9475,7 @@ [(match_operand:FMOVE128_GPR 1 "register_operand" "wa")] UNSPEC_P8V_RELOAD_FROM_VSX)) (clobber (match_operand:FMOVE128_GPR 2 "register_operand" "=wa"))] - "TARGET_POWERPC64 && TARGET_DIRECT_MOVE && WORDS_BIG_ENDIAN" + "TARGET_POWERPC64 && TARGET_DIRECT_MOVE" "#" "&& reload_completed" [(const_int 0)] @@ -9502,7 +9502,7 @@ (unspec:SF [(match_operand:SF 1 "register_operand" "wa")] UNSPEC_P8V_RELOAD_FROM_VSX)) (clobber (match_operand:V4SF 2 "register_operand" "=wa"))] - "TARGET_POWERPC64 && TARGET_DIRECT_MOVE && WORDS_BIG_ENDIAN" + "TARGET_POWERPC64 && TARGET_DIRECT_MOVE" "#" "&& reload_completed" [(const_int 0)] @@ -9524,7 +9524,7 @@ [(set (match_operand:DI 0 "register_operand" "=r") (unspec:DI [(match_operand:V4SF 1 "register_operand" "wa")] UNSPEC_P8V_RELOAD_FROM_VSX))] - "TARGET_POWERPC64 && TARGET_DIRECT_MOVE && WORDS_BIG_ENDIAN" + "TARGET_POWERPC64 && TARGET_DIRECT_MOVE" "mfvsrd %0,%x1" [(set_attr "type" "mftgpr")]) Index: gcc-4_8-test/gcc/testsuite/gcc.target/powerpc/direct-move.h =================================================================== --- gcc-4_8-test.orig/gcc/testsuite/gcc.target/powerpc/direct-move.h +++ gcc-4_8-test/gcc/testsuite/gcc.target/powerpc/direct-move.h @@ -1,5 +1,7 @@ /* Test functions for direct move support. */ +#include +extern void abort (void); #ifndef VSX_REG_ATTR #define VSX_REG_ATTR "wa" @@ -111,7 +113,7 @@ const struct test_struct test_functions[ void __attribute__((__noinline__)) test_value (TYPE a) { - size_t i; + long i; for (i = 0; i < sizeof (test_functions) / sizeof (test_functions[0]); i++) { @@ -127,8 +129,7 @@ test_value (TYPE a) int main (void) { - size_t i; - long j; + long i,j; union { TYPE value; unsigned char bytes[sizeof (TYPE)];