+(defmacro define-mod-binop ((name prototype) function)
+ `(define-vop (,name ,prototype)
+ (:args (x :target r :scs (unsigned-reg signed-reg)
+ :load-if (not (and (or (sc-is x unsigned-stack)
+ (sc-is x signed-stack))
+ (or (sc-is y unsigned-reg)
+ (sc-is y signed-reg))
+ (or (sc-is r unsigned-stack)
+ (sc-is r signed-stack))
+ (location= x r))))
+ (y :scs (unsigned-reg signed-reg unsigned-stack signed-stack)))
+ (:arg-types untagged-num untagged-num)
+ (:results (r :scs (unsigned-reg signed-reg) :from (:argument 0)
+ :load-if (not (and (or (sc-is x unsigned-stack)
+ (sc-is x signed-stack))
+ (or (sc-is y unsigned-reg)
+ (sc-is y unsigned-reg))
+ (or (sc-is r unsigned-stack)
+ (sc-is r unsigned-stack))
+ (location= x r)))))
+ (:result-types unsigned-num)
+ (:translate ,function)))
+(defmacro define-mod-binop-c ((name prototype) function)
+ `(define-vop (,name ,prototype)
+ (:args (x :target r :scs (unsigned-reg signed-reg)
+ :load-if (not (and (or (sc-is x unsigned-stack)
+ (sc-is x signed-stack))
+ (or (sc-is r unsigned-stack)
+ (sc-is r signed-stack))
+ (location= x r)))))
+ (:info y)
+ (:arg-types untagged-num (:constant (or (unsigned-byte 31) (signed-byte 32))))
+ (:results (r :scs (unsigned-reg signed-reg) :from (:argument 0)
+ :load-if (not (and (or (sc-is x unsigned-stack)
+ (sc-is x signed-stack))
+ (or (sc-is r unsigned-stack)
+ (sc-is r unsigned-stack))
+ (location= x r)))))
+ (:result-types unsigned-num)
+ (:translate ,function)))
+