Commit 0733e1ae authored by Frode Vatvedt Fjeld's avatar Frode Vatvedt Fjeld

Fixed the atomically stuff to mostly working.

parent 964564be
......@@ -9,7 +9,7 @@
;;;; Created at: Sun Oct 22 00:22:43 2000
;;;; Distribution: See the accompanying file COPYING.
;;;;
;;;; $Id: image.lisp,v 1.31 2004/05/24 19:05:59 ffjeld Exp $
;;;; $Id: image.lisp,v 1.32 2004/06/01 13:42:06 ffjeld Exp $
;;;;
;;;;------------------------------------------------------------------
......@@ -455,11 +455,11 @@
(((:enum :byte (2 3))
:inactive 0
:restart-primitive-function 1) ; data = slot-offset of pf.
((:bits) :reset-status-p 7
:eax 8
:ebx 9
:ecx 10
:edx 11)
((:bits) :reset-status-p 8
:eax 9
:ebx 10
:ecx 11
:edx 12)
((:numeric :data 16 16))))
:initform '(:inactive))
(atomically-registers
......@@ -477,11 +477,13 @@
(cons :reset-status-p
(if reset-status-p 1 0))
(cons :data
(truncate (+ (tag :null)
(bt:slot-offset 'movitz-constant-block
(intern (symbol-name pf-name)
:movitz)))
4))
(if (not pf-name)
0
(truncate (+ (tag :null)
(bt:slot-offset 'movitz-constant-block
(intern (symbol-name pf-name)
:movitz)))
4)))
registers)))
(defmethod movitz-object-offset ((obj movitz-constant-block)) 0)
......
......@@ -10,7 +10,7 @@
;;;; Author: Frode Vatvedt Fjeld <frodef@acm.org>
;;;; Created at: Sat Feb 21 17:48:32 2004
;;;;
;;;; $Id: los0-gc.lisp,v 1.12 2004/05/24 19:32:46 ffjeld Exp $
;;;; $Id: los0-gc.lisp,v 1.13 2004/06/01 13:42:14 ffjeld Exp $
;;;;
;;;;------------------------------------------------------------------
......@@ -61,7 +61,7 @@
`(with-inline-assembly (:returns :eax)
retry-cons
;; Set up thread-atomical execution
(:locally (:movl ,(movitz::atomically-status-simple-pf 'fast-cons)
(:locally (:movl ,(movitz::atomically-status-simple-pf 'fast-cons t)
(:edi (:edi-offset atomically-status))))
(:locally (:movl (:edi (:edi-offset nursery-space)) :edx))
(:movl (:edx 2) :ecx)
......
......@@ -10,7 +10,7 @@
;;;; Author: Frode Vatvedt Fjeld <frodef@acm.org>
;;;; Created at: Wed Apr 7 01:50:03 2004
;;;;
;;;; $Id: interrupt.lisp,v 1.7 2004/04/18 23:17:58 ffjeld Exp $
;;;; $Id: interrupt.lisp,v 1.8 2004/06/01 13:42:19 ffjeld Exp $
;;;;
;;;;------------------------------------------------------------------
......@@ -164,18 +164,26 @@
restart-atomical-block
(:cmpb ,(bt:enum-value 'movitz::atomically-status :restart-primitive-function) :cl)
(:jne 'not-simple-atomical-pf-restart)
(:cmpb 0 :ch) ; map of registers to restore
(:testl ,(bt:enum-value 'movitz::atomically-status '(:eax :ebx :ecx :edx))
:ecx) ; map of registers to restore
(:jnz 'not-simple-atomical-pf-restart)
(:sarl 16 :ecx) ; move atomically-status data into ECX
(:movl (:edi (:ecx 4) ,(- (movitz:tag :null)))
:ecx) ; This is the EIP to restart
(:movl :ecx (:ebp 20))
(:movl (:ebp -32) :ecx)
(:testl ,(bt:enum-value 'movitz::atomically-status :reset-status-p)
:ecx) ; Should we reset status to zero?
(:jnz 'normal-return)
(:xorl :ecx :ecx) ; Do reset status to zero.
(:jmp 'normal-return)
not-simple-atomical-pf-restart
;; Don't know what to do.
(:halt)
(:int 90)
(:jmp 'not-simple-atomical-pf-restart)
)))))
)))
(do-it)))
(defvar *last-interrupt-frame* nil)
......
......@@ -10,7 +10,7 @@
;;;; Author: Frode Vatvedt Fjeld <frodef@acm.org>
;;;; Created at: Fri Aug 24 11:39:37 2001
;;;;
;;;; $Id: procfs-image.lisp,v 1.4 2004/04/06 14:35:36 ffjeld Exp $
;;;; $Id: procfs-image.lisp,v 1.5 2004/04/14 12:11:32 ffjeld Exp $
;;;;
;;;;------------------------------------------------------------------
......@@ -177,7 +177,7 @@
(loop with unknown-counter = 0
for stack-frame = (current-stack-frame) then (previous-stack-frame stack-frame)
unless (zerop (mod stack-frame 4))
do (format t "[#x~8,'0x]" stack-frame)
do (format t "[frame #x~8,'0x]" stack-frame)
and do (loop-finish)
do (let ((movitz-name (funobj-name (stack-frame-funobj stack-frame))))
(typecase movitz-name
......@@ -191,7 +191,8 @@
(edi (get-word (+ (* 4 (interrupt-frame-index :edi)) stack-frame)))
(eip (get-word (+ (* 4 (interrupt-frame-index :eip)) stack-frame)))
(exception (get-word (+ (* 4 (interrupt-frame-index :exception)) stack-frame))))
(when r (format t " (ret #x~X {EAX: #x~X, ECX: #x~X, EDI: #x~X, EIP: #x~X, exception ~D})"
(when r (format t "#x~X (ret #x~X {EAX: #x~X, ECX: #x~X, EDI: #x~X, EIP: #x~X, exception ~D})"
stack-frame
r eax ecx edi eip exception))))
(movitz-symbol
(let ((name (movitz-print movitz-name)))
......
......@@ -10,7 +10,7 @@
;;;; Author: Frode Vatvedt Fjeld <frodef@acm.org>
;;;; Created at: Mon Aug 27 14:46:50 2001
;;;;
;;;; $Id: stream-image.lisp,v 1.4 2004/03/31 16:34:47 ffjeld Exp $
;;;; $Id: stream-image.lisp,v 1.5 2004/05/24 14:58:07 ffjeld Exp $
;;;;
;;;;------------------------------------------------------------------
......@@ -79,7 +79,7 @@
(read-binary 'movitz-symbol (image-stream image)))
(:other
(setf (image-stream-position image)
(+ 4 (extract-pointer word)))
(+ 0 (extract-pointer word)))
(let* ((type-code (read-binary 'u8 (image-stream image)))
(type-tag (enum-symbolic-value 'other-type-byte type-code)))
(setf (image-stream-position image)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment