thumbv7 build errors "requires arm-mode"

After a recent upstream pull, my builds for ARM thumbv7 suddenly fail
with messages like:

error: instruction requires: arm-mode
21 uxtah r6, r0, r6

I use llc with -mtriple=thumbv7-unknown-unknown and llvm-mc with
-triple=thumbv7-unknown-unkown.

What's the right way to generate thumbv7 binaries?

Thanks,
-steve

Hi Steve,

After a recent upstream pull, my builds for ARM thumbv7 suddenly fail
with messages like:

error: instruction requires: arm-mode
21 uxtah r6, r0, r6

I use llc with -mtriple=thumbv7-unknown-unknown and llvm-mc with
-triple=thumbv7-unknown-unkown.

What's the right way to generate thumbv7 binaries?

We recently refactored how the triple generated a default CPU, and it
seems support for uxtah was dropped from thumbv7. I suspect it's a
bug, but I'll check with Bradley if it was intentional.

Meanwhile, it should work again if you specify a CPU directly (e.g.
-mcpu=cortex-a15 ought to support all the nice v7 bits).

Cheers.

Tim.

Hi Tim, thanks for helping out. For the record, what worked for me
was "clang --target=armv7m" and "llvm-mc -triple=armv7m". I didn't
realize until today, but llc doesn't need an explicit command line
target since the .ll file provides that information
Thanks,
-steve