jasmin icon indicating copy to clipboard operation
jasmin copied to clipboard

Support far global variable accesses in ARM

Open sarranz opened this issue 1 year ago • 2 comments

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.

sarranz avatar Oct 02 '24 15:10 sarranz

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 ?

bgregoir avatar Oct 08 '24 16:10 bgregoir

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.

sarranz avatar Oct 08 '24 20:10 sarranz

Hi Santiago, have you been able to progress on this ? B

bgregoir avatar Nov 05 '24 07:11 bgregoir

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.

sarranz avatar Nov 05 '24 08:11 sarranz

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.

sarranz avatar Nov 15 '24 17:11 sarranz

Benjamin suggested we check that the argument is Addr (Arip _), so now the assumption about issuing ADR only for global accesses is not necessary.

sarranz avatar Nov 23 '24 11:11 sarranz