Segmented Stack support for X64-MinGW

Alex Crichton alex at crichton.co
Mon Mar 31 17:04:30 PDT 2014


As part of the ongoing effort to upstream the patches that we're using
with the Rust language, this is a patch which adds support for
segmented stacks on 64-bit windows using MinGW. The original author
was @klutzy on GitHub [1], and I've just added some tests to it.

The implementation is the same as the 32-bit windows implementation by
assuming that the stack limit is in the TIB's arbitrary data slot [2].
The location of the TIB is slightly different, being pointed to by %gs
instead of %fs [3].

If anything else is required, please just let me know!

[1] - https://github.com/rust-lang/llvm/commit/12d885
[2] - http://en.wikipedia.org/wiki/Win32_Thread_Information_Block
[3] - http://en.wikipedia.org/wiki/X86-64
-------------- next part --------------
A non-text attachment was scrubbed...
Name: windows.patch
Type: application/octet-stream
Size: 6236 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140331/f3ac698d/attachment.obj>


More information about the llvm-commits mailing list