This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH]gold: Fix missing armv8 from may_use_v5t_interworking()
- From: "Tiancong Wang via binutils" <binutils at sourceware dot org>
- To: binutils at sourceware dot org
- Date: Wed, 17 Jul 2019 10:40:38 -0700
- Subject: [PATCH]gold: Fix missing armv8 from may_use_v5t_interworking()
- Reply-to: Tiancong Wang <tcwang at google dot com>
Hello,
As reported in the bug
https://sourceware.org/bugzilla/show_bug.cgi?id=24642, in arm.cc the
code that permits v5t interworking instructions is missing a case for
TAG_CPU_ARCH_V8 and the various V8_M mainline and baseline. This
results in less efficient code in armv8 cpus to use v4t stubs. This
patch is an effort to fix it and change the condition to allow any cpu
architectures above armv7.
----------------------
diff --git a/gold/arm.cc b/gold/arm.cc
index 55b8d31368..8258ca5c9e 100644
--- a/gold/arm.cc
+++ b/gold/arm.cc
@@ -2216,10 +2216,8 @@ class Target_arm : public Sized_target<32, big_endian>
int arch = attr->int_value();
if (parameters->options().fix_arm1176())
return (arch == elfcpp::TAG_CPU_ARCH_V6T2
- || arch == elfcpp::TAG_CPU_ARCH_V7
- || arch == elfcpp::TAG_CPU_ARCH_V6_M
- || arch == elfcpp::TAG_CPU_ARCH_V6S_M
- || arch == elfcpp::TAG_CPU_ARCH_V7E_M);
+ || (arch >= elfcpp::TAG_CPU_ARCH_V7
+ && arch <= elfcpp::MAX_TAG_CPU_ARCH));
else
return (arch != elfcpp::TAG_CPU_ARCH_PRE_V4
&& arch != elfcpp::TAG_CPU_ARCH_V4