X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fhppa%2Fmacros.lisp;h=0a5e99140c232ed25d8ca03da25df6e8d6d88454;hb=69e6aef5e6fb3bd682c7a2cbf774034d2ea58ee8;hp=6e3af243b8ee41f09f61bea68cb3bf9d0098ecf1;hpb=0d74ed478e7f3af5d3292153726373763631aa8e;p=sbcl.git diff --git a/src/compiler/hppa/macros.lisp b/src/compiler/hppa/macros.lisp index 6e3af24..0a5e991 100644 --- a/src/compiler/hppa/macros.lisp +++ b/src/compiler/hppa/macros.lisp @@ -20,7 +20,7 @@ (,gensym)))) ;;; Instruction-like macros. -;;; FIX-lav: add if always-emit-code-p is :e= then error if location= +;;; FIXME-lav: add if always-emit-code-p is :e= then error if location= (defmacro move (src dst &optional always-emit-code-p) #!+sb-doc "Move SRC into DST (unless they are location= and ALWAYS-EMIT-CODE-P is nil)." @@ -41,7 +41,13 @@ (defmacro load-symbol (reg symbol) (once-only ((reg reg) (symbol symbol)) - `(inst addi (static-symbol-offset ,symbol) null-tn ,reg))) + `(let ((offset (static-symbol-offset ,symbol))) + (cond + ((typep offset '(signed-byte 11)) + (inst addi offset null-tn ,reg)) + (t + (inst ldil offset ,reg) + (inst ldo offset null-tn ,reg :unsigned t)))))) (defmacro load-symbol-value (reg symbol) `(inst ldw @@ -101,8 +107,8 @@ byte-ordering issues." "Emit a return-pc header word. LABEL is the label to use for this return-pc." `(progn - ; alignment causes the return point to land on two address, - ; where the first must be nop pad. + ;; alignment causes the return point to land on two address, + ;; where the first must be nop pad. (emit-alignment n-lowtag-bits) (emit-label ,label) (inst lra-header-word))) @@ -176,8 +182,8 @@ initializes the object." write-body) ,@body))))) -;; is used for stack allocation of dynamic-extent objects -; FIX-lav, if using defun, atleast surround in assembly-form ? macro better ? +;;; is used for stack allocation of dynamic-extent objects +;;; FIXME-lav, if using defun, atleast surround in assembly-form ? macro better ? (defun align-csp (temp) (declare (ignore temp)) (let ((aligned (gen-label)))