X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ftarget-sap.lisp;h=17f71910b4fa836b2541a097dc46f785f55acac6;hb=a6a12ed609d5467ec43b411283e5b3568fee81df;hp=edb3a1686907d4eff76ff9677381bfdd0701b171;hpb=179812c3ad5dad69239c625ec929a7d486cf568f;p=sbcl.git diff --git a/src/code/target-sap.lisp b/src/code/target-sap.lisp index edb3a16..17f7191 100644 --- a/src/code/target-sap.lisp +++ b/src/code/target-sap.lisp @@ -65,6 +65,14 @@ (fixnum offset)) (sap-ref-8 sap offset)) +(defun sap-ref-octets (sap offset count) + (declare (type system-area-pointer sap) + (fixnum offset count)) + (let ((buffer (make-array count :element-type '(unsigned-byte 8)))) + (dotimes (i count) + (setf (aref buffer i) (sap-ref-8 sap (+ offset i)))) + buffer)) + ;;; Return the 16-bit word at OFFSET bytes from SAP. (defun sap-ref-16 (sap offset) (declare (type system-area-pointer sap)