[LLVMdev] ARM assembler bug on LLVM 3.5

Renato Golin renato.golin at linaro.org
Mon Sep 22 18:20:01 PDT 2014


On 22 September 2014 17:31, Mikulas Patocka
<mikulas at artax.karlin.mff.cuni.cz> wrote:
> Why is it good?

I encourage you to search this list on the topics of inline assembly
validation, as we already have discussed it extensively. The thread I
sent you was the other side, arguments for the non-validation, as well
as our efforts to sync with the GNU community (which I think was a
good one).

People have different problems with assembly, we're trying to fix the
best way we can, not the fastest, nor the one that works only in one
case. Most importantly, we're trying not to break other things while
we fix this one. Inline assembly is tricky and people tend to only
care about their own niche little hack, which only makes things worse.


> So, I ask again - how can I use the sdiv instruction on ARM cores that
> support it and yet make the program work on ARM cores that don't have
> sdiv? If you think that the program that I posted at the beginning of this
> thread is wrong - please say how to do it correctly.

You cannot do that yet on LLVM, at least not for ARM. This has been
discussed at Linaro Connect and the fix that has gone into the 3.5
release is *not* good.

I have a plan, to implement it in a way that works without .cpu hacks,
by allowing -Wa to work with both integrated and external assemblers,
and it may be that you should change your example a bit (maybe by
moving all A15 code into a separate .S file) or something. Please add
your program to the bug and I'll consider it when I fix it, because
that's more or less what IFUNC does, which *has* to work. You can
subscribe yourself to those bugs and I'll keep you posted.

If you read my .fpu proposal in that bug, and my -Wa,-mfpu proposal on
the other bug, you'll get what I'm trying to do, which I believe will
work on your program. But none of that has anything to do with turning
the inline asm validation off.

cheers,
--renato



More information about the llvm-dev mailing list