libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libunwind-devel] [PATCH 24/27] Flush icache with __builtin___clear_


From: Konstantin Belousov
Subject: Re: [Libunwind-devel] [PATCH 24/27] Flush icache with __builtin___clear_cache() in tests when compiling with GCC
Date: Wed, 29 Aug 2012 21:47:01 +0300
User-agent: Mutt/1.4.2.3i

On Wed, Aug 29, 2012 at 04:22:50PM +0300, Tommi Rantala wrote:
> 2012/8/22 Tommi Rantala <address@hidden>:
> > When compiling with GCC, use the builtin instruction cache flushing
> > mechanism in all tests where it is needed.
> >
> > Quoting GCC docs: ''If the target does not require instruction cache
> > flushes, __builtin___clear_cache has no effect. Otherwise either
> > instructions are emitted in-line to clear the instruction cache or a
> > call to the __clear_cache function in libgcc is made.''.
> 
> I installed FreeBSD 9.0 in qemu, and noticed that
> __builtin___clear_cache() does not seem to be available in the FreeBSD
> GCC version. I guess we need to either check for the GCC version, or
> check if __builtin___clear_cache() is available.
> 
> Anyone else have better ideas?

I use gcc 4.7.1 to build libunwind, so I did not noted this.
Yes, gcc in the FreeBSD base is ancient, because this was the last
GPLv2 version.

That said, clang defines __GNUC__, but only provides  __builtin___clear_cache
on ARM.

It seems that the configure-time detection of the  __builtin___clear_cache
is the only route.

Attachment: pgpguWZ5vzFLf.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]