Support far global variable accesses in ARM
Closes #619. I assume that ADR instructions are only generated for accesses to the data section, which seems to be true. I don't think it's a robust solution, but I don't see how to do it otherwise. Also, I believe we can't tell whether we can perform the relative access or not, so as to generate two instructions only when needed. The other options discussed in the issue didn't work, and I can't explain why.
I don't know what to think about this. In one side it maybe is better than nothing. On the other this is not certified. Maybe you should merge this and then do the proper patch. Any opinion on that ?
I did this because I thought we couldn't verify much about this, but you're right (as usual :)). I guess what you have in mind is to define the MOV lower and upper as extra ops? If so, I can do it, no problem. But I can't assure when, so I leave the question about merging or waiting to you.
Hi Santiago, have you been able to progress on this ? B
No. I'm at a loss because I can reproduce certain behaviors only in some assemblers, in particular this method with upper16 and lower16. I need to do a deep dive in the documentation next week when I have some time.
Ok, JC has helped me out. Apparently the disassembler was showing me incomplete information and this approach is fine. I will cleanup the pretty printer for the moment like we discussed and we can plan a cleaner patch next week.
Benjamin suggested we check that the argument is Addr (Arip _), so now the assumption about issuing ADR only for global accesses is not necessary.