Basic constructor macro for sinteger-format structures.
(make-sinteger-format [:bits <bits>] [:signed <signed>] [:traps <traps>])
This is the usual way to construct sinteger-format structures. It simply conses together a structure with the specified fields.
This macro generates a new sinteger-format structure from scratch. See also change-sinteger-format, which can "change" an existing structure, instead.
This is an ordinary
Macro:
(defmacro make-sinteger-format (&rest args) (std::make-aggregate 'sinteger-format args '((:bits) (:signed) (:traps)) 'make-sinteger-format nil))
Function:
(defun sinteger-format (bits signed traps) (declare (xargs :guard (and (sinteger-bit-role-listp bits) (signed-formatp signed)))) (declare (xargs :guard (sinteger-bit-roles-wfp bits))) (let ((__function__ 'sinteger-format)) (declare (ignorable __function__)) (b* ((bits (mbe :logic (sinteger-bit-role-list-fix bits) :exec bits)) (signed (mbe :logic (signed-format-fix signed) :exec signed))) (let ((bits (mbe :logic (if (sinteger-bit-roles-wfp bits) bits (list (sinteger-bit-role-sign) (sinteger-bit-role-value 0))) :exec bits))) (list (cons 'bits bits) (cons 'signed signed) (cons 'traps traps))))))