<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 11, 2019 at 10:42 PM Tim Northover <<a href="mailto:t.p.northover@gmail.com">t.p.northover@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, 11 Jul 2019 at 18:03, Reshabh Sharma <<a href="mailto:reshabhsh@gmail.com" target="_blank">reshabhsh@gmail.com</a>> wrote:<br>
> Ah now I could see it more clearly. I was not sure that should I add them (MO_LO32_LO and MO_LO32_HI), btw this was backup plan. Probably for now we are going with this. I implemented them today and they seem to work well.<br>
<br>
By the way, I probably should have said sooner but most targets with<br>
64-bit pointers don't (at least in the default mode) materialize<br>
64-bit absolute pointers as we've been discussing.<br>
<br>
x86 requires all global variables live with code in the low 2GB of<br>
memory, which allows direct use of %rip-relative addressing-modes.<br>
AArch64 requires all globals & code to be within 4GB of each other at<br>
an arbitrary location in memory.<br></blockquote><div> </div><div>Correct me if I understood it wrong, keeping global variables at some arbitrary location in memory with a limit of 4GB so that they can be addressed in 32 bits?</div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
If you adopted similar constraints for RISC-V you could probably use<br>
the existing code virtually unchanged.<br></blockquote><div><br></div><div>We are trying to support 4GB+ memory in address space 1 using 64 bit pointers in that address space, I guess then this might not apply? What do you think?</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Cheers.<br>
<br>
Tim.<br>
</blockquote></div></div></div></div>