[movitz-cvs] CVS update: movitz/losp/muerte/interrupt.lisp
Frode Vatvedt Fjeld
ffjeld at common-lisp.net
Sat Sep 25 15:51:20 UTC 2004
Update of /project/movitz/cvsroot/movitz/losp/muerte
In directory common-lisp.net:/tmp/cvs-serv11082
Modified Files:
interrupt.lisp
Log Message:
Added "RET atomification". I.e. when an interrupt occurs just before a
RET instruction, EIP is moved to a well-known code-vector that just
does the same RET. The point is that otherwise it's impossible (or too
difficult) to figure out which code-vector EIP references.
Date: Sat Sep 25 17:51:20 2004
Author: ffjeld
Index: movitz/losp/muerte/interrupt.lisp
diff -u movitz/losp/muerte/interrupt.lisp:1.26 movitz/losp/muerte/interrupt.lisp:1.27
--- movitz/losp/muerte/interrupt.lisp:1.26 Wed Sep 22 19:57:33 2004
+++ movitz/losp/muerte/interrupt.lisp Sat Sep 25 17:51:20 2004
@@ -10,7 +10,7 @@
;;;; Author: Frode Vatvedt Fjeld <frodef at acm.org>
;;;; Created at: Wed Apr 7 01:50:03 2004
;;;;
-;;;; $Id: interrupt.lisp,v 1.26 2004/09/22 17:57:33 ffjeld Exp $
+;;;; $Id: interrupt.lisp,v 1.27 2004/09/25 15:51:20 ffjeld Exp $
;;;;
;;;;------------------------------------------------------------------
@@ -123,6 +123,14 @@
(:pushl (:eax 2)) ; debug1: nursery-space's fresh-pointer
(:locally (:movl 0 (:edi (:edi-offset atomically-continuation))))
+
+ ;; Do RET atomicification
+ (:movl (:ebp ,(dit-frame-offset :eip)) :ecx)
+ (:cmpb ,(realpart (ia-x86:asm :ret)) (:ecx))
+ (:jne 'not-at-ret-instruction)
+ (:locally (:movl (:edi (:edi-offset ret-trampoline)) :ecx))
+ (:movl :ecx (:ebp ,(dit-frame-offset :eip)))
+ not-at-ret-instruction
(:xorl :eax :eax) ; Ensure safe value
(:xorl :edx :edx) ; Ensure safe value
More information about the Movitz-cvs
mailing list