aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Krebbel <krebbel@linux.vnet.ibm.com>2017-01-31 09:14:36 +0000
committerAndreas Krebbel <krebbel@gcc.gnu.org>2017-01-31 09:14:36 +0000
commit4727e06bb7c047a10aa502c829b7e4b519d8082b (patch)
tree7be2a2a3b6a960a51ffc949be4a84ad962351659
parentb6dae84928a112b2f176ad168d8c5b7e0ecdd5cb (diff)
downloadgcc-4727e06bb7c047a10aa502c829b7e4b519d8082b.zip
gcc-4727e06bb7c047a10aa502c829b7e4b519d8082b.tar.gz
gcc-4727e06bb7c047a10aa502c829b7e4b519d8082b.tar.bz2
S/390: Rename __S390_ARCH_LEVEL__ to __ARCH__.
We have recently added the predefined macro __S390_ARCH_LEVEL__ to expand to a numerical value representing the architecture document level currently in use. However, the IBM XL compiler already has a macro named __ARCH__ for that purpose. So we change our macro to that in order to improve portability. gcc/ChangeLog: 2017-01-31 Andreas Krebbel <krebbel@linux.vnet.ibm.com> * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Rename __S390_ARCH_LEVEL__ to __ARCH__. gcc/testsuite/ChangeLog: 2017-01-31 Andreas Krebbel <krebbel@linux.vnet.ibm.com> * gcc.target/s390/s390.exp: Rename __S390_ARCH_LEVEL__ to __ARCH__. From-SVN: r245055
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/s390/s390-c.c4
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.target/s390/s390.exp14
4 files changed, 19 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8916373..ac133d4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2017-01-31 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
+
+ * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Rename
+ __S390_ARCH_LEVEL__ to __ARCH__.
+
2017-01-31 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/79267
diff --git a/gcc/config/s390/s390-c.c b/gcc/config/s390/s390-c.c
index bf84269..8f184ea 100644
--- a/gcc/config/s390/s390-c.c
+++ b/gcc/config/s390/s390-c.c
@@ -340,8 +340,8 @@ s390_cpu_cpp_builtins_internal (cpp_reader *pfile,
arch_level--;
/* Review when a new arch is added and increase the value. */
char dummy[23 - 2 * PROCESSOR_max] __attribute__((unused));
- sprintf (macro_def, "__S390_ARCH_LEVEL__=%d", arch_level);
- cpp_undef (pfile, "__S390_ARCH_LEVEL__");
+ sprintf (macro_def, "__ARCH__=%d", arch_level);
+ cpp_undef (pfile, "__ARCH__");
cpp_define (pfile, macro_def);
}
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 96b25d6..ca79200 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2017-01-31 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
+
+ * gcc.target/s390/s390.exp: Rename __S390_ARCH_LEVEL__ to
+ __ARCH__.
+
2017-01-31 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/79267
diff --git a/gcc/testsuite/gcc.target/s390/s390.exp b/gcc/testsuite/gcc.target/s390/s390.exp
index c74d659..107ba98 100644
--- a/gcc/testsuite/gcc.target/s390/s390.exp
+++ b/gcc/testsuite/gcc.target/s390/s390.exp
@@ -100,19 +100,19 @@ proc check_effective_target_s390_useable_hw { } {
int main (void)
{
asm (".machinemode zarch" : : );
- #if __S390_ARCH_LEVEL__ >= 11
+ #if __ARCH__ >= 11
asm ("lcbb %%r2,0(%%r15),0" : : );
- #elif __S390_ARCH_LEVEL__ >= 10
+ #elif __ARCH__ >= 10
asm ("risbgn %%r2,%%r2,0,0,0" : : );
- #elif __S390_ARCH_LEVEL__ >= 9
+ #elif __ARCH__ >= 9
asm ("sgrk %%r2,%%r2,%%r2" : : );
- #elif __S390_ARCH_LEVEL__ >= 8
+ #elif __ARCH__ >= 8
asm ("rosbg %%r2,%%r2,0,0,0" : : );
- #elif __S390_ARCH_LEVEL__ >= 7
+ #elif __ARCH__ >= 7
asm ("nilf %%r2,0" : : );
- #elif __S390_ARCH_LEVEL__ >= 6
+ #elif __ARCH__ >= 6
asm ("lay %%r2,0(%%r15)" : : );
- #elif __S390_ARCH_LEVEL__ >= 5
+ #elif __ARCH__ >= 5
asm ("tam" : : );
#endif
#ifdef __HTM__