[LLVMdev] instruction/intrinsic for segmented adressing
mobi at mobiphil.com
Fri Dec 5 09:08:26 PST 2014
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, and at the end of your code you save
one to one that memory to disk. Next time you load that one 1GB where you
can (addresses that are available) and by using segment based addressing
all pointers inside would be valid independently where you loaded the 1GB.
Now on x64 I have GS/FS registers. Pitty enough their addresses can be
changed only by the OS (not in user space). Not sure what "tools" are
available on ARM, hopefully there is something.
New my question is, what is the best way to tell LLVM to generate
[FS:xxx] and/or [GS:xxxx] class of instructions?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev