[PATCH] arm: Ignore --with-mode when CPU only supports one instruction set.
Richard Earnshaw (lists)
Richard.Earnshaw@arm.com
Wed Mar 3 14:13:33 GMT 2021
On 03/03/2021 14:11, Christophe Lyon via Gcc-patches wrote:
> On Wed, 3 Mar 2021 at 14:55, Richard Earnshaw (lists)
> <Richard.Earnshaw@arm.com> wrote:
>>
>> Hopefully this change will reduce the number of times Christophe is
>> needing to tweak the testsuite.
>>
>
> Thanks!
>
> I guess this means we can now do some cleanup in the testsuite?
> Did you have a quick look at the amount of tests involved?
>
No, I wasn't expecting to change the existing tests again where you've
already done this. But hopefully you won't need to do any more changes
for this reason in future.
R.
> Christophe
>
>> --------------
>>
>> Arm processors can support up to two instruction sets. Some early
>> cores only support the traditional A32 (Arm) instructions, while some
>> more recent devices only support T32 (Thumb) instructions.
>>
>> When configuring the compiler, --with-mode can be used to select the
>> default instruction set to target if the user has not made an explicit
>> choice, but this can cause needless problems if the default is not
>> supported by the requested CPU.
>>
>> To fix this this patch adjusts the way that the --with-mode selection
>> is processed so that it can take into account the selected CPU or
>> architecture and not create a meaningless combination.
>>
>> gcc:
>> * common/config/arm/arm-common.c: Include configargs.h.
>> (arm_config_default): New function.
>> (arm_target_mode): Renamed from arm_target_thumb_only. Handle
>> processors that do not support Thumb. Take into account the
>> --with-mode configuration setting for selecting the default.
>> * config/arm/arm.h (OPTION_DEFAULT_SPECS): Remove entry for 'mode'.
>> (TARGET_MODE_SPEC_FUNCTIONS): Update for function name change.
>> ---
>> gcc/common/config/arm/arm-common.c | 49 ++++++++++++++++++++++++++----
>> gcc/config/arm/arm.h | 10 +++---
>> 2 files changed, 49 insertions(+), 10 deletions(-)
>>
>>
More information about the Gcc-patches
mailing list