From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1318 invoked by alias); 1 Jul 2007 18:47:38 -0000 Received: (qmail 1309 invoked by uid 22791); 1 Jul 2007 18:47:38 -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; Sun, 01 Jul 2007 18:47:35 +0000 Received: from smtp1.dnsmadeeasy.com (localhost [127.0.0.1]) by smtp1.dnsmadeeasy.com (Postfix) with ESMTP id 109D62F50C9; Sun, 1 Jul 2007 18:47:34 +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; Sun, 1 Jul 2007 18:47:33 +0000 (UTC) Received: from jennifer.localdomain ([192.168.7.229]) by avtrex.com with Microsoft SMTPSVC(6.0.3790.1830); Sun, 1 Jul 2007 11:47:33 -0700 Message-ID: <4687F6C1.6050906@avtrex.com> Date: Sun, 01 Jul 2007 18:47:00 -0000 From: David Daney User-Agent: Thunderbird 2.0.0.4 (X11/20070615) MIME-Version: 1.0 To: Paolo Bonzini Cc: gcc-patches@gcc.gnu.org Subject: Re: [Patch] 1/3 Add new builtin __builtin_flush_icache(). References: <468734D3.3020908@avtrex.com> <46875F54.8070905@gnu.org> In-Reply-To: <46875F54.8070905@gnu.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/msg00035.txt.bz2 Paolo Bonzini wrote: > >> The prototype for the new built-in is: >> >> void __builtin_flush_icache(void *location, size_t len); >> >> As one might expect, it flushes the region of memory pointed to by >> location with length len from the instruction cache. The >> new builtin and the flush_icache insn would be the preferred mechanism >> to flushing the i-cache. > > libgcc already exports __clear_cache with this prototype: > > void > __clear_cache (char *beg __attribute__((__unused__)), > char *end __attribute__((__unused__))) I am aware of this function. What is your suggestion? Should we: 1) Rename the new builtin to __builtin_clear_cache (char *beg , char *end), and have it call the function in libgcc if there is not an inline expansion for it? 2) Keep the name an prototype of my original patch and call __clear_cache if there is not an inline expansion for it? 3) Something else entirely? It would seem that arm and m68k are the only targets that use __clear_cache() from libgcc. David Daney David Daney