Jim Grosbach
2011-Jun-22 15:50 UTC
[LLVMdev] ARM thumb-2 instruction used for non-thumb2 CPUs
On Jun 22, 2011, at 8:39 AM, Damjan Marion wrote:> > On Jun 22, 2011, at 5:29 PM, Jim Grosbach wrote: > >> >> On Jun 22, 2011, at 7:22 AM, Renato Golin wrote: >> >>> On 22 June 2011 14:33, Damjan Marion <damjan.marion at gmail.com> wrote: >>>> Problem is that in case when old binutils are used (in my case freebsd is using old one due to license upgrade to GPLv3) AS doesn't understand new mnemonics and fails. >>> >>> Indeed, this is new in ARM ARM v7. >>> >>> >>>> Can we change to old mnemonic at least when ARMv4 and ARMv5 code is generated? >>> >>> We definitely should. Feel free to send a patch if you already have, >>> or create a bug in bugzilla. Shouldn't be too hard to add it. >> >> LLVM always uses unified syntax, including updated mnemonics for older instructions. Older binutils aren't supported. This is unlikely to change. >> > > This sounds like a dead end as newer binutils are GPLv3.Yeah, that's definitely a very real concern and a big motivation to get the MC based asm parser whipped into usable shape. We're much more in control of our own destiny then.> What is the status of integrated-as for arm, is it stable?The encoding information in the back end is generally in pretty decent shape for direct object file emission. Some of the folks working on the ELF emitter would be better able to tell you how that part of the things is working. The asm parser, on the other hand, is still in pretty rough shape. That said, I'm hoping to get back to that stuff near future, so it's still under active development. -Jim
Renato Golin
2011-Jun-22 16:00 UTC
[LLVMdev] ARM thumb-2 instruction used for non-thumb2 CPUs
On 22 June 2011 16:50, Jim Grosbach <grosbach at apple.com> wrote:>> This sounds like a dead end as newer binutils are GPLv3. > > Yeah, that's definitely a very real concern and a big motivation to get the MC based asm parser whipped into usable shape. We're much more in control of our own destiny then.So, how do we solve the problem until then? cheers, --renato
Jim Grosbach
2011-Jun-22 16:15 UTC
[LLVMdev] ARM thumb-2 instruction used for non-thumb2 CPUs
On Jun 22, 2011, at 9:00 AM, Renato Golin wrote:> On 22 June 2011 16:50, Jim Grosbach <grosbach at apple.com> wrote: >>> This sounds like a dead end as newer binutils are GPLv3. >> >> Yeah, that's definitely a very real concern and a big motivation to get the MC based asm parser whipped into usable shape. We're much more in control of our own destiny then. > > So, how do we solve the problem until then?In general, it's a tricky thing. If it were only a few instructions, we could just switch to the older mnemonic as a special case w/ a FIXME saying that we should change it when newer assemblers become available on FreeBSD. That's unfortunately not really the case, though. For example, all of the VFP instructions use newer mnemonics, and the predicated condition code setting arithmetic instructions have changed the order of the 's' and 'cc' suffices (e.g., addseq vs. addeqs). I suspect we'll care about all of them, as we're wanting to handle userspace apps, not just kernel code, here, right? This is the system assembler that's too old. If so, the best answer is to teach the assembler the new mnemonics. To help with that, the majority of the work for v7 was released under GPLv2, even though it didn't make it into an official binutils release until post-v3 changeover. There are GPLv2 CodeSourcery drops which contain v7 support, for example, including binutils support for unified syntax. While there are some bugs (Anton can probably give more details), they do generally work and would likely provide a good starting point so that the support wouldn't have to be done from scratch. -Jim
Seemingly Similar Threads
- [LLVMdev] ARM thumb-2 instruction used for non-thumb2 CPUs
- [LLVMdev] ARM thumb-2 instruction used for non-thumb2 CPUs
- [LLVMdev] ARM thumb-2 instruction used for non-thumb2 CPUs
- [LLVMdev] ARM thumb-2 instruction used for non-thumb2 CPUs
- [LLVMdev] ARM thumb-2 instruction used for non-thumb2 CPUs