diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-06-09 15:42:36 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-06-12 08:01:58 +0200 |
commit | 7b0c74ffb085656d67554102857224223ee03f88 (patch) | |
tree | d2cf69f695da218e67c6c5cb7d26f82c3fc967be /cpukit/score/cpu/i386/cpu_asm.S | |
parent | i386: Move _CPU_Context_Initialize() (diff) | |
download | rtems-7b0c74ffb085656d67554102857224223ee03f88.tar.bz2 |
i386: Support thread-local storage (TLS)
Update #2468.
Diffstat (limited to 'cpukit/score/cpu/i386/cpu_asm.S')
-rw-r--r-- | cpukit/score/cpu/i386/cpu_asm.S | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cpukit/score/cpu/i386/cpu_asm.S b/cpukit/score/cpu/i386/cpu_asm.S index 45079a65b8..6b609ab4ce 100644 --- a/cpukit/score/cpu/i386/cpu_asm.S +++ b/cpukit/score/cpu/i386/cpu_asm.S @@ -32,6 +32,8 @@ .set REG_EBX, I386_CONTEXT_CONTROL_EBX_OFFSET .set REG_ESI, I386_CONTEXT_CONTROL_ESI_OFFSET .set REG_EDI, I386_CONTEXT_CONTROL_EDI_OFFSET +.set REG_GS_0, I386_CONTEXT_CONTROL_GS_0_OFFSET +.set REG_GS_1, I386_CONTEXT_CONTROL_GS_1_OFFSET BEGIN_CODE @@ -83,6 +85,12 @@ restore: movl REG_EBX(eax),ebx /* restore ebx */ movl REG_ESI(eax),esi /* restore source register */ movl REG_EDI(eax),edi /* restore destination register */ + movl REG_GS_0(eax), ecx /* restore gs segment */ + movl REG_GS_1(eax), edx + movl ecx, _Global_descriptor_table + 24 + movl edx, _Global_descriptor_table + 28 + movl $24, ecx + mov ecx, gs ret /* |