From 4cf4be80a281aac7e2583e289838fc73f880acf0 Mon Sep 17 00:00:00 2001 From: Olof-Joachim Frahm Date: Mon, 2 Sep 2013 17:44:24 +0200 Subject: [PATCH] Add syscall/sysret instructions. --- src/compiler/x86-64/insts.lisp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/compiler/x86-64/insts.lisp b/src/compiler/x86-64/insts.lisp index 6edbb0e..1a6462b 100644 --- a/src/compiler/x86-64/insts.lisp +++ b/src/compiler/x86-64/insts.lisp @@ -2773,6 +2773,20 @@ (:emitter (emit-byte segment #b11001001))) +;;;; 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))) + ;;;; interrupt instructions (defun snarf-error-junk (sap offset &optional length-only) -- 1.7.10.4