[Lldb-commits] [PATCH] D68069: Explicitly set entry point arch when it's thumb

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sun Sep 29 23:59:20 PDT 2019


labath added a comment.

In D68069#1686199 <https://reviews.llvm.org/D68069#1686199>, @aadsm wrote:

> >   Not everyone has both of these things enabled (particularly having lld is less common), but they are things that one _can_ enable no matter what is his host or target architecture, so I am not worried by that. And as tests like these become more common, I expect more people will start having these enabled by default.
>
> Will the tests running on the build bots have lld, arm enabled?


All of the current "buildbot" bots have it. We even have an "experimental" arm buildbot running on arm hardware, but that one is red all the time :(. "Greendragon" don't have lld iirc, but one day I might try to convince them to enable it too. :)

In D68069#1686711 <https://reviews.llvm.org/D68069#1686711>, @aadsm wrote:

> >   (substituting llvm-mc for as and ld.lld for linker).
>
> I was not able to figure out how to generate the object file with llvm-mc correctly. I've tried a few variations of the triple (e.g.: `armv7-eabi`) but I never end up with the same code that I have in the assembly: `# RUN: llvm-mc -triple=thumbv7 %s -filetype=obj -o %t.o`. Any idea here?


Changing the input to:

  movs r0, #42
  movs r7, #1
  svc #0

seems to do the trick to me (this how objdump disassembles the gnu as produced binary). I guess that's because "mov" does not name a specific instruction and as and llvm-mc choose to interpret it differently. I think a case could be made for changing llvm-mc to pick the other (shorter) form by default, but that's probably not relevant now.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68069/new/

https://reviews.llvm.org/D68069





More information about the lldb-commits mailing list