(,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)."
(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
"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)))
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)))