Skip to content
Snippets Groups Projects
Commit f37f03a6 authored by toy's avatar toy
Browse files

The pseudo-atomic flag was set/reset using add/sub. Replace this with

or/andn, so we don't inadvertently reset pseudo-atomic by adding the
flag, thinking we're setting it.  (Granted, this probably means we
were already doing something wrong, but this will make it a bit more
robust.)
parent 55c3e8e3
No related branches found
No related tags found
No related merge requests found
......@@ -5,11 +5,11 @@
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
(ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/sparc/macros.lisp,v 1.26 2003/10/09 19:04:28 toy Exp $")
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/sparc/macros.lisp,v 1.27 2003/10/16 16:25:19 toy Exp $")
;;;
;;; **********************************************************************
;;;
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/sparc/macros.lisp,v 1.26 2003/10/09 19:04:28 toy Exp $
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/sparc/macros.lisp,v 1.27 2003/10/16 16:25:19 toy Exp $
;;;
;;; This file contains various useful macros for generating SPARC code.
;;;
......@@ -574,14 +574,14 @@
`(progn
;; Set the pseudo-atomic flag
(without-scheduling ()
(inst add alloc-tn pseudo-atomic-value))
(inst or alloc-tn pseudo-atomic-value))
,@forms
;; Reset the pseudo-atomic flag
(without-scheduling ()
;; Remove the pseudo-atomic flag. (Could do subtraction here,
;; but the disassembler prints some notes based on the add
;; instruction.)
(inst add alloc-tn (- pseudo-atomic-value))
(inst andn alloc-tn pseudo-atomic-value)
;; Check to see if pseudo-atomic interrupted flag is set (bit 0 = 1)
(inst andcc zero-tn alloc-tn pseudo-atomic-interrupted-value)
;; The C code needs to process this correctly and fixup alloc-tn.
......
......@@ -105,7 +105,7 @@ _call_into_lisp:
load(_current_control_frame_pointer, reg_OCFP)
/* No longer atomic, and check for interrupt. */
sub reg_ALLOC, pseudo_atomic_Value, reg_ALLOC
andn reg_ALLOC, pseudo_atomic_Value, reg_ALLOC
andcc reg_ALLOC, pseudo_atomic_InterruptedValue, reg_ZERO
tne trap_PseudoAtomic
......@@ -141,7 +141,7 @@ lra:
mov reg_A0, %i0
/* Turn on pseudo_atomic */
add reg_ALLOC, pseudo_atomic_Value, reg_ALLOC
or reg_ALLOC, pseudo_atomic_Value, reg_ALLOC
/* Store LISP state */
andn reg_ALLOC, lowtag_Mask, reg_NL1
......@@ -154,7 +154,7 @@ lra:
store(reg_NL1,_foreign_function_call_active)
/* Were we interrupted? */
sub reg_ALLOC, pseudo_atomic_Value, reg_ALLOC
andn reg_ALLOC, pseudo_atomic_Value, reg_ALLOC
andcc reg_ALLOC, pseudo_atomic_InterruptedValue, reg_ZERO
tne trap_PseudoAtomic
......@@ -185,7 +185,7 @@ _call_into_c:
st reg_CODE, [reg_CFP+8]
/* Turn on pseudo-atomic. */
add reg_ALLOC, pseudo_atomic_Value, reg_ALLOC
or reg_ALLOC, pseudo_atomic_Value, reg_ALLOC
/* Convert the return address to an offset and save it on the stack. */
sub reg_LIP, reg_CODE, reg_L0
......@@ -206,7 +206,7 @@ _call_into_c:
store(reg_CSP,_foreign_function_call_active)
/* Were we interrupted? */
sub reg_ALLOC, pseudo_atomic_Value, reg_ALLOC
andn reg_ALLOC, pseudo_atomic_Value, reg_ALLOC
andcc reg_ALLOC, pseudo_atomic_InterruptedValue, reg_ZERO
tne trap_PseudoAtomic
......@@ -244,7 +244,7 @@ _call_into_c:
sub reg_LIP, type_OtherPointer, reg_LIP
/* No longer atomic. */
sub reg_ALLOC, pseudo_atomic_Value, reg_ALLOC
andn reg_ALLOC, pseudo_atomic_Value, reg_ALLOC
andcc reg_ALLOC, pseudo_atomic_InterruptedValue, reg_ZERO
tne trap_PseudoAtomic
......
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