From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 105443 invoked by alias); 27 Apr 2018 21:40:26 -0000 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 Received: (qmail 105091 invoked by uid 89); 27 Apr 2018 21:40:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.7 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=beg, Hx-languages-length:1414, Hx-spam-relays-external:74.125.82.68, H*RU:74.125.82.68 X-HELO: mail-wm0-f68.google.com Received: from mail-wm0-f68.google.com (HELO mail-wm0-f68.google.com) (74.125.82.68) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 27 Apr 2018 21:40:21 +0000 Received: by mail-wm0-f68.google.com with SMTP id i3so5161021wmf.3 for ; Fri, 27 Apr 2018 14:40:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=nVrs5IdMrwiWD87NVZNMZQzYB29xB41dqfahYPPOD/o=; b=PLnWspenAPaAXGS85qA96f7CMkJWCTXWxFQb4RIACjmqOWcqEg5tPAuDsgLlDRxT7Y y1AIDWtMyipkd1/pfldOo0dPGVNiZ2JRF2bPVRc5BfTRG14+73HgHc/1Ec59J/5xb21e /TwfiDTHM+m/aMNR8a1CDVP2XFJD3GNk1cSp9fFYJFbAjCTtu8A4qUxsKfhYtDl/M+4J GWdMDmebunotW/OaBADWTNqzPSRru0ulOJjU+s5f3CbzAyz4oQ/E0e7DR3gVu2/G84af k96PlYLsllXlKR9FNyEoV16NJMezv8cVF/wVa5lNAq2qlHep/G/+VKfitL/pX6+EqZ3j Mf6A== X-Gm-Message-State: ALQs6tAsW09A6ZWIQckopAQdopA1dGXjYFTx6c5OeuhJiK8sIna/oLp3 CCRjWtJp1Z+aBAHyO9PPGOTDcA== X-Google-Smtp-Source: AB8JxZqb/KTA7WUndvOt1+66z31tOGo1eQZF7LnTBmJTLHJMZf0RwYcV3CZyljLI0fzU0WEtkxi2Vg== X-Received: by 10.28.171.193 with SMTP id u184mr2434390wme.60.1524865219091; Fri, 27 Apr 2018 14:40:19 -0700 (PDT) Received: from localhost (host86-135-253-94.range86-135.btcentralplus.com. [86.135.253.94]) by smtp.gmail.com with ESMTPSA id a10-v6sm2791993wri.10.2018.04.27.14.40.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 27 Apr 2018 14:40:18 -0700 (PDT) Date: Fri, 27 Apr 2018 21:44:00 -0000 From: Andrew Burgess To: Claudiu Zissulescu Cc: gcc-patches@gcc.gnu.org, Francois.Bedard@synopsys.com Subject: Re: [PATCH 5/5] [ARC] Clear the instruction cache using syscalls. Message-ID: <20180427214017.GE3375@embecosm.com> References: <1523005214-1611-1-git-send-email-claziss@synopsys.com> <1523005214-1611-6-git-send-email-claziss@synopsys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1523005214-1611-6-git-send-email-claziss@synopsys.com> X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] User-Agent: Mutt/1.9.2 (2017-12-15) X-IsSubscribed: yes X-SW-Source: 2018-04/txt/msg01258.txt.bz2 * Claudiu Zissulescu [2018-04-06 11:00:14 +0200]: > Clear the instruction cache from `beg' to `end'. This makes an inline > system call to SYS_cacheflush. > > gcc/ > 2017-03-28 Claudiu Zissulescu > > * config/arc/linux.h (CLEAR_INSN_CACHE): Define. Looks good. Thanks, Andrew > --- > gcc/config/arc/linux.h | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/gcc/config/arc/linux.h b/gcc/config/arc/linux.h > index 4e87dfe..96d548e 100644 > --- a/gcc/config/arc/linux.h > +++ b/gcc/config/arc/linux.h > @@ -109,3 +109,17 @@ along with GCC; see the file COPYING3. If not see > /* Build attribute: procedure call standard. */ > #undef ATTRIBUTE_PCS > #define ATTRIBUTE_PCS 3 > + > +/* Clear the instruction cache from `beg' to `end'. This makes an > + inline system call to SYS_cacheflush. */ > +#undef CLEAR_INSN_CACHE > +#define CLEAR_INSN_CACHE(beg, end) \ > +{ \ > + register unsigned long _beg __asm ("r0") = (unsigned long) (beg); \ > + register unsigned long _end __asm ("r1") = (unsigned long) (end); \ > + register unsigned long _xtr __asm ("r2") = 0; \ > + register unsigned long _scno __asm ("r8") = 244; \ > + __asm __volatile ("trap_s 0 ; sys_cache_sync" \ > + : "=r" (_beg) \ > + : "0" (_beg), "r" (_end), "r" (_xtr), "r" (_scno)); \ > +} > -- > 1.9.1 >