Hi I'm working on a POC adding Windows Phone (ARM) support to the ARM backend. I've encountered the following problem. Microsoft's COFF linker/loader supports a single relocation type ( IMAGE_REL_ARM_MOV32T) on continuous movw/movt Thumb2 instructions opposed to ELF and Mach-O which support relocation per instruction (one for movw and movt). I need to make sure that in case of immediate operands which needs fix-up for these instructions they will grouped together with no other instruction inserted between them. Also they need to be emitted in the correct order. What should be the right approach to implement this? Is this something I can describe in target description for ARM? thx pM0n -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140406/0ea5b1ea/attachment.html>
Hello> What should be the right approach to implement this?You definitely can glue them together. Alternatively, you can disable the generation of movt / movw instruction pairs at all. The latter probably looks the better solution give the target weirdness :)> Is this something I can describe in target description for ARM?If you mean .td files, then no. movt / movw pairs is inserted via "pseudo instruction expansion pass". Look into ARMExpandPseudoInsts.cpp -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
> You definitely can glue them together.Do you mean instruction bundling? I see that sometimes (I guess) some optimization does insert other instructions between movw+movt pair. Is there a flag to say "don't touch them"? On Sun, Apr 6, 2014 at 8:42 PM, Anton Korobeynikov <anton at korobeynikov.info>wrote:> Hello > > > What should be the right approach to implement this? > You definitely can glue them together. Alternatively, you can disable > the generation of movt / movw instruction pairs at all. The latter > probably looks the better solution give the target weirdness :) > > > Is this something I can describe in target description for ARM? > If you mean .td files, then no. movt / movw pairs is inserted via > "pseudo instruction expansion pass". Look into > ARMExpandPseudoInsts.cpp > > > -- > With best regards, Anton Korobeynikov > Faculty of Mathematics and Mechanics, Saint Petersburg State University >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140408/71f11bfa/attachment.html>