projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't scrub the C stack from C.
[sbcl.git]
/
src
/
compiler
/
x86
/
macros.lisp
diff --git
a/src/compiler/x86/macros.lisp
b/src/compiler/x86/macros.lisp
index
9789ec2
..
7386f77
100644
(file)
--- a/
src/compiler/x86/macros.lisp
+++ b/
src/compiler/x86/macros.lisp
@@
-290,7
+290,7
@@
;;;; error code
(defun emit-error-break (vop kind code values)
(assemble ()
;;;; error code
(defun emit-error-break (vop kind code values)
(assemble ()
- #!-darwin
+ #!-ud2-breakpoints
(inst int 3) ; i386 breakpoint instruction
;; CLH 20060314
;; On Darwin, we need to use #x0b0f instead of int3 in order
(inst int 3) ; i386 breakpoint instruction
;; CLH 20060314
;; On Darwin, we need to use #x0b0f instead of int3 in order
@@
-298,7
+298,7
@@
;; doesn't seem to be reliably firing SIGTRAP
;; handlers. Hopefully this will be fixed by Apple at a
;; later date.
;; doesn't seem to be reliably firing SIGTRAP
;; handlers. Hopefully this will be fixed by Apple at a
;; later date.
- #!+darwin
+ #!+ud2-breakpoints
(inst word #x0b0f)
;; The return PC points here; note the location for the debugger.
(when vop
(inst word #x0b0f)
;; The return PC points here; note the location for the debugger.
(when vop
@@
-350,18
+350,24
@@
(progn ,@forms)
(pseudo-atomic ,@forms)))
(progn ,@forms)
(pseudo-atomic ,@forms)))
+;;; Unsafely clear pa flags so that the image can properly lose in a
+;;; pa section.
+#!+sb-thread
+(defmacro %clear-pseudo-atomic ()
+ '(inst mov (make-ea :dword :disp (* 4 thread-pseudo-atomic-bits-slot)) 0 :fs))
+
#!+sb-thread
(defmacro pseudo-atomic (&rest forms)
(with-unique-names (label)
`(let ((,label (gen-label)))
#!+sb-thread
(defmacro pseudo-atomic (&rest forms)
(with-unique-names (label)
`(let ((,label (gen-label)))
- (inst or (make-ea :byte :disp (* 4 thread-pseudo-atomic-bits-slot))
- (fixnumize 1) :fs)
+ (inst mov (make-ea :dword :disp (* 4 thread-pseudo-atomic-bits-slot))
+ ebp-tn :fs)
,@forms
,@forms
- (inst xor (make-ea :byte :disp (* 4 thread-pseudo-atomic-bits-slot))
- (fixnumize 1) :fs)
+ (inst xor (make-ea :dword :disp (* 4 thread-pseudo-atomic-bits-slot))
+ ebp-tn :fs)
(inst jmp :z ,label)
(inst jmp :z ,label)
- ;; if PAI was set, interrupts were disabled at the same
- ;; time using the process signal mask.
+ ;; if PAI was set, interrupts were disabled at the same time
+ ;; using the process signal mask.
(inst break pending-interrupt-trap)
(emit-label ,label))))
(inst break pending-interrupt-trap)
(emit-label ,label))))
@@
-369,14
+375,14
@@
(defmacro pseudo-atomic (&rest forms)
(with-unique-names (label)
`(let ((,label (gen-label)))
(defmacro pseudo-atomic (&rest forms)
(with-unique-names (label)
`(let ((,label (gen-label)))
- (inst or (make-ea-for-symbol-value *pseudo-atomic-bits* :byte)
- (fixnumize 1))
+ (inst mov (make-ea-for-symbol-value *pseudo-atomic-bits* :dword)
+ ebp-tn)
,@forms
,@forms
- (inst xor (make-ea-for-symbol-value *pseudo-atomic-bits* :byte)
- (fixnumize 1))
+ (inst xor (make-ea-for-symbol-value *pseudo-atomic-bits* :dword)
+ ebp-tn)
(inst jmp :z ,label)
(inst jmp :z ,label)
- ;; if PAI was set, interrupts were disabled at the same
- ;; time using the process signal mask.
+ ;; if PAI was set, interrupts were disabled at the same time
+ ;; using the process signal mask.
(inst break pending-interrupt-trap)
(emit-label ,label))))
\f
(inst break pending-interrupt-trap)
(emit-label ,label))))
\f
@@
-540,10
+546,11
@@
Useful for e.g. foreign calls where another thread may trigger
collection."
(if objects
(let ((pins (make-gensym-list (length objects)))
collection."
(if objects
(let ((pins (make-gensym-list (length objects)))
- (wpo (block-gensym "WPO")))
+ (wpo (gensym "WITH-PINNED-OBJECTS-THUNK")))
;; BODY is stuffed in a function to preserve the lexical
;; environment.
`(flet ((,wpo () (progn ,@body)))
;; BODY is stuffed in a function to preserve the lexical
;; environment.
`(flet ((,wpo () (progn ,@body)))
+ (declare (muffle-conditions compiler-note))
;; PINS are dx-allocated in case the compiler for some
;; unfathomable reason decides to allocate value-cells
;; for them -- since we have DX value-cells on x86oid
;; PINS are dx-allocated in case the compiler for some
;; unfathomable reason decides to allocate value-cells
;; for them -- since we have DX value-cells on x86oid