<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>On Jun 1, 2011, at 8:50 PM, ret val wrote:</div><div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 12px; border-collapse: collapse; ">I  mean pointers to functions unfortunately. I guess this will be more interesting that I thought. Any specific advice?<div>
<br></div></span></blockquote><div>This makes me think of the early days of EFI on the Intel(r) Itanium(r) Processors. An indirect procedure call on Itanium is through a Plabel. So a function pointer points to a Plabel that contains the function address and a value to load into the gp register. </div><div><br></div><div>Maybe you could make the first 4-8 bytes of the 4K page contain the pointer to the function, and make the code gen for function calls indirect the extra layer. You would end up needing relocations for both the "Plabel" and the function pointer, which should not be a big deal, but could really confuse what ever linker you are using. This would solve the cast to void* issue, but could create its own set of issues?</div><div><br></div><div>Some one else would need to comment on how practical this would be....  Good luck.</div><div><br></div><br><div><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Andrew Fish</div><div><br></div><div><br></div></div></span></span></div><blockquote type="cite"><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 12px; border-collapse: collapse; "><div>Thank again</div></span><br><div class="gmail_quote">On Wed, Jun 1, 2011 at 5:55 PM, John McCall <span dir="ltr"><<a href="mailto:rjmccall@apple.com">rjmccall@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Jun 1, 2011, at 12:48 PM, ret val wrote:<br>
> I would like to be able to increase the size allocated for normal function pointers so they each fill a entire (virtual memory) page.<br>
<br>
</div>Do you mean that you want each *function* to occupy its own<br>
VM page, or do you really mean that you want function *pointers*<br>
to grow from 4-8 bytes apiece to 4KB?<br>
<br>
The best way of doing the former is to specify a huge alignment for<br>
the function.  The latter is likely to break a lot of code that assumes<br>
(yes, technically contrary to the standards) that function pointers<br>
can be losslessly cast to, say, void*.<br>
<font color="#888888"><br>
John.<br>
</font></blockquote></div><br>
_______________________________________________<br>cfe-dev mailing list<br><a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br></blockquote></div><br></body></html>