DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 5569Io042585988
Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 5569Io042585988
Authentication-Results: delorie.com;
	dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=Pw7AVtgp
X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DC2963856942
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1749201528;
	bh=Kf4Quqv/eOjhVBwlKqoNrG+p4AZH6GBeR0q/z9An8/o=;
	h=Date:To:Cc:Subject:References:In-Reply-To:List-Id:
	 List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:
	 From:Reply-To:From;
	b=Pw7AVtgpOBAfYGyZ9lZKwQYXNAoETnf6vla6xzn1by9C8t1OFTPRHDQezIV8hMZN5
	 D4fFbhDliIqM9TuRU0BTsPV5GeTbEbvn9ZRoLlGg88eh2fZoKhz/Rb8cGuPU9gZh7Z
	 UfAst2p14IalDRYh3o91Beu7iZQ24dqfAltVV+/Y=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1C3BC3857B98
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1C3BC3857B98
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1749199756; cv=none;
 b=Rs2708Sn3ymoBstL8ETcmix2ld3Jb7hkss9IVws0CVIszB/HEBVlRIXIUnPOnU1rBrAJvs0k73+kmNLTBLB8bDCBmpkry7vqykztjM4KMmFQ8/9+L5CZnV8OyJfWgge4COOpZzZ53ShIde3fbL1ekJqjLT9NwM12W014Hqpe7S0=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
 t=1749199756; c=relaxed/simple;
 bh=uoTMDSGGr236jIen7itfSfHKeXxbyStpVpYMWgKK8UM=;
 h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version;
 b=Sfnnab3Xnbx9IQNzT6Xt4R1l+plQbdayJZEkpbV8pM189ZOOReVWnH+zuNKMOl2eZILd1k9nDh7QfJnUDqviyf25C5e3B5xvnFj6S0myJkBGVFldyZMXGOz3yrXDl8rjf9/BBTPQU/sSkKNlw8dG8LmZPTs5pwH0vBe5Gr+WhrY=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1C3BC3857B98
Date: Fri, 6 Jun 2025 04:49:12 -0400
To: Jeremy Drake <cygwin@jdrake.com>
Cc: cygwin@cygwin.com
Subject: Re: instruction cache flushing in Cygwin
Message-ID: <aEKriMYj44cbkdIO@xps13>
References: <c2da7fdd-08f3-006b-9ff8-7270d5010bc4@jdrake.com>
MIME-Version: 1.0
Content-Disposition: inline
In-Reply-To: <c2da7fdd-08f3-006b-9ff8-7270d5010bc4@jdrake.com>
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.30
Precedence: list
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: Glenn Strauss via Cygwin <cygwin@cygwin.com>
Reply-To: Glenn Strauss <gs-cygwin.com@gluelogic.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cygwin-bounces~archive-cygwin=delorie.com@cygwin.com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie.com@cygwin.com>

On Thu, Jun 05, 2025 at 11:33:18PM -0700, Jeremy Drake via Cygwin wrote:
> I noticed while looking at JIT test failures in LLVM that they don't have
> an implementation for Cygwin for flushing the instruction cache.  I don't
> see any Cygwin function calling FlushInstructionCache, is there some
> POSIXy function for this?  I don't really want to have to include Windows
> headers just to get FlushInstructionCache and GetCurrentProcess, risking
> pulling in a lot of extra definitions.

Do you need something specific to Cygwin, or something that is specific
to CPU-architecture?  GCC and Clang both have __builtin___clear_cache()
intrinsic (yes, with all those underscores)

Cheers, Glenn

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
