[PATCH] D28985: [Builtin][ARM] Add Thumb1 support for aeabi_c{f,d}cmp.S and dcmp.S
Zhao, Weiming via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 24 16:58:02 PST 2017
Another way is, for pre-v6 arch in Thumb mode, blx to a piece of ARM
code to set PSR. It's not efficient but at least has the benefit to code
size and won't affect current builds as they are in ARM mode.
On 1/24/2017 1:39 PM, Renato Golin wrote:
> On 24 January 2017 at 19:00, Zhao, Weiming via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
>> Hi Renato,
>>
>> MSR PSR, #imm is available in ARM ISA for non-M profile.
>>
>> M-profile is Thumb only, which at least supports MSR APSR, <Rn>
> Weiming,
>
> It's ok to have MSR in ARM code, Thumb 2 code and even ARMv6M code,
> but not in Thumb 1 code, because MSR/MRS are 32-bit instructions.
>
> We had this discussion before on the other patch. You cannot assume
> __ARM_ARCH_ISA_THUMB == ARMv6M, because that will be set for anything
> from ARMv4T to ARMv6, plus ARMv6M and ARMv8M.Base.
>
> Thumb 1 code has to assume Thumb 1 targets, not M targets.
>
> cheers,
> --renato
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
More information about the llvm-commits
mailing list