Re: [wwwdocs] SH 4.8 changes update

2012-10-06 Thread Oleg Endo
On Sat, 2012-10-06 at 17:57 +0200, Gerald Pfeifer wrote:
> Hi Oleg,
> 
> have you considered also documenting the new __builtin_thread_pointer
> and __builtin_set_thread_pointer built-ins?  (I just noticed this by
> chance.)

Yes, sure.  The documentation and www changes updates will follow soon.

> 
> On Thu, 4 Oct 2012, Oleg Endo wrote:
> > The atomic options of SH have been changed recently.  The attached patch 
> > updates the 4.8 changes.html accordingly, plus some minor wording fixes.
> 
> Looking at the list of parameters to -matomic-model=, it appears
> that a definition list () is better suitable than a regular
> list, so I went ahead and made the change below.
> 

Thanks!  Looks way better now.

Cheers,
Oleg



Re: [wwwdocs] SH 4.8 changes update

2012-10-06 Thread Gerald Pfeifer
Hi Oleg,

have you considered also documenting the new __builtin_thread_pointer
and __builtin_set_thread_pointer built-ins?  (I just noticed this by
chance.)

On Thu, 4 Oct 2012, Oleg Endo wrote:
> The atomic options of SH have been changed recently.  The attached patch 
> updates the 4.8 changes.html accordingly, plus some minor wording fixes.

Looking at the list of parameters to -matomic-model=, it appears
that a definition list () is better suitable than a regular
list, so I went ahead and made the change below.

Gerald

Index: changes.html
===
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.8/changes.html,v
retrieving revision 1.37
diff -u -3 -p -r1.37 changes.html
--- changes.html5 Oct 2012 19:30:26 -   1.37
+++ changes.html6 Oct 2012 15:32:05 -
@@ -258,30 +258,30 @@ by this change.
   A new option -matomic-model=model selects the
   model for the generated atomic sequences.  The following models are
   supported:
-  
-soft-gusa
+  
+soft-gusa
 Software gUSA sequences (SH3* and SH4* only).  On SH4A targets this
 will now also partially utilize the movco.l and
 movli.l instructions.  This is the default when the target
-is sh3*-*-linux* or sh4*-*-linux*.
+is sh3*-*-linux* or sh4*-*-linux*.
 
-hard-llcs
+hard-llcs
 Hardware movco.l / movli.l sequences
-(SH4A only).
+(SH4A only).
 
-soft-tcb
-Software thread control block sequences.
+soft-tcb
+Software thread control block sequences.
 
-soft-imask
-Software interrupt flipping sequences (privileged mode only).  This is
-the default when the target is sh1*-*-linux* or
-sh2*-*-linux*.
+soft-imask
+Software interrupt flipping sequences (privileged mode only).  This
+is the default when the target is sh1*-*-linux* or
+sh2*-*-linux*.
 
-none
+none
 Generates function calls to the respective __atomic
-built-in functions.  This is the default for SH64 targets or when the
-target is not sh*-*-linux*.
-  
+built-in functions.  This is the default for SH64 targets or when
+the target is not sh*-*-linux*.
+  
 
   The option -msoft-atomic has been deprecated.  It is
   now an alias for -matomic-model=soft-gusa.


Re: [wwwdocs] SH 4.8 changes update

2012-10-05 Thread Oleg Endo
After commiting the last SH changes updates for 4.8 I was kindly
informed that the br tags were left open.  I've committed the attached
fix as obvious.

Cheers,
Oleg
? www_4_8_sh_changes_2_close_br.patch
Index: htdocs/gcc-4.8/changes.html
===
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.8/changes.html,v
retrieving revision 1.36
diff -u -r1.36 changes.html
--- htdocs/gcc-4.8/changes.html	5 Oct 2012 19:21:00 -	1.36
+++ htdocs/gcc-4.8/changes.html	5 Oct 2012 19:28:48 -
@@ -259,25 +259,25 @@
   model for the generated atomic sequences.  The following models are
   supported:
   
-soft-gusa
+soft-gusa
 Software gUSA sequences (SH3* and SH4* only).  On SH4A targets this
 will now also partially utilize the movco.l and
 movli.l instructions.  This is the default when the target
 is sh3*-*-linux* or sh4*-*-linux*.
 
-hard-llcs
+hard-llcs
 Hardware movco.l / movli.l sequences
 (SH4A only).
 
-soft-tcb
+soft-tcb
 Software thread control block sequences.
 
-soft-imask
+soft-imask
 Software interrupt flipping sequences (privileged mode only).  This is
 the default when the target is sh1*-*-linux* or
 sh2*-*-linux*.
 
-none
+none
 Generates function calls to the respective __atomic
 built-in functions.  This is the default for SH64 targets or when the
 target is not sh*-*-linux*.


