From 5d5ca6d75e2f83055e723d2269dc0ca9934dfa88 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Wed, 14 May 2003 03:38:13 +0000 Subject: [PATCH] Fix some misunderstandings about 64 bit extension. Fix fuword/suword - they're supposed to be 'long' - ie: point them at fuword64/suword64 instead of the incorrect 32 bit versions. --- sys/amd64/amd64/support.S | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/sys/amd64/amd64/support.S b/sys/amd64/amd64/support.S index 94b5229daa8..2f1f34664ff 100644 --- a/sys/amd64/amd64/support.S +++ b/sys/amd64/amd64/support.S @@ -358,6 +358,9 @@ ENTRY(fuword64) movq $0,PCB_ONFAULT(%rcx) ret +ENTRY(fuword) + jmp fuword64 + ENTRY(fuword32) movq PCPU(CURPCB),%rcx movq $fusufault,PCB_ONFAULT(%rcx) @@ -366,15 +369,10 @@ ENTRY(fuword32) cmpq %rax,%rdi /* verify address is valid */ ja fusufault -/* XXX use the 64 extend */ - xorq %rax, %rax movl (%rdi),%eax movq $0,PCB_ONFAULT(%rcx) ret -ENTRY(fuword) - jmp fuword32 - /* * These two routines are called from the profiling code, potentially * at interrupt time. If they fail, that's okay, good things will @@ -397,8 +395,6 @@ ENTRY(fuword16) cmpq %rax,%rdi ja fusufault -/* XXX use the 64 extend */ - xorq %rax, %rax movzwl (%rdi),%eax movq $0,PCB_ONFAULT(%rcx) ret @@ -414,8 +410,6 @@ ENTRY(fubyte) cmpq %rax,%rdi ja fusufault -/* XXX use the 64 extend */ - xorq %rax, %rax movzbl (%rdi),%eax movq $0,PCB_ONFAULT(%rcx) ret @@ -448,6 +442,9 @@ ENTRY(suword64) movq %rax,PCB_ONFAULT(%rcx) ret +ENTRY(suword) + jmp suword64 + ENTRY(suword32) movq PCPU(CURPCB),%rcx movq $fusufault,PCB_ONFAULT(%rcx) @@ -462,9 +459,6 @@ ENTRY(suword32) movq %rax,PCB_ONFAULT(%rcx) ret -ENTRY(suword) - jmp suword32 - /* * suword16 - MP SAFE */