[llvm-commits] Segmented stacks, current status.

Sanjoy Das sanjoy at playingwithpointers.com
Mon Jun 27 09:37:52 PDT 2011


Hi!
> 
> +    TlsReg = X86::FS;
> +    TlsOffset = 0x70;
> +
> ...
> +  } else {
> +    TlsReg = X86::GS;
> +    TlsOffset = 0x30;
> 
> Are you sure this will work on all subtargets we support?
> 

Now that you point it out, I think these will only work on GNU/Linux.

The actual slot in the TCB is currently dictated by libgcc; on which I'm
relying heavily for runtime support. Perhaps it would be a good idea to
not have non linux support for the time being; with llvm displaying an
error in case -segmented-stacks is used on Windows or something
equivalent (I'll add this in the next iteration).

If need arises, support for other platforms can be added by either
patching libgcc, or by adding a similar interface to compiler-rt.

-- 
Sanjoy Das
http://playingwithpointers.com



More information about the llvm-commits mailing list