From: Richard Henderson <rth@redhat.com>
To: Camm Maguire <camm@maguirefamily.org>
Cc: Witold Baryluk <baryluk@smp.if.uj.edu.pl>,
gcc@gcc.gnu.org, linux-alpha@vger.kernel.org,
debian-alpha@lists.debian.org, gcl-devel@gnu.org
Subject: Re: clear_cache on Alpha architecture not implemented?
Date: Thu, 03 May 2012 11:34:38 -0700 [thread overview]
Message-ID: <4FA2CFBE.1050102@redhat.com> (raw)
In-Reply-To: <87ehr1noec.fsf@maguirefamily.org>
On 05/03/2012 10:51 AM, Camm Maguire wrote:
> The goal was to exercise the very helpful gcc __builtin___clear_cache
> support, and to avoid having to maintain our own assembler for all the
> different cpus in this regard. Clearly, it is easy to revert this on a
> per architecture basis if absolutely necessary. If gcc does or does not
> plan on fixing this, please let me know so gcl can adjust as needed.
While we can probably fix this, you should know that __builtin_clear_cache
is highly tied to the implementation of trampolines for the target. Thus
there are at least 3 targets that do not handle this "properly":
For alpha, we emit imb directly during the trampoline_init target hook.
For powerpc32, the libgcc routine __clear_cache is unimplemented, but the
cache flushing for trampolines is inside the __trampoline_setup routine.
For powerpc64 and ia64, the ABI for function calls allows trampolines to
be implemented without emitting any insns, and thus the icache need not be
flushed at all. And thus we never bothered implementing __builtin_clear_cache.
So, the fact of the matter is that you can't reliably use this builtin for
arbitrary targets for any gcc version up to 4.7. Feel free to submit an
enhancement request via bugzilla so that we can remember to address this
for gcc 4.8.
r~
next prev parent reply other threads:[~2012-05-03 18:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87y5pct1hv.fsf@maguirefamily.org>
[not found] ` <20120501154228.GI26837@smp.if.uj.edu.pl>
[not found] ` <87397jiur8.fsf@maguirefamily.org>
[not found] ` <20120501205443.GJ26837@smp.if.uj.edu.pl>
[not found] ` <87txzy7n8g.fsf@maguirefamily.org>
[not found] ` <20120502153115.GK26837@smp.if.uj.edu.pl>
[not found] ` <87havyiftj.fsf@maguirefamily.org>
[not found] ` <20120502194308.GL26837@smp.if.uj.edu.pl>
[not found] ` <87pqalz9k6.fsf@maguirefamily.org>
2012-05-03 17:25 ` clear_cache on Alpha architecture not implemented? Witold Baryluk
2012-05-03 17:51 ` Camm Maguire
2012-05-03 18:34 ` Richard Henderson [this message]
2012-05-03 21:05 ` Witold Baryluk
2012-05-04 13:39 ` Camm Maguire
2012-05-04 17:39 ` Richard Henderson
2012-05-04 13:55 ` Camm Maguire
2012-05-04 14:07 ` Camm Maguire
2012-05-04 14:50 ` Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FA2CFBE.1050102@redhat.com \
--to=rth@redhat.com \
--cc=baryluk@smp.if.uj.edu.pl \
--cc=camm@maguirefamily.org \
--cc=debian-alpha@lists.debian.org \
--cc=gcc@gcc.gnu.org \
--cc=gcl-devel@gnu.org \
--cc=linux-alpha@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).