This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/81863] [7 regression] -mword-relocations is unreliable
- From: "yroux at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 21 Aug 2017 07:47:20 +0000
- Subject: [Bug target/81863] [7 regression] -mword-relocations is unreliable
- Auto-submitted: auto-generated
- References: <bug-81863-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81863
--- Comment #8 from Yvan Roux <yroux at gcc dot gnu.org> ---
On 7 branch the following should fix the issue, but as I mentioned in comment
#5, maybe TARGET_USE_MOVT is a better place to do the checking but this will
need some
s/TARGET_HAVE_MOVT/TARGET_USE_MOVT/
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -272,7 +272,8 @@ extern tree arm_fp16_type_node;
&& arm_arch_notm)
/* Nonzero if this chip provides the MOVW and MOVT instructions. */
-#define TARGET_HAVE_MOVT (arm_arch_thumb2 || arm_arch8)
+#define TARGET_HAVE_MOVT ((arm_arch_thumb2 || arm_arch8) \
+ && !target_word_relocations)
/* Nonzero if this chip provides the CBZ and CBNZ instructions. */
#define TARGET_HAVE_CBZ (arm_arch_thumb2 || arm_arch8)