Basic constructor macro for vl-weirdint structures.
(make-vl-weirdint [:origwidth <origwidth>] [:bits <bits>] [:origtype <origtype>] [: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 '((:origwidth) (:bits) (:origtype) (:wasunsized)) 'make-vl-weirdint nil))
Function:
(defun vl-weirdint (origwidth bits origtype wasunsized) (declare (xargs :guard (and (posp origwidth) (vl-bitlist-p bits) (vl-exprtype-p origtype) (booleanp wasunsized)))) (declare (xargs :guard (equal (len bits) origwidth))) (let ((__function__ 'vl-weirdint)) (declare (ignorable __function__)) (b* ((origwidth (mbe :logic (pos-fix origwidth) :exec origwidth)) (bits (mbe :logic (vl-bitlist-fix bits) :exec bits)) (origtype (mbe :logic (vl-exprtype-fix origtype) :exec origtype)) (wasunsized (mbe :logic (acl2::bool-fix wasunsized) :exec wasunsized))) (let ((bits (mbe :logic (vl-nbits-fix origwidth bits) :exec bits))) (hons :vl-weirdint (std::prod-hons (std::prod-hons origwidth bits) (std::prod-hons origtype wasunsized)))))))