public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Oleg Endo <oleg.endo@t-online.de>
To: Gerald Pfeifer <gerald@pfeifer.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [wwwdocs] SH 4.8 changes update
Date: Sun, 19 Aug 2012 18:09:00 -0000	[thread overview]
Message-ID: <1345399738.2268.20.camel@yam-132-YW-E178-FTW> (raw)
In-Reply-To: <alpine.LNX.2.00.1208191912410.2774@ghan.fvgr>

[-- Attachment #1: Type: text/plain, Size: 2401 bytes --]

On Sun, 2012-08-19 at 19:20 +0200, Gerald Pfeifer wrote:
> On Sun, 19 Aug 2012, Oleg Endo wrote:
> > This is what has been done so far on the SH side for 4.8.
> > I hope it's OK.
> 
> Wow, that is quite impressive (and a nice write-up also)!

Thanks.  Let's hope that I can squeeze in some more stuff while stage 1
lasts. :T

> I see this was already approved, but allow me to suggest some
> minor editorial comments...

Thanks for those!  Since I've just committed the thing as it was, please
find the correcting patch in the attachments.

> 
> Index: htdocs/gcc-4.8/changes.html
> ===================================================================
> +    <li>The default alignment settings have been reduced to be less aggresive.
> 
> "aggressive"

Fixed.

> +      <li>Minor tweaks for code around software atomic sequences that are
> +      enabled by <code>-msoft-atomic</code>.</li>
> 
> "code for"?  Not sure...

Rephrased.

> +      <li>A new option <code>-menable-tas</code> will make the compiler
> +      generate the <code>tas.b</code> instruction for the
> +      <code>__atomic_test_and_set</code> built-in function.</li>
> 
> A naive question: Why is this not on by default?  Or is it under
> certain circumstances?

SH's tas.b insn can potentially confuse caches under certain HW
configurations and result in data corruption.  Moreover, it flushes the
operand cache line for the variable in question and then does its thing.
There might be problems when it's used together with other ways of doing
atomics, so maybe it's better not to surprise people by enabling it by
default.
But now that you mention it, maybe it would be better to rename the
'-menable-tas' option to '-mtas', since other instruction related
options do not have 'enabled' in the name.

> +    <li>The <code>fmac</code> instruction will now be emitted by the
> +    <code>fmaf</code> standard and built-in function.</li>
> 
> "built-in standard function", perhaps?

Clarified.

> 
> +    <li>The <code>-mfused-madd</code> option has been depricated in favor of
> 
> "deprecated"

Fixed.

> +    <li>Added new options <code>-mfsrra</code> and <code>-mfsca</code> to allow
> +    the compiler using the <code>fsrra</code> and <code>fsca</code>
> +    instructions on CPUs other than SH4A.</li>
> 
> How about adding "...SH4A (where they are already on by default)" or
> similar?

Added.

OK to install?

Cheers,
Oleg

[-- Attachment #2: www_4_8_sh_changes_1.patch --]
[-- Type: text/x-patch, Size: 2309 bytes --]

Index: htdocs/gcc-4.8/changes.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.8/changes.html,v
retrieving revision 1.14
diff -u -r1.14 changes.html
--- htdocs/gcc-4.8/changes.html	19 Aug 2012 17:16:04 -0000	1.14
+++ htdocs/gcc-4.8/changes.html	19 Aug 2012 18:07:37 -0000
@@ -159,14 +159,14 @@
 
 <h3>SH</h3>
   <ul>
-    <li>The default alignment settings have been reduced to be less aggresive.
+    <li>The default alignment settings have been reduced to be less aggressive.
     This results in more compact code for optimization levels other than
     <code>-Os</code>.</li>
 
     <li>Improved support for the <code>__atomic</code> built-in functions:
     <ul>
-      <li>Minor tweaks for code around software atomic sequences that are
-      enabled by <code>-msoft-atomic</code>.</li>
+      <li>Minor improvements to code generated for software atomic sequences
+      that are enabled by <code>-msoft-atomic</code>.</li>
 
       <li>A new option <code>-menable-tas</code> will make the compiler
       generate the <code>tas.b</code> instruction for the
@@ -197,9 +197,10 @@
     <code>__builtin_prefetch</code> built-in function for SH3.</li>
 
     <li>The <code>fmac</code> instruction will now be emitted by the
-    <code>fmaf</code> standard and built-in function.</li>
+    <code>fmaf</code> standard function and the <code>__builtin_fmaf</code>
+    built-in function.</li>
 
-    <li>The <code>-mfused-madd</code> option has been depricated in favor of
+    <li>The <code>-mfused-madd</code> option has been deprecated in favor of
     the machine-independent <code>-ffp-contract</code> option.  Notice that the
     <code>fmac</code> instruction will now be generated by default for
     expressions like <code>a * b + c</code>.  This is due to the compiler
@@ -207,7 +208,8 @@
 
     <li>Added new options <code>-mfsrra</code> and <code>-mfsca</code> to allow
     the compiler using the <code>fsrra</code> and <code>fsca</code>
-    instructions on CPUs other than SH4A.</li>
+    instructions on CPUs other than SH4A (where they are already enabled by
+    default).</li>
 
     <li>Added support for the <code>__builtin_bswap32</code> built-in function.
     It is now expanded as a sequence of <code>swap.b</code> and

  reply	other threads:[~2012-08-19 18:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-19  0:47 Oleg Endo
2012-08-19  1:36 ` Kaz Kojima
2012-08-19 17:20 ` Gerald Pfeifer
2012-08-19 18:09   ` Oleg Endo [this message]
2012-08-19 19:43     ` Gerald Pfeifer
2012-08-19 23:38       ` Oleg Endo
2012-08-20 12:24         ` Gerald Pfeifer
2012-08-20 12:31         ` Richard Guenther
2012-08-29 19:25 Oleg Endo
2012-09-02 15:57 ` Gerald Pfeifer
2012-10-04 21:52 Oleg Endo
2012-10-05 12:54 ` Kaz Kojima
2012-10-06 15:57 ` Gerald Pfeifer
2012-10-06 16:48   ` Oleg Endo
2012-10-05 19:36 Oleg Endo

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=1345399738.2268.20.camel@yam-132-YW-E178-FTW \
    --to=oleg.endo@t-online.de \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gerald@pfeifer.com \
    /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).