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: Fri, 04 May 2012 10:39:29 -0700 [thread overview]
Message-ID: <4FA41451.6040004@redhat.com> (raw)
In-Reply-To: <87zk9ohxp1.fsf@maguirefamily.org>
On 05/04/12 06:39, Camm Maguire wrote:
> I'm wondering if there is a simple configure time test to detect when
> this has been fixed. If I just aborted using __builtin___clear_cache if
> it is in fact a noop on alpha, ppc, ppc64, and ia64, would this suffice?
I can't think of any simple, portable test.
The only reliable test would be to actually attempt to flush a cache,
with some detectable way to see this didn't happen. This tends to get
highly target specific quickly...
A pattern that would at least apply to 32-bit insn word risc might be
int test_routine[2] = {
"mov 1, v0"
"ret"
};
#define call_test ((int (*)(void))test_routine)
int main()
{
call_test(); // make sure the routine is in icache
test_routine[0] = "mov 0, v0";
__builtin__clear_cache(test_routine, test_routine+2);
return call_test();
}
for target-dependent values of those instructions.
r~
next prev parent reply other threads:[~2012-05-04 17:39 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
2012-05-03 21:05 ` Witold Baryluk
2012-05-04 13:39 ` Camm Maguire
2012-05-04 17:39 ` Richard Henderson [this message]
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=4FA41451.6040004@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.