Basic constructor macro for literal-signed structures.
(make-literal-signed [:val <val>] [:size <size>])
This is the usual way to construct literal-signed structures. It simply conses together a structure with the specified fields.
This macro generates a new literal-signed structure from scratch. See also change-literal-signed, which can "change" an existing structure, instead.
This is an ordinary
Macro:
(defmacro make-literal-signed (&rest args) (std::make-aggregate 'literal-signed args '((:val) (:size)) 'make-literal-signed nil))
Function:
(defun literal-signed (val size) (declare (xargs :guard (and (natp val) (bitsizep size)))) (declare (xargs :guard t)) (let ((__function__ 'literal-signed)) (declare (ignorable __function__)) (b* ((val (mbe :logic (nfix val) :exec val)) (size (mbe :logic (bitsize-fix size) :exec size))) (cons :signed (list val size)))))