git: Add field to tls_tcb to support segmented stacks in LLVM

Michael Neumann mneumann at crater.dragonflybsd.org
Tue Jul 22 15:57:54 PDT 2014


commit 166bae116c2735bbfd353b135de67878e1e5744b
Author: Michael Neumann <mneumann at ntecs.de>
Date:   Wed Jul 23 01:27:48 2014 +0200

    Add field to tls_tcb to support segmented stacks in LLVM
    
    When segmented stack support is enabled, LLVM adds code in front of
    every function to check if the stack is already exhausted, in which
    case it calls __morestack. For this reason LLVM needs to know the lower
    boundary of the stack to check against the stack pointer.
    The stack boundary can be stored in this per-thread field (tcb_segstack)
    and accessed via %fs:32 (x86_64) or %fs:16 (i386) from the code generated
    by LLVM.

Summary of changes:
 sys/cpu/i386/include/tls.h   | 4 +++-
 sys/cpu/x86_64/include/tls.h | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/166bae116c2735bbfd353b135de67878e1e5744b


-- 
DragonFly BSD source repository



More information about the Commits mailing list