aboutsummaryrefslogtreecommitdiff
path: root/x86_64/locore.S
diff options
context:
space:
mode:
authorDamien Zammit <damien@zamaudio.com>2023-09-25 00:24:01 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-09-25 10:19:58 +0200
commitbe0abe4c2361f2c7db5a52b0900e298083fefe40 (patch)
treea56307a5e556d89f59ea3fc73841e604a3847dc0 /x86_64/locore.S
parentbf1cd17a446cb99668d4398473e15b5613086ff5 (diff)
downloadgnumach-be0abe4c2361f2c7db5a52b0900e298083fefe40.tar.gz
gnumach-be0abe4c2361f2c7db5a52b0900e298083fefe40.tar.bz2
gnumach-be0abe4c2361f2c7db5a52b0900e298083fefe40.zip
x86_64: Change active_threads to use gs like i386
Message-Id: <20230925002353.466997-1-damien@zamaudio.com>
Diffstat (limited to 'x86_64/locore.S')
-rw-r--r--x86_64/locore.S7
1 files changed, 3 insertions, 4 deletions
diff --git a/x86_64/locore.S b/x86_64/locore.S
index b282da4f..55dc4d27 100644
--- a/x86_64/locore.S
+++ b/x86_64/locore.S
@@ -1186,7 +1186,7 @@ syscall_entry_2:
* Check for MACH or emulated system call
*/
syscall_entry_3:
- movq CX(EXT(active_threads),%rdx),%rdx
+ movq MY(ACTIVE_THREAD),%rdx
/* point to current thread */
movq TH_TASK(%rdx),%rdx /* point to task */
movq TASK_EMUL(%rdx),%rdx /* get emulation vector */
@@ -1373,8 +1373,7 @@ ENTRY(syscall64)
* save only the callee-preserved status according to the C ABI,
* plus RIP and EFLAGS for sysret
*/
- CPU_NUMBER_NO_STACK(%r11)
- movq CX(EXT(active_threads),%r11),%r11 /* point to current thread */
+ movq MY(ACTIVE_THREAD),%r11 /* point to current thread */
movq TH_PCB(%r11),%r11 /* point to pcb */
addq $ PCB_ISS,%r11 /* point to saved state */
@@ -1471,7 +1470,7 @@ _syscall64_check_for_ast:
_syscall64_restore_state:
/* Restore thread state and return to user using sysret. */
cli /* block interrupts when using the user stack in kernel space */
- movq CX(EXT(active_threads),%r11),%r11 /* point to current thread */
+ movq MY(ACTIVE_THREAD),%r11 /* point to current thread */
movq TH_PCB(%r11),%r11 /* point to pcb */
addq $ PCB_ISS,%r11 /* point to saved state */