Re: [wwwdocs] SH 4.8 changes update

2012-10-05 Thread Kaz Kojima
Oleg Endo  wrote:
> The atomic options of SH have been changed recently.  The attached patch
> updates the 4.8 changes.html accordingly, plus some minor wording fixes.
> 
> OK?

OK.

Regards,
kaz


[wwwdocs] SH 4.8 changes update

2012-10-04 Thread Oleg Endo
Hello,

The atomic options of SH have been changed recently.  The attached patch
updates the 4.8 changes.html accordingly, plus some minor wording fixes.

OK?

Cheers,
Oleg
? www_4_8_sh_changes_2.patch
Index: htdocs/gcc-4.8/changes.html
===
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.8/changes.html,v
retrieving revision 1.35
diff -u -r1.35 changes.html
--- htdocs/gcc-4.8/changes.html	3 Oct 2012 22:33:46 -	1.35
+++ htdocs/gcc-4.8/changes.html	4 Oct 2012 21:47:18 -
@@ -255,19 +255,45 @@
 
 Improved support for the __atomic built-in functions:
 
-  Minor improvements to code generated for software atomic sequences
-  that are enabled by -msoft-atomic.
+  A new option -matomic-model=model selects the
+  model for the generated atomic sequences.  The following models are
+  supported:
+  
+soft-gusa
+Software gUSA sequences (SH3* and SH4* only).  On SH4A targets this
+will now also partially utilize the movco.l and
+movli.l instructions.  This is the default when the target
+is sh3*-*-linux* or sh4*-*-linux*.
+
+hard-llcs
+Hardware movco.l / movli.l sequences
+(SH4A only).
+
+soft-tcb
+Software thread control block sequences.
+
+soft-imask
+Software interrupt flipping sequences (privileged mode only).  This is
+the default when the target is sh1*-*-linux* or
+sh2*-*-linux*.
+
+none
+Generates function calls to the respective __atomic
+built-in functions.  This is the default for SH64 targets or when the
+target is not sh*-*-linux*.
+  
+
+  The option -msoft-atomic has been deprecated.  It is
+  now an alias for -matomic-model=soft-gusa.
 
   A new option -mtas makes the compiler generate
   the tas.b instruction for the
-  __atomic_test_and_set built-in function.
+  __atomic_test_and_set built-in function regardless of the
+  selected atomic model.
+
+  The __sync functions in libgcc now reflect
+  the selected atomic model when building the toolchain.
 
-  The SH4A instructions movco.l and
-  movli.l are now supported.  They are used to implement some
-  software atomic sequences that are enabled by -msoft-atomic.
-  In addition to that, pure movco.l / movli.l
-  atomic sequences can be enabled with the new option
-  -mhard-atomic.
 
 
 Added support for the mov.b and mov.w
@@ -280,11 +306,11 @@
 
 Improvements to conditional branches and code that involves the T bit.
 A new option -mzdcbranch tells the compiler to favor
-zero-displacement branches.  This is enabled by default for SH4 and
-SH4A.
+zero-displacement branches.  This is enabled by default for SH4* targets.
+
 
 The pref instruction will now be emitted by the
-__builtin_prefetch built-in function for SH3.
+__builtin_prefetch built-in function for SH3* targets.
 
 The fmac instruction will now be emitted by the
 fmaf standard function and the __builtin_fmaf
@@ -298,7 +324,7 @@
 
 Added new options -mfsrra and -mfsca to allow
 the compiler using the fsrra and fsca
