[PATCH] D28016: [Builtins] [ARM] Adding Thumb1 support for fcmp
Renato Golin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 23 04:20:52 PST 2016
rengolin added a comment.
In https://reviews.llvm.org/D28016#630146, @weimingz wrote:
> I agree with your comments on msr/mrs. It's ugly and may only work for armv6m.
> The nasty thing is I can't find a way to convert "mvn r0, r1, asr #31" to Thumb1 without clobbering the apsr.
>
> Any ideas? Otherwise, I think we have to just use the C version.
I think the problem here is trying to fit a Thumb1 flow around a Thumb2 one. Maybe if we had a completely separate version in pure Thumb1, and the ifdef just chooses it, we could have a cleaner implementation.
The way I do this is to write in C, compile to assembly and then optimise by hand, add comments, nice labels, etc.
Given the number of alternative we could have (T1/T2/ARM vs, soft/hard), it could be better if we had different files with each one and the main file (this one) defines the function alias depending on the defined pre-processor symbols. Though, this change can be on a separate patch, later.
cheers,
--renato
https://reviews.llvm.org/D28016
More information about the llvm-commits
mailing list