Update of /cvsroot/sbcl/sbcl/src/assembly/x86-64
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv6648/src/assembly/x86-64
Modified Files:
assem-rtns.lisp
Log Message:
1.0.15.15: reset DF on x86 and x86-64 after every STD instead of when calling out
* Both the old and the new behaviour should be correct re C-ABI, but
this is much easier to audit. Thanks to Aurelien Jarno for the
initial patch.
* This should also fix the build on platforms with GCC 4.3 compiled
libc signal handling functions, which assume DF to be cleared.
** NOTE ** If kernel/libc does not arrange for DF to be cleared
before calling our handler and restore it afterwards, we can still
be broken by asynch signals on post 4.3 GCC libcs -- but this Is
Not Our Fault, We Think.
* Test-case suggested by Alistair Bridgewater for possible related
default-unknown-values problems on SunOS.
Index: assem-rtns.lisp
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/assembly/x86-64/assem-rtns.lisp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- assem-rtns.lisp 21 Jan 2008 14:46:52 -0000 1.7
+++ assem-rtns.lisp 5 Mar 2008 15:11:19 -0000 1.8
@@ -54,6 +54,7 @@
(inst lea edi (make-ea :qword :base ebx :disp (- n-word-bytes)))
(inst rep)
(inst movs :qword)
+ (inst cld)
;; Restore the count.
(inst mov ecx edx)
@@ -150,6 +151,7 @@
(inst sub esi (fixnumize 1))
(inst rep)
(inst movs :qword)
+ (inst cld)
;; Load the register arguments carefully.
(loadw edx rbp-tn -1)
@@ -169,10 +171,10 @@
(inst push ebx)
;; And jump into the function.
- (inst jmp
- (make-ea :byte :base eax
- :disp (- (* closure-fun-slot n-word-bytes)
- fun-pointer-lowtag)))
+ (inst jmp
+ (make-ea :byte :base eax
+ :disp (- (* closure-fun-slot n-word-bytes)
+ fun-pointer-lowtag)))
;; All the arguments fit in registers, so load them.
REGISTER-ARGS
|