From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5174 invoked by alias); 5 Jul 2007 07:50:15 -0000 Received: (qmail 5164 invoked by uid 22791); 5 Jul 2007 07:50:14 -0000 X-Spam-Check-By: sourceware.org Received: from smtp1.dnsmadeeasy.com (HELO smtp1.dnsmadeeasy.com) (205.234.170.134) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 05 Jul 2007 07:50:09 +0000 Received: from smtp1.dnsmadeeasy.com (localhost [127.0.0.1]) by smtp1.dnsmadeeasy.com (Postfix) with ESMTP id 2980A2FAADC for ; Thu, 5 Jul 2007 07:50:08 +0000 (UTC) X-Authenticated-Name: js.dnsmadeeasy X-Transit-System: In case of SPAM please contact abuse@dnsmadeeasy.com Received: from avtrex.com (unknown [67.116.42.147]) by smtp1.dnsmadeeasy.com (Postfix) with ESMTP for ; Thu, 5 Jul 2007 07:50:08 +0000 (UTC) Received: from jennifer.localdomain ([192.168.7.221]) by avtrex.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 5 Jul 2007 00:50:09 -0700 Message-ID: <468CA28A.1040204@avtrex.com> Date: Thu, 05 Jul 2007 09:05:00 -0000 From: David Daney User-Agent: Thunderbird 2.0.0.4 (X11/20070615) MIME-Version: 1.0 To: gcc-patches@gcc.gnu.org Subject: [Patch] 4/3 i386 target support for __builtin___clear_cache() References: <468734D3.3020908@avtrex.com> In-Reply-To: <468734D3.3020908@avtrex.com> Content-Type: multipart/mixed; boundary="------------030206050508070209080703" X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2007-07/txt/msg00419.txt.bz2 This is a multi-part message in MIME format. --------------030206050508070209080703 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 587 This patch adds support for __builtin___clear_cache() to the i386 (and x86_64) target. There is not much to see here. All I do is define the TARGET_BUILTIN_CLEAR_CACHE_INLINE_P target hook to always return false. This causes __builtin___clear_cache() to be a nop for this target. Tested with bootstrap and make -k check with no regressions on x86_64-unknown-linux-gnu. OK to commit if the target independent portion of the patch is approved? 2007-07-04 David Daney * config/i386/i386.h (TARGET_BUILTIN_CLEAR_CACHE_INLINE_P): Define target hook. --------------030206050508070209080703 Content-Type: text/x-patch; name="flush-cache4.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="flush-cache4.diff" Content-length: 672 Index: config/i386/i386.h =================================================================== --- config/i386/i386.h (revision 125997) +++ config/i386/i386.h (working copy) @@ -1716,6 +1716,12 @@ typedef struct ix86_args { #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \ x86_initialize_trampoline ((TRAMP), (FNADDR), (CXT)) + +/* We never need to clear the instruction cache. Returning true will + prevent _builtin__clear_cache from expanding to a library call. + Since a "clear_cache" insn is not defined it will expand to + const0_rtx. */ +#define TARGET_BUILTIN_CLEAR_CACHE_INLINE_P hook_bool_void_true /* Definitions for register eliminations. --------------030206050508070209080703--