(write1-memory-unsigned32 addr val stat1 feat) → *
Function:
(defun write1-memory-unsigned32 (addr val stat1 feat) (declare (xargs :stobjs (stat1))) (declare (xargs :non-executable t :guard (and (stat1p stat1) (b* ((stat (stat-from-stat1 stat1))) (and (integerp addr) (ubyte32p val) (statp stat) (featp feat) (stat-validp stat feat)))))) (prog2$ (acl2::throw-nonexec-error 'write1-memory-unsigned32 (list addr val stat1 feat)) (let ((__function__ 'write1-memory-unsigned32)) (declare (ignorable __function__)) (if (mbt (stat1p stat1)) (stat1-from-stat (b* ((stat (stat-from-stat1 stat1))) (let* ((val (ubyte32-fix val)) (b0 (bitops::part-select-width-low val 8 0)) (b1 (bitops::part-select-width-low val 8 8)) (b2 (bitops::part-select-width-low val 8 16)) (b3 (bitops::part-select-width-low val 8 24))) (mv-let (1st-byte 2nd-byte 3rd-byte 4th-byte) (if (feat-little-endianp feat) (mv b0 b1 b2 b3) (mv b3 b2 b1 b0)) (let* ((stat (write-memory-unsigned8 addr 1st-byte stat feat)) (stat (write-memory-unsigned8 (+ (lifix addr) 1) 2nd-byte stat feat)) (stat (write-memory-unsigned8 (+ (lifix addr) 2) 3rd-byte stat feat)) (stat (write-memory-unsigned8 (+ (lifix addr) 3) 4th-byte stat feat))) stat))))) stat1))))