Basic constructor macro for vl-weirdint structures.
(make-vl-weirdint [:bits <bits>] [:origsign <origsign>] [:wasunsized <wasunsized>])
This is the usual way to construct vl-weirdint structures. It simply conses together a structure with the specified fields.
This macro generates a new vl-weirdint structure from scratch. See also change-vl-weirdint, which can "change" an existing structure, instead.
This is an ordinary
Macro:
(defmacro make-vl-weirdint (&rest args) (std::make-aggregate 'vl-weirdint args '((:bits) (:origsign) (:wasunsized)) 'make-vl-weirdint nil))
Function:
(defun vl-weirdint (bits origsign wasunsized) (declare (xargs :guard (and (vl-bitlist-p bits) (vl-exprsign-p origsign) (booleanp wasunsized)))) (declare (xargs :guard (consp bits))) (let ((__function__ 'vl-weirdint)) (declare (ignorable __function__)) (b* ((bits (mbe :logic (vl-bitlist-fix bits) :exec bits)) (origsign (mbe :logic (vl-exprsign-fix origsign) :exec origsign)) (wasunsized (mbe :logic (acl2::bool-fix wasunsized) :exec wasunsized))) (let ((bits (mbe :logic (vl-bitlist-nonempty-fix bits) :exec bits))) (hons :vl-weirdint (std::prod-hons bits (std::prod-hons origsign wasunsized)))))))