<div dir="ltr">On 25 October 2013 18:33, David Peixotto <span dir="ltr"><<a href="mailto:dpeixott@codeaurora.org" target="_blank">dpeixott@codeaurora.org</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Both armasm and gnu as support an ldr pseudo instruction for loading<br>
constants that lowers to either a mov, movn, or a pc-relative ldr from the<br>
constant pool. It would be great if the llvm integrated assembler could<br>
support this feature as well.<br></blockquote><div><br></div><div>Hi David,</div><div><br></div><div>As much as I think that it's important to add support for old codebases to be compiled, I also have to consider the importance of compatibility and compiler sanity.</div>
<div><br></div><div>Adding support for this GNU extension (that ARMCC also seem to support) can:</div><div><br></div><div>1. Add multiple representations to the same operation, which is fine when you're converting ASM into binary, but not so much when you're doing the reverse.</div>
<div><br></div><div>We have been trying to deprecate pre-UAL and GNU-extensions as much as possible, and this is a move that is supported from most of the ARM LLVM community. The main reason is, as I said, to be able to come to and from ASM, having the same canonical representation. This will make it a lot easier to test the compiler and to avoid silent asm/disasm failures not covered by the tests. We also have been avoiding to remove pre-UAL support just because "bacon", but if it impacts a needed change, or if removing it fixes a bug, we tend to trim it off.</div>
<div><br></div><div>2. Increment the complexity of the assembler and disassembler in areas that you cannot predict right now.</div><div><br></div><div>It seems that this syntax allows for you to define symbols and constant pools, and both have interactions with the rest of the code generation, relocation symbols, etc. I can't guarantee right now that there will be no conflicts with anything elsewhere, and to make sure we're covering all bases, a huge amount of tests will need to be added. Of course, people are free to work on things that make their work compile and run, but you have to be aware that GNU-extensions and pre-UAL features are not taken lightly.</div>
<div><br></div><div>Ultimately, if there is a feature that cannot be done any other way in ARM UAL, than we shall consider the options and implement the best. But if this is just syntactic sugar, than I'd strongly suggest you to upgrade your assembly files. The argument that "GCC does it" is used far too often in the LLVM list, and I can't say I'm a big fan of it. GCC did not take *only* smart decisions in its life (neither did LLVM), and copying everything from one side to the other blindly is not a good strategy.</div>
<div><br></div><div>I may be wrong, correct me if I'm wrong, but as far as I got it, this looks just like syntactic sugar.</div><div><br></div><div>cheers,</div><div>--renato</div></div></div></div>