Add syscall/sysret instructions. direct-syscalls
authorOlof-Joachim Frahm <olof@macrolet.net>
Mon, 2 Sep 2013 15:44:24 +0000 (17:44 +0200)
committerOlof-Joachim Frahm <olof@macrolet.net>
Wed, 23 Oct 2013 21:28:44 +0000 (23:28 +0200)
src/compiler/x86-64/insts.lisp

index 6edbb0e..1a6462b 100644 (file)
   (:emitter
    (emit-byte segment #b11001001)))
 \f
+;;;; syscall/sysret
+
+(define-instruction syscall (segment)
+  (:printer two-bytes ((op '(#b00001111 #b00000101))))
+  (:emitter
+   (emit-byte segment #b00001111)
+   (emit-byte segment #b00000101)))
+
+(define-instruction sysret (segment)
+  (:printer two-bytes ((op '(#b00001111 #b00000111))))
+  (:emitter
+   (emit-byte segment #b00001111)
+   (emit-byte segment #b00000111)))
+\f
 ;;;; interrupt instructions
 
 (defun snarf-error-junk (sap offset &optional length-only)