Steve King via llvm-dev
2015-Nov-19 16:59 UTC
[llvm-dev] 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
Tim Northover via llvm-dev
2015-Nov-19 17:24 UTC
[llvm-dev] thumbv7 build errors "requires arm-mode"
Hi Steve, On 19 November 2015 at 08:59, Steve King via llvm-dev <llvm-dev at lists.llvm.org> wrote:> 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.
Steve King via llvm-dev
2015-Nov-19 18:58 UTC
[llvm-dev] thumbv7 build errors "requires arm-mode"
On Thu, Nov 19, 2015 at 9:24 AM, Tim Northover <t.p.northover at gmail.com> wrote:> Hi Steve, > > On 19 November 2015 at 08:59, Steve King via llvm-dev > <llvm-dev at lists.llvm.org> wrote: >> 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). >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