Skip to content
Snippets Groups Projects
Commit e18d379f authored by wlott's avatar wlott
Browse files

Added load-symbol macro that will load one of the initial symbols into a

reg.

Changed pseudo-atomic macro to emit a break instruction when a pending
interrupt is detected.
parent 186bde03
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@
;;; Scott Fahlman (FAHLMAN@CMUC).
;;; **********************************************************************
;;;
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/macros.lisp,v 1.14 1990/02/22 16:59:27 wlott Exp $
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/macros.lisp,v 1.15 1990/02/23 20:22:09 wlott Exp $
;;;
;;; This file contains various useful macros for generating MIPS code.
;;;
......@@ -74,6 +74,10 @@
(t
(error "Constant ~D cannot be loaded." ,n-const)))))
(defmacro load-symbol (reg symbol)
`(inst addi ,reg null-tn (initial-symbol-offset ,symbol)))
;;; Load-Stack-TN, Store-Stack-TN -- Interface
;;;
......@@ -458,13 +462,12 @@
(defmacro pseudo-atomic ((ndescr-temp) &rest forms)
(let ((label (gensym "LABEL-")))
`(let ((,label (gen-label)))
(inst andi flags-tn flags-tn (lognot (ash 1 interrupted-flag)))
(inst ori flags-tn flags-tn (ash 1 atomic-flag))
,@forms
(inst andi flags-tn flags-tn (lognot (ash 1 atomic-flag)))
(inst andi ,ndescr-temp flags-tn (ash 1 interrupted-flag))
(inst beq ,ndescr-temp zero-tn ,label)
(nop)
(inst load-foreign-address ,ndescr-temp "interrupt_resumer")
(inst jr ,ndescr-temp)
(nop)
(inst break vm:pending-interrupt-trap)
(emit-label ,label))))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment