public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Mark Mitchell <mark@codesourcery.com>
To: David Daney <ddaney@avtrex.com>
Cc: gcc-patches@gcc.gnu.org, Paolo Bonzini <bonzini@gnu.org>,
	  rsandifo@nildram.co.uk
Subject: Re: [Patch] 1/3 Add new builtin __builtin_flush_icache().
Date: Wed, 11 Jul 2007 02:22:00 -0000	[thread overview]
Message-ID: <46943DC9.5080409@codesourcery.com> (raw)
In-Reply-To: <469137A0.4010305@avtrex.com>

David Daney wrote:

> My new implementation has three cases for __builtin___clear_cache():
> 
> 1) No "clear_cache" insn is supplied but the target does supply a
> definition for CLEAR_INSN_CACHE.  In this case (arm, m68k IIRC) the new
> builtin will expand to a call to the existing __clear_cache in libgcc.
> 
> 2) A "clear_cache" insn is supplied.  For this case, the builtin expands
> to said insn.  The mips portion of the patch currently has the only
> implemtation of "clear_cache".
> 
> 3) Neither "clear_cache" or CLEAR_INSN_CACHE is defined.  This case
> covers most GCC targets including but not limited to i386 and x86_64. 
> In this case the builtin expands to nothing, so it is a nop.

I think one could make an argument that for case 3)
__builtin___clear_cache should still expant to __clear_cache (just as
with case 1).  That would allow you to provide a new libgcc.so in future
and fix binaries that were trying to clear caches, but failing.

But, I don't think that's a very good argument.  It means that on a
system with no cache, you now have to explicit define a clear_cache
instruction (expanding to nothing) in order to say "no, there really is
no cache to clear here".

> 2007-07-08  David Daney  <ddaney@avtrex.com>
> 
>    * builtins.def (BUILT_IN_CLEAR_CACHE): New builtin.
>    * builtins.c (expand_builtin___clear_cache): New function.
>    (expand_builtin): Call expand_builtin___clear_cache for
>    BUILT_IN_CLEAR_CACHE case.
>    * doc/extend.texi (__builtin___clear_cache): Document new builtin.
>    * testsuite/gcc.dg/builtins-64.c: New test.

:REVIEWMAIL: OK

Thanks,

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713

  parent reply	other threads:[~2007-07-11  2:18 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-01  5:01 David Daney
2007-07-01  5:05 ` [Patch] 2/3 MIPS support for " David Daney
2007-07-01 10:56   ` Richard Sandiford
2007-07-05  7:50     ` David Daney
2007-07-05 19:05       ` Richard Sandiford
2007-07-08 20:00         ` David Daney
2007-07-09 19:07           ` Richard Sandiford
2007-07-11  5:45             ` David Daney
2007-07-01  5:11 ` [Patch] 3/3 FFI: Use __builtin_flush_icache() to flush MIPS i-cache David Daney
2007-07-05  8:34   ` David Daney
2007-07-05 19:08     ` Richard Sandiford
2007-07-11 18:55       ` Tom Tromey
2007-07-01  8:01 ` [Patch] 1/3 Add new builtin __builtin_flush_icache() Paolo Bonzini
2007-07-01 17:51   ` Thiemo Seufer
2007-07-01 18:47   ` David Daney
2007-07-02  5:04     ` Paolo Bonzini
2007-07-03 23:55       ` Mark Mitchell
2007-07-04  7:18         ` Paolo Bonzini
2007-07-04 17:17           ` Mark Mitchell
2007-07-04 17:10         ` David Daney
2007-07-04 17:51           ` Mark Mitchell
2007-07-05  7:36             ` David Daney
2007-07-05 17:59               ` Richard Sandiford
2007-07-05 18:23                 ` David Daney
2007-07-05 19:11                   ` Richard Sandiford
2007-07-06  6:07               ` Mark Mitchell
2007-07-06  6:19                 ` David Daney
2007-07-06 16:39                   ` Mark Mitchell
2007-07-08 19:22                     ` David Daney
2007-07-09 19:04                       ` Richard Sandiford
2007-07-11  2:22                       ` Mark Mitchell [this message]
2007-07-11  4:47                         ` David Daney
2007-07-05  9:05 ` [Patch] 4/3 i386 target support for __builtin___clear_cache() David Daney
2007-07-08 20:39   ` David Daney

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=46943DC9.5080409@codesourcery.com \
    --to=mark@codesourcery.com \
    --cc=bonzini@gnu.org \
    --cc=ddaney@avtrex.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rsandifo@nildram.co.uk \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).