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