summaryrefslogtreecommitdiffstats
path: root/sys/amd64/amd64/support.S
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2004-05-21 16:50:57 +0000
committerbde <bde@FreeBSD.org>2004-05-21 16:50:57 +0000
commit37bf942f68bfa8ee8e34a6696b0fa829b8e46e9d (patch)
treee2590b47479c119dca0e3e83af54185be663ddf6 /sys/amd64/amd64/support.S
parentfebe11a168b43c6a2f61148650cba56289775e0d (diff)
downloadFreeBSD-src-37bf942f68bfa8ee8e34a6696b0fa829b8e46e9d.zip
FreeBSD-src-37bf942f68bfa8ee8e34a6696b0fa829b8e46e9d.tar.gz
MFi386 (1.103 and 1.104: fixed some problems in high resolution profiling
and improved some comments). Also, made the documented {f,s}uword() functions the standard entry points and the undocumented {f,s}uword64() functions alternative entry points, like {f,s}uword32() for i386's. The bitrot in the comments was a little larger here -- there are new undocumented 32-bit sub-word functions, not just renaming of 16-bit functions from documented ones to undocumented ones.
Diffstat (limited to 'sys/amd64/amd64/support.S')
-rw-r--r--sys/amd64/amd64/support.S46
1 files changed, 15 insertions, 31 deletions
diff --git a/sys/amd64/amd64/support.S b/sys/amd64/amd64/support.S
index 36f0f4d..0867517 100644
--- a/sys/amd64/amd64/support.S
+++ b/sys/amd64/amd64/support.S
@@ -352,12 +352,13 @@ ENTRY(casuptr)
ret
/*
- * fu{byte,sword,word} - MP SAFE
- *
- * Fetch a byte (sword, word) from user memory
- * %rdi
+ * Fetch (load) a 64-bit word, a 32-bit word, a 16-bit word, or an 8-bit
+ * byte from user memory. All these functions are MPSAFE.
+ * addr = %rdi
*/
-ENTRY(fuword64)
+
+ALTENTRY(fuword64)
+ENTRY(fuword)
movq PCPU(CURPCB),%rcx
movq $fusufault,PCB_ONFAULT(%rcx)
@@ -369,9 +370,6 @@ ENTRY(fuword64)
movq $0,PCB_ONFAULT(%rcx)
ret
-ENTRY(fuword)
- jmp fuword64
-
ENTRY(fuword32)
movq PCPU(CURPCB),%rcx
movq $fusufault,PCB_ONFAULT(%rcx)
@@ -385,9 +383,10 @@ ENTRY(fuword32)
ret
/*
- * These two routines are called from the profiling code, potentially
- * at interrupt time. If they fail, that's okay, good things will
- * happen later. Fail all the time for now - until the trap code is
+ * fuswintr() and suswintr() are specialized variants of fuword16() and
+ * suword16(), respectively. They are called from the profiling code,
+ * potentially at interrupt time. If they fail, that's okay; good things
+ * will happen later. They always fail for now, until the trap code is
* able to deal with this.
*/
ALTENTRY(suswintr)
@@ -395,9 +394,6 @@ ENTRY(fuswintr)
movq $-1,%rax
ret
-/*
- * fuword16 - MP SAFE
- */
ENTRY(fuword16)
movq PCPU(CURPCB),%rcx
movq $fusufault,PCB_ONFAULT(%rcx)
@@ -410,9 +406,6 @@ ENTRY(fuword16)
movq $0,PCB_ONFAULT(%rcx)
ret
-/*
- * fubyte - MP SAFE
- */
ENTRY(fubyte)
movq PCPU(CURPCB),%rcx
movq $fusufault,PCB_ONFAULT(%rcx)
@@ -434,12 +427,12 @@ fusufault:
ret
/*
- * su{byte,sword,word} - MP SAFE
- *
- * Write a byte (word, longword) to user memory
- * addr = %rdi, value = %rsi
+ * Store a 64-bit word, a 32-bit word, a 16-bit word, or an 8-bit byte to
+ * user memory. All these functions are MPSAFE.
+ * addr = %rdi, value = %rsi
*/
-ENTRY(suword64)
+ALTENTRY(suword64)
+ENTRY(suword)
movq PCPU(CURPCB),%rcx
movq $fusufault,PCB_ONFAULT(%rcx)
@@ -453,9 +446,6 @@ ENTRY(suword64)
movq %rax,PCB_ONFAULT(%rcx)
ret
-ENTRY(suword)
- jmp suword64
-
ENTRY(suword32)
movq PCPU(CURPCB),%rcx
movq $fusufault,PCB_ONFAULT(%rcx)
@@ -470,9 +460,6 @@ ENTRY(suword32)
movq %rax,PCB_ONFAULT(%rcx)
ret
-/*
- * suword16 - MP SAFE
- */
ENTRY(suword16)
movq PCPU(CURPCB),%rcx
movq $fusufault,PCB_ONFAULT(%rcx)
@@ -487,9 +474,6 @@ ENTRY(suword16)
movq %rax,PCB_ONFAULT(%rcx)
ret
-/*
- * subyte - MP SAFE
- */
ENTRY(subyte)
movq PCPU(CURPCB),%rcx
movq $fusufault,PCB_ONFAULT(%rcx)
OpenPOWER on IntegriCloud