Basic constructor macro for instr-store structures.
(make-instr-store [:funct <funct>] [:rs1 <rs1>] [:rs2 <rs2>] [:imm <imm>])
This is the usual way to construct instr-store structures. It simply conses together a structure with the specified fields.
This macro generates a new instr-store structure from scratch. See also change-instr-store, which can "change" an existing structure, instead.
This is an ordinary
Macro:
(defmacro make-instr-store (&rest args) (std::make-aggregate 'instr-store args '((:funct) (:rs1) (:rs2) (:imm)) 'make-instr-store nil))
Function:
(defun instr-store (funct rs1 rs2 imm) (declare (xargs :guard (and (store-funct-p funct) (ubyte5p rs1) (ubyte5p rs2) (ubyte12p imm)))) (declare (xargs :guard t)) (let ((__function__ 'instr-store)) (declare (ignorable __function__)) (b* ((funct (mbe :logic (store-funct-fix funct) :exec funct)) (rs1 (mbe :logic (ubyte5-fix rs1) :exec rs1)) (rs2 (mbe :logic (ubyte5-fix rs2) :exec rs2)) (imm (mbe :logic (ubyte12-fix imm) :exec imm))) (cons :store (list funct rs1 rs2 imm)))))