From patchwork Wed Jun 6 09:33:23 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ramana Radhakrishnan X-Patchwork-Id: 163308 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 D78CAB6FA1 for ; Wed, 6 Jun 2012 19:33:42 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1339580023; h=Comment: DomainKey-Signature:Received:Received:Received:Received: MIME-Version:Received:Received:In-Reply-To:References:Date: Message-ID:Subject:From:To:Cc:Content-Type: Content-Transfer-Encoding:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=ouJBwb13z/tn/HJpMXrI5b+Ae3U=; b=s3tfncJ3ouk45wJ EBEuo+sh1cX+7Stpr+pzgRU44hJ753a3k5Uz3d85ZorGezin+mjD7bg43tekDX1/ N+gZEpKqRpm5nQ7gwpWXzFs916WoJFXs/poaeWI3B/9QIUm0G7JQOdjbFykReYv9 /dKWLAHhv8hm1rZWbKNEBiVd+STU= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:X-Google-DKIM-Signature:MIME-Version:Received:Received:In-Reply-To:References:Date:Message-ID:Subject:From:To:Cc:Content-Type:Content-Transfer-Encoding:X-Gm-Message-State:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=gaX6ldOxI+UuSC5FLp/QmHggD+vzfNFLNiwzxt5L/cUBE48VzvOIkQ2fh+02am v1bC5r4g5gPqfZWxODYPpK8OrSiZls/irthGf15FcRcmfPnpSrIc6x1lvY5/QtCu 25eVfABwNNI5ej0hMS8sQ6htb2+kKOE3QxDaYErmiOR2A=; Received: (qmail 26805 invoked by alias); 6 Jun 2012 09:33:37 -0000 Received: (qmail 26797 invoked by uid 22791); 6 Jun 2012 09:33:37 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, KHOP_THREADED, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, TW_DZ, TW_VT, TW_ZB, TW_ZW X-Spam-Check-By: sourceware.org Received: from mail-qa0-f47.google.com (HELO mail-qa0-f47.google.com) (209.85.216.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 06 Jun 2012 09:33:24 +0000 Received: by qabg1 with SMTP id g1so2581903qab.20 for ; Wed, 06 Jun 2012 02:33:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding:x-gm-message-state; bh=H/F+H23gFisLoaM1qxdSyfvoxputX0bD6IKh9jT2O5U=; b=LuD+JQeOWblNaNQJ1VBTba+c3qa64JSBCDdn2XE89qK7ZoFWrBe+kkKHGWvpBj+D07 xwvfTxNRYVeHy14AfAkd0/kM9aJbHgLQkvZq+mmS8QNvE7UgUD3ndJ15C52MXIAN3h4O 7baxg+3MXZwH83Um+1DxuTDcZL+Rgm3xUGG+DRemWhYpc66X0RWlPKOlZvot3yMH3VbP 5v56F0ocVV9XC6jtenSV6VVJ5saEpFiVQqlYo0JxisBMGD9sechHTBZRZBi8OVEd0cJr fPUjSBVCFwv/Y6ifjmwu2K4WPq06ptKNuIUQVeDTeBYiafeLiSIrX9WcQjwXiGiLcl44 y9qw== MIME-Version: 1.0 Received: by 10.229.134.213 with SMTP id k21mr359375qct.145.1338975203471; Wed, 06 Jun 2012 02:33:23 -0700 (PDT) Received: by 10.224.137.73 with HTTP; Wed, 6 Jun 2012 02:33:23 -0700 (PDT) In-Reply-To: References: <1330142015-26244-1-git-send-email-mattst88@gmail.com> <1330142015-26244-2-git-send-email-mattst88@gmail.com> <20120229001359.GB7636@e102742> Date: Wed, 6 Jun 2012 10:33:23 +0100 Message-ID: Subject: Re: [PATCH] arm: add _mm_empty to mmintrin.h for source compatibility From: Ramana Radhakrishnan To: Matt Turner Cc: gcc-patches@gcc.gnu.org, Nick Clifton , Richard Earnshaw , Paul Brook X-Gm-Message-State: ALoCoQkvxsks5dhNLYWLdPoAq/FYQf9bQepM/rmBkUEsJDwuwXXu7hDwRJsBtk/R1PD4qffTQtdj X-IsSubscribed: yes 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 On 28 May 2012 22:56, Matt Turner wrote: > On Tue, Feb 28, 2012 at 7:13 PM, Ramana Radhakrishnan > wrote: >> On Fri, Feb 24, 2012 at 10:53:35PM -0500, Matt Turner wrote: >>> The x86/amd64 mmintrin.h provides the _mm_empty intrinsic for the 'emms' >>> MMX instruction. Although ARM does not need such an instruction, we >>> should provide an empty _mm_empty function nonetheless for source >>> compatibility. >> >> OK for 4.8 and after your copyright assignment has been >> sorted. >> >> Ramana >> >>> >>> 2012-02-24  Matt Turner   >>> >>>       * config/arm/mmintrin.h (_mm_empty): New. >>> --- >>>  gcc/config/arm/mmintrin.h |    7 +++++++ >>>  1 files changed, 7 insertions(+), 0 deletions(-) >>> >>> diff --git a/gcc/config/arm/mmintrin.h b/gcc/config/arm/mmintrin.h >>> index 2cc500d..ea73bf1 100644 >>> --- a/gcc/config/arm/mmintrin.h >>> +++ b/gcc/config/arm/mmintrin.h >>> @@ -32,6 +32,12 @@ typedef int __v2si __attribute__ ((vector_size (8))); >>>  typedef short __v4hi __attribute__ ((vector_size (8))); >>>  typedef char __v8qi __attribute__ ((vector_size (8))); >>> >>> +/* Provided for source compatibility with MMX.  */ >>> +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >>> +_mm_empty (void) >>> +{ >>> +} >>> + >>>  /* "Convert" __m64 and __int64 into each other.  */ >>>  static __inline __m64 >>>  _mm_cvtsi64_m64 (__int64 __i) >>> @@ -1248,6 +1254,7 @@ _m_from_int (int __a) >>>  #define _m_psadzbw _mm_sadz_pu8 >>>  #define _m_psadzwd _mm_sadz_pu16 >>>  #define _m_paligniq _mm_align_si64 >>> +#define _m_empty _mm_empty >>>  #define _m_cvt_si2pi _mm_cvtsi64_m64 >>>  #define _m_cvt_pi2si _mm_cvtm64_si64 >>> >>> -- >>> 1.7.3.4 >>> > > Copyright assignment is sorted. Please commit. :) Done now. Only change was to put _m_empty in alphabetical order and this is what I committed. Thanks, Ramana _mm_cvtsi64_m64 (__int64 __i) @@ -1115,6 +1121,7 @@ return (__m64)__a; } +#define _m_empty _mm_empty #define _m_packsswb _mm_packs_pi16 #define _m_packssdw _mm_packs_pi32 #define _m_packuswb _mm_packs_pu16 Index: gcc/config/arm/mmintrin.h =================================================================== --- gcc/config/arm/mmintrin.h (revision 188258) +++ gcc/config/arm/mmintrin.h (revision 188259) @@ -32,6 +32,12 @@ typedef short __v4hi __attribute__ ((vector_size (8))); typedef char __v8qi __attribute__ ((vector_size (8))); +/* Provided for source compatibility with MMX. */ +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_empty (void) +{ +} + /* "Convert" __m64 and __int64 into each other. */ static __inline __m64