Re: [PATCH 4/4] Set function alignment for M7 to 8 bytes.

2017-05-22 Thread Eric Botcazou
> The gcc source tree is as desired, but I may have made
> 2 inadvertent process mistakes:
> * did not send a revised PATCH to gcc-patches

That's OK since only a minor correction was requested.

> * made the 4 changes with 1 commit

That's as expected.

-- 
Eric Botcazou


Re: [PATCH 4/4] Set function alignment for M7 to 8 bytes.

2017-05-19 Thread Sheldon Lobo


On 05/19/2017 02:45 PM, Eric Botcazou wrote:


This 4/4 commit needs to contain gcc/config/sparc/sparc.c, gcc/ChangeLog,
gcc/testsuite/gcc.target/sparc/niagara7-align.c and gcc/testsuite/ChangeLog.

The rule is that you put the ChangeLog entry into the ChangeLog file of the
directory where the change is made, or that of the parent directory if there
is none, recursively.  The filename in that ChangeLog file must be relative to
the directory when the ChangeLog file is.



Thanks, Eric. I did do that when I went ahead with the
'svn commit' yesterday. That is, gcc/ChangeLog and
gcc/testsuite/ChangeLog have the correct information.

The gcc source tree is as desired, but I may have made
2 inadvertent process mistakes:
* did not send a revised PATCH to gcc-patches
* made the 4 changes with 1 commit

Apologies,
Sheldon


Re: [PATCH 4/4] Set function alignment for M7 to 8 bytes.

2017-05-19 Thread Eric Botcazou
> The rule is that you put the ChangeLog entry into the ChangeLog file of the
> directory where the change is made, or that of the parent directory if there
> is none, recursively.  The filename in that ChangeLog file must be relative
> to the directory when the ChangeLog file is.

...where...

-- 
Eric Botcazou


Re: [PATCH 4/4] Set function alignment for M7 to 8 bytes.

2017-05-19 Thread Eric Botcazou
> Just so I am clear, gcc/testsuite/ChangeLog needs to be
> checked into the patch (but gcc/ChangeLog is not)?

This 4/4 commit needs to contain gcc/config/sparc/sparc.c, gcc/ChangeLog, 
gcc/testsuite/gcc.target/sparc/niagara7-align.c and gcc/testsuite/ChangeLog.

The rule is that you put the ChangeLog entry into the ChangeLog file of the 
directory where the change is made, or that of the parent directory if there 
is none, recursively.  The filename in that ChangeLog file must be relative to 
the directory when the ChangeLog file is.

-- 
Eric Botcazou


Re: [PATCH 4/4] Set function alignment for M7 to 8 bytes.

2017-05-17 Thread Sheldon Lobo


On 05/17/2017 04:11 PM, Eric Botcazou wrote:

* config/sparc/sparc.c (sparc_option_override): Set function
alignment for -mcpu=niagara7 to 64 to match the I$ line.
* testsuite/gcc.target/sparc/niagara7-align.c: Test case with
-mcpu=niagara7 -falign-functions.


The testsuite directory has its own ChangeLog file so the second item must go
there without the testsuite/ prefix (and "New test" is enough in this case):

* gcc.target/sparc/niagara7-align.c: New test.



Thanks for the feedback!

Just so I am clear, gcc/testsuite/ChangeLog needs to be
checked into the patch (but gcc/ChangeLog is not)?

Sorry for the newbie question,
Sheldon


Re: [PATCH 4/4] Set function alignment for M7 to 8 bytes.

2017-05-17 Thread Eric Botcazou
>   * config/sparc/sparc.c (sparc_option_override): Set function
>   alignment for -mcpu=niagara7 to 64 to match the I$ line.
>   * testsuite/gcc.target/sparc/niagara7-align.c: Test case with
>   -mcpu=niagara7 -falign-functions.

The testsuite directory has its own ChangeLog file so the second item must go 
there without the testsuite/ prefix (and "New test" is enough in this case):

* gcc.target/sparc/niagara7-align.c: New test.

-- 
Eric Botcazou


[PATCH 4/4] Set function alignment for M7 to 8 bytes.

2017-05-17 Thread Sheldon Lobo
* config/sparc/sparc.c (sparc_option_override): Set function
alignment for -mcpu=niagara7 to 64 to match the I$ line.
* testsuite/gcc.target/sparc/niagara7-align.c: Test case with
-mcpu=niagara7 -falign-functions.
---
 gcc/config/sparc/sparc.c|   13 -
 gcc/testsuite/gcc.target/sparc/niagara7-align.c |4 
 2 files changed, 12 insertions(+), 5 deletions(-)
 create mode 100644 gcc/testsuite/gcc.target/sparc/niagara7-align.c

diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index 8277496..6dfb269 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -1528,15 +1528,18 @@ sparc_option_override (void)
 target_flags |= MASK_LRA;
 
   /* Supply a default value for align_functions.  */
-  if (align_functions == 0
-  && (sparc_cpu == PROCESSOR_ULTRASPARC
+  if (align_functions == 0)
+{
+  if (sparc_cpu == PROCESSOR_ULTRASPARC
  || sparc_cpu == PROCESSOR_ULTRASPARC3
  || sparc_cpu == PROCESSOR_NIAGARA
  || sparc_cpu == PROCESSOR_NIAGARA2
  || sparc_cpu == PROCESSOR_NIAGARA3
- || sparc_cpu == PROCESSOR_NIAGARA4
- || sparc_cpu == PROCESSOR_NIAGARA7))
-align_functions = 32;
+ || sparc_cpu == PROCESSOR_NIAGARA4)
+   align_functions = 32;
+  else if (sparc_cpu == PROCESSOR_NIAGARA7)
+   align_functions = 64;
+}
 
   /* Validate PCC_STRUCT_RETURN.  */
   if (flag_pcc_struct_return == DEFAULT_PCC_STRUCT_RETURN)
diff --git a/gcc/testsuite/gcc.target/sparc/niagara7-align.c 
b/gcc/testsuite/gcc.target/sparc/niagara7-align.c
new file mode 100644
index 000..a46aac1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sparc/niagara7-align.c
@@ -0,0 +1,4 @@
+/* { dg-do compile } */
+/* { dg-options "-falign-functions -mcpu=niagara7" } */
+/* { dg-final { scan-assembler "\.align 64" } } */
+void foo(void) {}
-- 
1.7.1