search for: heap_addr

Displaying 2 results from an estimated 2 matches for "heap_addr".

2014 Dec 05
6
[LLVMdev] instruction/intrinsic for segmented adressing
Hi, would like to use LLVM as backend for a compiler. One of the features I would like to implement is segment based addressing for position independent data. For some it may sound strange, for others the opposite. No need to write complex story. Imagine you have a custom alocator that manages an area of 1GB of memory. Your application uses a custom allocator to allocate memory inside this area,
2014 Dec 06
2
[LLVMdev] instruction/intrinsic for segmented adressing
...e (at least not without heavy LLVM > modifications), so you need a way to distinguish stack accesses from > heap. Without source annotation that's reducible to the halting > problem. For example: > > int load_address(int *addr) { > return addr; > } > > int evil(int *heap_addr) { > int local_var = 42; > return load_address(rand() % 2 ? heap_addr : &local_var); > } > > Should the code emitted for load_address use gs or not? > the stack should not be in this address space and this addressing should not apply to stack. The framework would make an...