[yalo commit] r123 - trunk/cc wiki

0 views
Skip to first unread message

codesite...@google.com

unread,
Feb 17, 2009, 9:39:52 AM2/17/09
to yalo-...@googlegroups.com
Author: yujian.zhang
Date: Tue Feb 17 05:55:19 2009
New Revision: 123

Modified:
trunk/cc/test-cc.lisp
trunk/cc/x86-64-syntax.lisp
wiki/AssemblyX64S.wiki

Log:
Add instruction syscall/sysret.

Modified: trunk/cc/test-cc.lisp
==============================================================================
--- trunk/cc/test-cc.lisp (original)
+++ trunk/cc/test-cc.lisp Tue Feb 17 05:55:19 2009
@@ -181,6 +181,10 @@
(stosb)
(stosw)

+ (bits 64)
+ (syscall)
+ (sysret)
+
(equ hi 4)
(dw meta-msg msg)
(db msg "Hello World! ")
@@ -192,13 +196,13 @@
"Miscellaneous instructions.")

(defparameter *misc-code*
- '(232 93 0 248 252 250 244 228 3 229 4 236 237 204 205 16 235 254 15
- 1 22 96 124 15 1 30 96 124 15 0 210 15 0 22 96 124 172 173 226 232
- 180 9 187 13 0 137 200 137 30 96 124 139 14 123 28 199 6 96 124
- 123 0 142 195 140 200 144 230 3 231 4 238 239 81 14 22 30 6 90 23
- 31 7 243 164 243 165 243 102 165 195 249 253 251 170 171 96 124 72
- 101 108 108 111 32 87 111 114 108 100 33 32 0 0 0 85 170 64 226 1
- 0 67 104 120 0 0 0 230 130 217 250 11 0))
+ '(232 97 0 248 252 250 244 228 3 229 4 236 237 204 205 16 235 254 15
+ 1 22 100 124 15 1 30 100 124 15 0 210 15 0 22 100 124 172 173 226
+ 232 180 9 187 13 0 137 200 137 30 100 124 139 14 123 28 199 6 100
+ 124 123 0 142 195 140 200 144 230 3 231 4 238 239 81 14 22 30 6 90
+ 23 31 7 243 164 243 165 243 102 165 195 249 253 251 170 171 15 5
+ 15 7 100 124 72 101 108 108 111 32 87 111 114 108 100 33 32 0 0 0
+ 85 170 64 226 1 0 67 104 120 0 0 0 230 130 217 250 11 0))

(defparameter *address-asm*
'((org #x7c00)

Modified: trunk/cc/x86-64-syntax.lisp
==============================================================================
--- trunk/cc/x86-64-syntax.lisp (original)
+++ trunk/cc/x86-64-syntax.lisp Tue Feb 17 05:55:19 2009
@@ -161,7 +161,9 @@
"Valid for 16-bit mode only.")

(defparameter *x86-64-syntax-64-bit-only*
- `(,@(arith-syntax-1 'add t)))
+ `(,@(arith-syntax-1 'add t)
+ ((syscall) . (#x0f #x05))
+ ((sysret) . (#x0f #x07))))

(defparameter *x86-64-syntax-16/32-bit*
(append *x86-64-syntax-common* *x86-64-syntax-16/32-bit-only*)

Modified: wiki/AssemblyX64S.wiki
==============================================================================
--- wiki/AssemblyX64S.wiki (original)
+++ wiki/AssemblyX64S.wiki Tue Feb 17 05:55:19 2009
@@ -59,5 +59,12 @@
|| sub r8 r/m8 || 2A /r || Valid || Valid || Sub
r/m8 from r8 ||
|| sub r16 r/m16 || 2B /r || Valid || Valid || Sub
r/m16 from r16 ||

+--------
+
+= syscall/sysret: (Return from) Fast System Call =
+
+|| Instruction || Opcode || 64-Bit Mode || 16/32-Bit Mode ||
Description ||
+|| syscall || 0F 05 || Valid || ~~Invalid~~ || Fast system
call ||
+|| sysret || 0F 07 || Valid || ~~Invalid~~ || Return from
fast system call ||


Reply all
Reply to author
Forward
0 new messages