-instructions on CPUs other than SH4A (where they are already enabled by
+instructions on targets other than SH4A (where they are already enabled by
 default).
 
 Added support for the __builtin_bswap32 built-in function.


Re: [wwwdocs] SH 4.8 changes update

2012-09-02 Thread Gerald Pfeifer
On Wed, 29 Aug 2012, Oleg Endo wrote:
> The new SH option -menable-tas has been renamed to -mtas in rev 190782.
> I have committed the attached patch to reflect this in the changes.html
> for 4.8.

Thanks for thinking of this.  In line with changes Sandra made
recently, I replaced future tense as follows (which also wraps
some long lines).

Gerald

Index: changes.html
===
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.8/changes.html,v
retrieving revision 1.25
diff -u -3 -p -r1.25 changes.html
--- changes.html2 Sep 2012 14:36:54 -   1.25
+++ changes.html2 Sep 2012 15:54:45 -
@@ -232,9 +232,9 @@ by this change.
   Minor improvements to code generated for software atomic sequences
   that are enabled by -msoft-atomic.
 
-  A new option -mtas will make the compiler generate the
-  tas.b instruction for the __atomic_test_and_set
-  built-in function.
+  A new option -mtas makes the compiler generate
+  the tas.b instruction for the
+  __atomic_test_and_set built-in function.
 
   The SH4A instructions movco.l and
   movli.l are now supported.  They are used to implement some


[wwwdocs] SH 4.8 changes update

2012-08-29 Thread Oleg Endo
Hello,

The new SH option -menable-tas has been renamed to -mtas in rev 190782.
I have committed the attached patch to reflect this in the changes.html
for 4.8.

Cheers,
Oleg
? sh_mtas_rename.patch
Index: htdocs/gcc-4.8/changes.html
===
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.8/changes.html,v
retrieving revision 1.23
diff -u -r1.23 changes.html
--- htdocs/gcc-4.8/changes.html	26 Aug 2012 21:48:50 -	1.23
+++ htdocs/gcc-4.8/changes.html	29 Aug 2012 19:21:06 -
@@ -232,9 +232,9 @@
   Minor improvements to code generated for software atomic sequences
   that are enabled by -msoft-atomic.
 
-  A new option -menable-tas will make the compiler
-  generate the tas.b instruction for the
-  __atomic_test_and_set built-in function.
+  A new option -mtas will make the compiler generate the
+  tas.b instruction for the __atomic_test_and_set
+  built-in function.
 
   The SH4A instructions movco.l and
   movli.l are now supported.  They are used to implement some
@@ -281,9 +281,9 @@
 
 The behavior of the -mieee option has been fixed and the
 negative form -mno-ieee has been added to control the IEEE
-conformance of floating point comparisons.  By default-mieee is
-now enabled and the option -ffinite-math-only implicitly sets
--mno-ieee.
+conformance of floating point comparisons.  By default -mieee
+is now enabled and the option -ffinite-math-only implicitly
+sets -mno-ieee.
 
   
 


Re: [wwwdocs] SH 4.8 changes update

2012-08-20 Thread Richard Guenther
On Mon, Aug 20, 2012 at 1:37 AM, Oleg Endo  wrote:
> On Sun, 2012-08-19 at 21:43 +0200, Gerald Pfeifer wrote:
>> On Sun, 19 Aug 2012, Oleg Endo wrote:
>> > Thanks.  Let's hope that I can squeeze in some more stuff while
>> > stage 1 lasts. :T
>>
>> You know that for backend-specific changes (especially for "smaller"
>> ports) you actually have some more leeway?
>
> You mean, since SH is neither a primary nor a secondary platform, there
> are no particular release criteria for it?  What does that actually
> mean?

It means that release managers do not care about the state of the SH port.
It means SH target maintainers have to watch how the release goes and
decide when to put effort into testing and fixing bugs themselves, otherwise
they may run into the situation that the SH port does not even build for
the release.  So kind of target maintainers for ports that are not primary
or secondary are their own release managers without any control over
release timing.

Richard.


Re: [wwwdocs] SH 4.8 changes update

2012-08-20 Thread Gerald Pfeifer
On Mon, 20 Aug 2012, Oleg Endo wrote:
> You mean, since SH is neither a primary nor a secondary platform,
> there are no particular release criteria for it?  What does that
> actually mean?

>From what I recall, you can make stage 1 type changes even after
stage 1.  However, if your port is broken, the release managers
will shrug their shoulders and release even if your port is quite
broken due to that.


Related to your web page update, I just comitted the patch below
which allows for direct linking to the SH entry.

Gerald


Index: changes.html
===
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.8/changes.html,v
retrieving revision 1.16
diff -u -3 -p -r1.16 changes.html
--- changes.html20 Aug 2012 11:02:28 -  1.16
+++ changes.html20 Aug 2012 12:22:52 -
@@ -159,7 +159,7 @@ by this change.
 options to the assembler.
   
 
-SH
+SH
   
 The default alignment settings have been reduced to be less aggressive.
 This results in more compact code for optimization levels other than


Re: [wwwdocs] SH 4.8 changes update

2012-08-19 Thread Oleg Endo
On Sun, 2012-08-19 at 21:43 +0200, Gerald Pfeifer wrote:
> On Sun, 19 Aug 2012, Oleg Endo wrote:
> > Thanks.  Let's hope that I can squeeze in some more stuff while
> > stage 1 lasts. :T
> 
> You know that for backend-specific changes (especially for "smaller"
> ports) you actually have some more leeway?

You mean, since SH is neither a primary nor a secondary platform, there
are no particular release criteria for it?  What does that actually
mean?

> > 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.
> 
> Now still would be time to do so without worrying about compatibility. ;-)

True.

Cheers,
Oleg



Re: [wwwdocs] SH 4.8 changes update

