(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)
(inst sub esi (fixnumize 1))
(inst rep)
(inst movs :qword)
+ (inst cld)
;; Load the register arguments carefully.
(loadw edx rbp-tn -1)
(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
(inst lea edi (make-ea :dword :base ebx :disp (- n-word-bytes)))
(inst rep)
(inst movs :dword)
-
- ;; solaris requires DF being zero.
- #!+sunos (inst cld)
+ (inst cld)
;; Restore the count.
(inst mov ecx edx)
(inst sub esi (fixnumize 1))
(inst rep)
(inst movs :dword)
-
- ;; solaris requires DF being zero.
- #!+sunos (inst cld)
+ (inst cld)
;; Load the register arguments carefully.
(loadw edx ebp-tn -1)
;; Restore EDI, and reset the stack.
(emit-label restore-edi)
(loadw rdi-tn rbx-tn (- (1+ 1)))
- (inst mov rsp-tn rbx-tn))))
+ (inst mov rsp-tn rbx-tn)
+ (inst cld))))
(values))
\f
;;;; unknown values receiving
(inst sub rcx 1)
(inst jmp :nz loop)
;; NIL out the last cons.
- (storew nil-value dst 1 list-pointer-lowtag))
+ (storew nil-value dst 1 list-pointer-lowtag)
+ (inst cld))
(emit-label done))))
;;; Return the location and size of the &MORE arg glob created by
(inst std)
(inst rep)
(inst movs :qword)
-
+ (inst cld)
DONE
;; Reset the CSP at last moved arg.
(inst lea rsp-tn (make-ea :qword :base rdi :disp n-word-bytes))))
(inst movs :qword)
(inst cmp rsp-tn rsi)
(inst jmp :be LOOP)
+ (inst cld)
DONE
(inst lea rsp-tn (make-ea :qword :base rdi :disp n-word-bytes))
(inst sub rdi rsi)
;; Restore EDI, and reset the stack.
(emit-label restore-edi)
(loadw edi-tn ebx-tn (frame-word-offset 1))
- (inst mov esp-tn ebx-tn))))
+ (inst mov esp-tn ebx-tn)
+ (inst cld))))
(values))
\f
;;;; unknown values receiving
(inst sub ecx 1)
(inst jmp :nz loop)
;; NIL out the last cons.
- (storew nil-value dst 1 list-pointer-lowtag))
+ (storew nil-value dst 1 list-pointer-lowtag)
+ (inst cld))
(emit-label done))))
;;; Return the location and size of the &MORE arg glob created by
(inst std)
(inst rep)
(inst movs :dword)
-
+ (inst cld)
DONE
;; Reset the CSP at last moved arg.
(inst lea esp-tn (make-ea :dword :base edi :disp n-word-bytes))))
(inst movs :dword)
(inst cmp esp-tn esi)
(inst jmp :be loop)
+ (inst cld)
DONE
(inst lea esp-tn (make-ea :dword :base edi :disp n-word-bytes))
(inst sub edi esi)
.globl GNAME(call_into_c)
TYPE(GNAME(call_into_c))
GNAME(call_into_c):
- /* ABI requires that the direction flag be clear on function
- * entry and exit. */
- cld
push %rbp # Save old frame pointer.
mov %rsp,%rbp # Establish new frame.
pop %r12
pop %rbx
- /* ABI requires that the direction flag be clear on function
- * entry and exit. */
- cld
-
/* FIXME Restore the NPX state. */
/* return value is already in rax where lisp expects it */
fstp %st(0)
fstp %st(0)
- cld # clear out DF: Darwin, Solaris and Win32 at
- # least need this, and it should not hurt others
-
call *%eax # normal callout using Lisp stack
movl %eax,%ecx # remember integer return value
andl $0xfffffff0,%esp; /* Align stack */ \
pushl $0; /* Padding */ \
pushl size; /* Argument to alloc */ \
- cld; /* Clear DF */ \
call GNAME(alloc); \
movl %ebp,%esp; /* Restore ESP from EBP */ \
popl %ebp; /* Restore EBP */
#else
#define ALLOC(size) \
pushl size; /* Argument to alloc */ \
- cld; /* Clear DF */ \
call GNAME(alloc); \
addl $4,%esp; /* Pop argument */
#endif
xor %eax, %eax /* Zero EAX */
shr $2, %ecx /* Amount of 4-byte blocks to copy */
jz Lend_base
- cld /* Set direction of STOSL to increment */
rep
stosl /* Store EAX to *EDI, ECX times, incrementing
(sb-ext:code-deletion-note (e)
(error e)))
+;;; unknown values return convention getting disproportionate
+;;; amounts of values.
+(declaim (notinline one-value two-values))
+(defun one-value (x)
+ (not x))
+(defun two-values (x y)
+ (values y x))
+(defun wants-many-values (x y)
+ (multiple-value-bind (a b c d e f)
+ (one-value y)
+ (assert (and (eql (not y) a)
+ (not (or b c d e f)))))
+ (multiple-value-bind (a b c d e f)
+ (two-values y x)
+ (assert (and (eql a x) (eql b y)
+ (not (or c d e f)))))
+ (multiple-value-bind (a b c d e f g h i)
+ (one-value y)
+ (assert (and (eql (not y) a)
+ (not (or b c d e f g h i)))))
+ (multiple-value-bind (a b c d e f g h i)
+ (two-values y x)
+ (assert (and (eql a x) (eql b y)
+ (not (or c d e f g h i)))))
+ (multiple-value-bind (a b c d e f g h i j k l m n o p q r s)
+ (one-value y)
+ (assert (and (eql (not y) a)
+ (not (or b c d e f g h i j k l m n o p q r s)))))
+ (multiple-value-bind (a b c d e f g h i j k l m n o p q r s)
+ (two-values y x)
+ (assert (and (eql a x) (eql b y)
+ (not (or c d e f g h i j k l m n o p q r s))))))
+(wants-many-values 1 42)
+
;;; success
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.15.14"
+"1.0.15.15"