- (move result null-tn))
- ((and star (= num 1))
- (move result (tn-ref-tn things)))
- (t
- (macrolet
- ((maybe-load (tn)
- (once-only ((tn tn))
- `(sc-case ,tn
- ((any-reg descriptor-reg zero null)
- ,tn)
- (control-stack
- (load-stack-tn temp ,tn)
- temp)))))
- (let* ((cons-cells (if star (1- num) num))
- (alloc (* (pad-data-block cons-size) cons-cells)))
- (pseudo-atomic (pa-flag :extra alloc)
- (inst clrrwi res alloc-tn n-lowtag-bits)
- (inst ori res res list-pointer-lowtag)
- (move ptr res)
- (dotimes (i (1- cons-cells))
- (storew (maybe-load (tn-ref-tn things)) ptr
- cons-car-slot list-pointer-lowtag)
- (setf things (tn-ref-across things))
- (inst addi ptr ptr (pad-data-block cons-size))
- (storew ptr ptr
- (- cons-cdr-slot cons-size)
- list-pointer-lowtag))
- (storew (maybe-load (tn-ref-tn things)) ptr
- cons-car-slot list-pointer-lowtag)
- (storew (if star
- (maybe-load (tn-ref-tn (tn-ref-across things)))
- null-tn)
- ptr cons-cdr-slot list-pointer-lowtag))
- (move result res)))))))
+ (move result null-tn))
+ ((and star (= num 1))
+ (move result (tn-ref-tn things)))
+ (t
+ (macrolet
+ ((maybe-load (tn)
+ (once-only ((tn tn))
+ `(sc-case ,tn
+ ((any-reg descriptor-reg zero null)
+ ,tn)
+ (control-stack
+ (load-stack-tn temp ,tn)
+ temp)))))
+ (let* ((dx-p (node-stack-allocate-p node))
+ (cons-cells (if star (1- num) num))
+ (alloc (* (pad-data-block cons-size) cons-cells)))
+ (pseudo-atomic (pa-flag)
+ (if dx-p
+ (progn
+ (align-csp res)
+ (inst clrrwi res csp-tn n-lowtag-bits)
+ (inst ori res res list-pointer-lowtag)
+ (inst addi csp-tn csp-tn alloc))
+ (allocation res alloc list-pointer-lowtag :temp-tn alloc-temp
+ :flag-tn pa-flag))
+ (move ptr res)
+ (dotimes (i (1- cons-cells))
+ (storew (maybe-load (tn-ref-tn things)) ptr
+ cons-car-slot list-pointer-lowtag)
+ (setf things (tn-ref-across things))
+ (inst addi ptr ptr (pad-data-block cons-size))
+ (storew ptr ptr
+ (- cons-cdr-slot cons-size)
+ list-pointer-lowtag))
+ (storew (maybe-load (tn-ref-tn things)) ptr
+ cons-car-slot list-pointer-lowtag)
+ (storew (if star
+ (maybe-load (tn-ref-tn (tn-ref-across things)))
+ null-tn)
+ ptr cons-cdr-slot list-pointer-lowtag))
+ (move result res)))))))