aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIlya Leoshkevich <iii@linux.ibm.com>2020-11-10 18:26:04 +0100
committerIlya Leoshkevich <iii@linux.ibm.com>2020-11-11 01:00:32 +0100
commit778087e0f54285de1eec5c3bf3657392779b52bf (patch)
tree3c7eac37cda1990f80b0bf7bea0185446b69d5a8 /gcc
parent5dfbc52264fc64db22e75f385be9efae3d0eba46 (diff)
downloadgcc-778087e0f54285de1eec5c3bf3657392779b52bf.zip
gcc-778087e0f54285de1eec5c3bf3657392779b52bf.tar.gz
gcc-778087e0f54285de1eec5c3bf3657392779b52bf.tar.bz2
IBM Z: Fix bootstrap breakage due to HAVE_TF macro
Commit e627cda56865 ("IBM Z: Store long doubles in vector registers when possible") introduced HAVE_TF macro which expands to a logical "or" of HAVE_ constants. Not all of these constants are available in GENERATOR_FILE context, so a hack was used: simply expand to true in this case, because the actual value matters only during compiler runtime and not during generation. However, one aspect of this value matters during generation after all: whether or not it's a constant, which in this case it appears to be. This results in incorrect values in insn-flags.h and broken bootstrap for some configurations. Fix by using a dummy value that is not a constant. gcc/ChangeLog: 2020-11-10 Ilya Leoshkevich <iii@linux.ibm.com> * config/s390/s390.h (HAVE_TF): Use opaque value when GENERATOR_FILE is defined.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/s390/s390.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/config/s390/s390.h b/gcc/config/s390/s390.h
index 8c02831..bc579a3 100644
--- a/gcc/config/s390/s390.h
+++ b/gcc/config/s390/s390.h
@@ -1187,8 +1187,9 @@ struct GTY(()) machine_function
#define TARGET_INDIRECT_BRANCH_TABLE s390_indirect_branch_table
#ifdef GENERATOR_FILE
-/* gencondmd.c is built before insn-flags.h. */
-#define HAVE_TF(icode) true
+/* gencondmd.c is built before insn-flags.h. Use an arbitrary opaque value
+ that cannot be optimized away by gen_insn. */
+#define HAVE_TF(icode) TARGET_HARD_FLOAT
#else
#define HAVE_TF(icode) (HAVE_##icode##_fpr || HAVE_##icode##_vr)
#endif