search for: cpoo

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

Did you mean: cpio
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
...ne __attribute__((always_inline)) template<class A> class CompactPointer { uint32_t adr; public: ainline A *operator->() { return reinterpret_cast<A*>(static_cast<uint32_t*>(global_segment)+adr);} }; int main() { CompactPointer<OtherObject> cpoo; CompactPointer<Object> cp = cpoo->cpo; } ~ all such dereferencing statements would have in the IR references to the global_segment. Could track back all those (with a custom LLVM pass) and translate to a "segmented instruction". Having seen that address(256) is specific to...