- ;;
- ;; FIXME: Note that the below shebang read-time conditionals aren't
- ;; actually shebang. This is because the assembly files are also
- ;; built in warm-init, when #! is not a defined read-macro. This
- ;; problem will actually go away when we rewrite these low-level
- ;; bits and pieces to use the backend-subfeatures machinery, as we
- ;; will then conditionalize at code-emission time or assembly time
- ;; for the VOP and the assembly routine respectively. - CSR,
- ;; 2002-02-11
- #+:sparc-64
- ;; Sign extend y to a full 64-bits. temp was already
- ;; sign-extended by the sra instruction above.
- (progn
- (inst sra y 0)
- (inst mulx hi temp y)
- (inst move lo hi)
- (inst srax hi 32))
- #+(and (not :sparc-64) (or :sparc-v8 :sparc-v9))
- (progn
- (inst smul lo temp y)
- (inst rdy hi))
- #+(and (not :sparc-64) (not (or :sparc-v8 :sparc-v9)))
- (let ((MULTIPLIER-POSITIVE (gen-label)))
- (inst wry temp)
- (inst andcc hi zero-tn)
- (inst nop)
- (inst nop)
- (dotimes (i 32)
- (inst mulscc hi y))
- (inst mulscc hi zero-tn)
- (inst cmp x)
- (inst b :ge MULTIPLIER-POSITIVE)
- (inst nop)
- (inst sub hi y)
- (emit-label MULTIPLIER-POSITIVE)
- (inst rdy lo))
-
+ (cond
+ ((member :sparc-64 *backend-subfeatures*)
+ ;; Sign extend y to a full 64-bits. temp was already
+ ;; sign-extended by the sra instruction above.
+ (inst sra y 0)
+ (inst mulx hi temp y)
+ (inst move lo hi)
+ (inst srax hi 32))
+ ((or (member :sparc-v8 *backend-subfeatures*)
+ (member :sparc-v9 *backend-subfeatures*))
+ (inst smul lo temp y)
+ (inst rdy hi))
+ (t
+ (let ((MULTIPLIER-POSITIVE (gen-label)))
+ (inst wry temp)
+ (inst andcc hi zero-tn)
+ (inst nop)
+ (inst nop)
+ (dotimes (i 32)
+ (inst mulscc hi y))
+ (inst mulscc hi zero-tn)
+ (inst cmp x)
+ (inst b :ge MULTIPLIER-POSITIVE)
+ (inst nop)
+ (inst sub hi y)
+ (emit-label MULTIPLIER-POSITIVE)
+ (inst rdy lo))))