2012-08-19 Thread Gerald Pfeifer
On Sun, 19 Aug 2012, Oleg Endo wrote:
> Thanks.  Let's hope that I can squeeze in some more stuff while
> stage 1 lasts. :T

You know that for backend-specific changes (especially for "smaller"
ports) you actually have some more leeway?

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

Now still would be time to do so without worrying about compatibility. ;-)

> OK to install?

Oh, yes.  Thanks!

Gerald


Re: [wwwdocs] SH 4.8 changes update

2012-08-19 Thread Oleg Endo
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
> ===
> +The default alignment settings have been reduced to be less 
> aggresive.
> 
> "aggressive"

Fixed.

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

Rephrased.

> +  A new option -menable-tas will make the compiler
> +  generate the tas.b instruction for the
> +  __atomic_test_and_set built-in function.
> 
> 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.

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

Clarified.

> 
> +The -mfused-madd option has been depricated in favor of
> 
> "deprecated"

Fixed.

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


Re: [wwwdocs] SH 4.8 changes update

2012-08-19 Thread Gerald Pfeifer
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)!

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

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

"aggressive"

+  Minor tweaks for code around software atomic sequences that are
+  enabled by -msoft-atomic.

"code for"?  Not sure...

+  A new option -menable-tas will make the compiler
+  generate the tas.b instruction for the
+  __atomic_test_and_set built-in function.

A naive question: Why is this not on by default?  Or is it under
certain circumstances?

+The fmac instruction will now be emitted by the
+fmaf standard and built-in function.

"built-in standard function", perhaps?

+The -mfused-madd option has been depricated in favor of

"deprecated"

+Added new options -mfsrra and -mfsca to allow
+the compiler using the fsrra and fsca
+instructions on CPUs other than SH4A.

How about adding "...SH4A (where they are already on by default)" or
similar?

Gerald


Re: [wwwdocs] SH 4.8 changes update

2012-08-18 Thread Kaz Kojima
Oleg Endo  wrote:
> This is what has been done so far on the SH side for 4.8.
> I hope it's OK.

Looks fine to me.

Regards,
kaz


[wwwdocs] SH 4.8 changes update

2012-08-18 Thread Oleg Endo
Hello,

This is what has been done so far on the SH side for 4.8.
I hope it's OK.

Cheers,
Oleg
Index: htdocs/gcc-4.8/changes.html
===
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.8/changes.html,v
retrieving revision 1.10
diff -u -r1.10 changes.html
--- htdocs/gcc-4.8/changes.html	10 Aug 2012 16:25:46 -	1.10
+++ htdocs/gcc-4.8/changes.html	19 Aug 2012 00:41:33 -
@@ -100,6 +100,70 @@
 options to the assembler.
   
 
+SH
+  
+The default alignment settings have been reduced to be less aggresive.
+This results in more compact code for optimization levels other than
+-Os.
+
+Improved support for the __atomic built-in functions:
+
+  Minor tweaks for code around software atomic sequences that are
+  enabled by -msoft-atomic.
+
+  A new option -menable-tas will make the compiler
+  generate the tas.b instruction for the
+  __atomic_test_and_set built-in function.
+
+  The SH4A instructions movco.l and
+  movli.l are now supported.  They are used to implement some
+  software atomic sequences that are enabled by -msoft-atomic.
+  In addition to that, pure movco.l / movli.l
+  atomic sequences can be enabled with the new option
+  -mhard-atomic.
+
+
+Added support for the mov.b and mov.w
+instructions with displacement addressing.
+
+Added support for the SH2A instructions movu.b and
+movu.w.
+
+Various improvements to code generated for integer arithmetic.
+
+Improvements to conditional branches and code that involves the T bit.
+A new option -mzdcbranch tells the compiler to favor
+zero-displacement branches.  This is enabled by default for SH4 and
+SH4A.
+
+The pref instruction will now be emitted by the
+__builtin_prefetch built-in function for SH3.
+
+The fmac instruction will now be emitted by the
+fmaf standard and built-in function.
+
+The -mfused-madd option has been depricated in favor of
+the machine-independent -ffp-contract option.  Notice that the
+fmac instruction will now be generated by default for
+expressions like a * b + c.  This is due to the compiler
+default setting -ffp-contract=fast.
+
+Added new options -mfsrra and -mfsca to allow
+the compiler using the fsrra and fsca
+instructions on CPUs other than SH4A.
+
+Added support for the __builtin_bswap32 built-in function.
+It is now expanded as a sequence of swap.b and
+swap.w instructions instead of a library function call.
+
+The behavior of the -mieee option has been fixed and the
+negative form -mno-ieee has been added to control the IEEE
+conformance of floating point comparisons.  By default-mieee is
+now enabled and the option -ffinite-math-only implicitly sets
+-mno-ieee.
+
+  
+