This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [wwwdocs] SH 4.8 changes update


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
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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]