changes relative to sbcl-1.1.8:
* enchancement: disassemble now annotates some previously missing static
functions, like LENGTH.
+ * optimization: calls to static functions on x86-64 use less instructions.
changes in sbcl-1.1.8 relative to sbcl-1.1.7:
* notice: The implementation of MAP-ALLOCATED-OBJECTS (the heart of
(defmacro popw (ptr &optional (slot 0) (lowtag 0))
`(inst pop (make-ea-for-object-slot ,ptr ,slot ,lowtag)))
+
+(defun call-indirect (offset)
+ (let ((ea (make-ea :qword :disp offset)))
+ (cond ((immediate32-p offset)
+ (inst call ea))
+ (t
+ (inst mov temp-reg-tn ea)
+ (inst call temp-reg-tn)))))
\f
;;;; macros to generate useful values
static-fun-template)
(:args ,@(args))
,@(temps)
- (:temporary (:sc unsigned-reg) call-target)
(:results ,@(results))
(:node-var ,node)
(:generator ,(+ 50 num-args num-results)
;; longer executed? Does it not depend on the
;; 1+3=4=fdefn_raw_address_offset relationship above?
;; Is something else going on?)
-
- ;; Need to load the target address into a register, since
- ;; immediate call arguments are just a 32-bit displacement,
- ;; which obviously can't work with >4G spaces.
- (inst mov call-target
- (make-ea :qword
- :disp (+ nil-value (static-fun-offset function))))
- (inst call call-target)
+ (call-indirect (+ nil-value (static-fun-offset function)))
,(collect ((bindings) (links))
(do ((temp (temp-names) (cdr temp))
(name 'values (gensym))