aboutsummaryrefslogtreecommitdiff
path: root/x86_64
diff options
context:
space:
mode:
authorLuca Dariz <luca@orpolo.org>2023-02-12 18:28:11 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-02-12 18:41:18 +0100
commit19d5c54a76c6ff1b96c2860ab3fd50af9e81c5b5 (patch)
tree3b76474e9ff88ab9d02972cef6532223e1a03de0 /x86_64
parent7150aa22ccc847af70a69cd8f53b3195825e2d0e (diff)
downloadgnumach-19d5c54a76c6ff1b96c2860ab3fd50af9e81c5b5.tar.gz
gnumach-19d5c54a76c6ff1b96c2860ab3fd50af9e81c5b5.tar.bz2
gnumach-19d5c54a76c6ff1b96c2860ab3fd50af9e81c5b5.zip
fix x86_64 asm for higher kernel addresses
* x86_64/interrupt.S: use 64-bit registers as variables could be stored at high addresses * x86_64/locore.S: Likewise Message-Id: <20230212172818.1511405-3-luca@orpolo.org>
Diffstat (limited to 'x86_64')
-rw-r--r--x86_64/interrupt.S4
-rw-r--r--x86_64/locore.S6
2 files changed, 4 insertions, 6 deletions
diff --git a/x86_64/interrupt.S b/x86_64/interrupt.S
index fe2b3858..31f386ec 100644
--- a/x86_64/interrupt.S
+++ b/x86_64/interrupt.S
@@ -59,10 +59,10 @@ ENTRY(interrupt)
movl S_IRQ,%eax /* copy irq number */
shll $2,%eax /* irq * 4 */
- movl EXT(iunit)(%eax),%edi /* get device unit number as 1st arg */
+ movl EXT(iunit)(%rax),%edi /* get device unit number as 1st arg */
shll $1,%eax /* irq * 8 */
- call *EXT(ivect)(%eax) /* call interrupt handler */
+ call *EXT(ivect)(%rax) /* call interrupt handler */
movl S_IPL,%edi /* restore previous ipl */
call splx_cli /* restore previous ipl */
diff --git a/x86_64/locore.S b/x86_64/locore.S
index 95ece3cc..c54b5cd8 100644
--- a/x86_64/locore.S
+++ b/x86_64/locore.S
@@ -1152,7 +1152,7 @@ syscall_native:
#endif
shll $5,%eax /* manual indexing of mach_trap_t */
xorq %r10,%r10
- movl EXT(mach_trap_table)(%eax),%r10d
+ mov EXT(mach_trap_table)(%rax),%r10
/* get number of arguments */
andq %r10,%r10
jz mach_call_call /* skip argument copy if none */
@@ -1199,9 +1199,7 @@ mach_call_call:
/* will return with syscallofs still (or again) in eax */
0:
#endif /* DEBUG */
-
- call *EXT(mach_trap_table)+8(%eax)
- /* call procedure */
+ call *EXT(mach_trap_table)+8(%rax) /* call procedure */
movq %rsp,%rcx /* get kernel stack */
or $(KERNEL_STACK_SIZE-1),%rcx
movq -7-IKS_SIZE(%rcx),%rsp /* switch back to PCB stack */