- (let ((size (+ length closure-info-offset)))
- (inst li (logior (ash (1- size) type-bits) closure-header-type) temp)
- (pseudo-atomic (:extra (pad-data-block size))
- (inst bis alloc-tn fun-pointer-type result)
- (storew temp result 0 fun-pointer-type))
- (storew function result closure-fun-slot fun-pointer-type))))
+ (let* ((size (+ length closure-info-offset))
+ (alloc-size (pad-data-block size))
+ (dx-p (node-stack-allocate-p node)))
+ (inst li
+ (logior (ash (1- size) n-widetag-bits) closure-header-widetag)
+ temp)
+ (pseudo-atomic (:extra (if dx-p 0 alloc-size))
+ (cond (dx-p
+ ;; no need to align CSP: FUN-POINTER-LOWTAG already has
+ ;; the corresponding bit set
+ (inst bis csp-tn fun-pointer-lowtag result)
+ (inst lda csp-tn alloc-size csp-tn))
+ (t
+ (inst bis alloc-tn fun-pointer-lowtag result)))
+ (storew temp result 0 fun-pointer-lowtag))
+ (storew function result closure-fun-slot fun-pointer-lowtag))))