+ (define-vop (,name float-op)
+ (:args (x :scs (,sc ,constant-sc)
+ :target r
+ :load-if (not (sc-is x ,constant-sc)))
+ (y :scs (,sc ,constant-sc)
+ :load-if (not (sc-is y ,constant-sc))))
+ (:results (r :scs (,sc)))
+ (:arg-types ,ptype ,ptype)
+ (:result-types ,ptype))
+ (define-vop (,comm-name float-op)
+ (:args (x :scs (,sc ,constant-sc)
+ :target r
+ :load-if (not (sc-is x ,constant-sc)))
+ (y :scs (,sc ,constant-sc)
+ :target r
+ :load-if (not (sc-is y ,constant-sc))))
+ (:results (r :scs (,sc)))
+ (:arg-types ,ptype ,ptype)
+ (:result-types ,ptype)))))
+ (frob single-float-op single-float-comm-op
+ single-reg fp-single-immediate single-float)
+ (frob double-float-op double-float-comm-op
+ double-reg fp-double-immediate double-float)
+ (frob complex-single-float-op complex-single-float-comm-op
+ complex-single-reg fp-complex-single-immediate
+ complex-single-float)
+ (frob complex-double-float-op complex-double-float-comm-op
+ complex-double-reg fp-complex-double-immediate
+ complex-double-float))
+
+(macrolet ((generate (opinst commutative constant-sc load-inst)
+ `(flet ((get-constant (tn &optional maybe-aligned)
+ (declare (ignorable maybe-aligned))
+ (let ((value (tn-value tn)))
+ ,(if (eq constant-sc 'fp-complex-single-immediate)
+ `(if maybe-aligned
+ (register-inline-constant
+ :aligned value)
+ (register-inline-constant value))
+ `(register-inline-constant value)))))
+ (declare (ignorable #'get-constant))