Hello,<br><br>> This can be done with the existing section markings for globals;<br>> address spaces are intended for situations where the spaces actually<br>> have distinct properties.<br><br><div class="gmail_quote">
I understand that the spaces hold information with distinct properties. For this reason, I want to include an extra property (like a security tag). By profiling, I know which variables hold secure information and which not. Then, I want to aggregate variables depending on the new property. The idea is allocate them (secure - unsecure) in different pages (I can afford wasting memory between segments).  <br>
<br>The idea is to apply the same concept to all the segments (text, data, heap, and stack). At the end, I will have several address spaces (in an ARM processor), so the only that I will need to do is assign the correct (or desired) number to each variable. <br>
<br>In other words, I just need to re-order the variables and re-calculate they offset. Any idea?<br><br>Thanks,<br><br>Juan Carlos<br><br>On Mon, Jul 6, 2009 at 4:11 PM, Eli Friedman <span dir="ltr"><<a href="mailto:eli.friedman@gmail.com">eli.friedman@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">On Mon, Jul 6, 2009 at 11:43 AM, Juan Carlos Martinez<br>
Santos<<a href="mailto:juanc.martinez.santos@gmail.com">juanc.martinez.santos@gmail.com</a>> wrote:<br>
> Looking the Language Reference, there is something called "addrspace". It<br>
> can be used to allocate a global variable into a specific area (always that<br>
> the target supports it). How I can modify the ARM back-end in order to<br>
> support at least two memory sections for Global Variables in the BSS<br>
> section. My idea is to split the uninitialized global variables in two<br>
> sections and to aggregate them depends on the uses of each variable at<br>
> execution time (by profiling I will know what variable will be in each<br>
> section).<br>
<br>
</div>This can be done with the existing section markings for globals;<br>
address spaces are intended for situations where the spaces actually<br>
have distinct properties.<br>
<div class="im"><br>
> In addition, can I add more address spaces for heap and stack also? For<br>
> exampe, can I split my stack in two segments, one to hold critical info like<br>
> return address and frame pointer, and another to hold function arguments?<br>
> How I can do it?<br>
<br>
</div>You don't need address spaces for that; it's just a matter of using<br>
different heap allocation functions and a custom calling convention.<br>
<br>
-Eli<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Juan Carlos <br>