X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fcross-byte.lisp;h=319ad7d4308755bb34d1d6c1ac213fad3556f85c;hb=0223f43d5f199914ebceff12b6f4c60448369edd;hp=4b6f4a225a8faa5c9a1a96ff985d6593b60600f7;hpb=cb79d726de3e18c660f84c58a43f00d22b459037;p=sbcl.git diff --git a/src/code/cross-byte.lisp b/src/code/cross-byte.lisp index 4b6f4a2..319ad7d 100644 --- a/src/code/cross-byte.lisp +++ b/src/code/cross-byte.lisp @@ -39,25 +39,20 @@ (defun sb!xc:deposit-field (new cross-byte int) (cl:deposit-field new (uncross-byte cross-byte) int)) -(defun sb!c::mask-signed-field (size integer) - (if (logbitp (1- size) integer) - (dpb integer (byte size 0) -1) - (ldb (byte size 0) integer))) - (define-setf-expander sb!xc:ldb (cross-byte int &environment env) (multiple-value-bind (temps vals stores store-form access-form) (get-setf-expansion int env) (when (cdr stores) (bug "SETF SB!XC:LDB too hairy!")) (let ((btemp (gensym)) - (store (gensym))) + (store (gensym))) (values (cons btemp temps) - (cons cross-byte vals) - (list store) - `(let ((,(car stores) (cl:dpb ,store (uncross-byte ,btemp) ,access-form))) - ,store-form - ,store) - `(cl:ldb (uncross-byte ,btemp) ,access-form))))) + (cons cross-byte vals) + (list store) + `(let ((,(car stores) (cl:dpb ,store (uncross-byte ,btemp) ,access-form))) + ,store-form + ,store) + `(cl:ldb (uncross-byte ,btemp) ,access-form))))) (define-setf-expander sb!xc:mask-field (cross-byte int &environment env) (multiple-value-bind (temps vals stores store-form access-form) @@ -65,11 +60,11 @@ (when (cdr stores) (bug "SETF SB!XC:MASK-FIELD too hairy!")) (let ((btemp (gensym)) - (store (gensym))) + (store (gensym))) (values (cons btemp temps) - (cons cross-byte vals) - (list store) - `(let ((,(car stores) (cl:deposit-field ,store (uncross-byte ,btemp) ,access-form))) - ,store-form - ,store) - `(cl:mask-field (uncross-byte ,btemp) ,access-form))))) + (cons cross-byte vals) + (list store) + `(let ((,(car stores) (cl:deposit-field ,store (uncross-byte ,btemp) ,access-form))) + ,store-form + ,store) + `(cl:mask-field (uncross-byte ,btemp) ,access-form)))))