Changeset 14036 for branches


Ignore:
Timestamp:
Jul 24, 2010, 11:35:09 PM (9 years ago)
Author:
gb
Message:

Better ISTRUCT-TYPEP; other small changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/arm/compiler/ARM/arm2.lisp

    r14015 r14036  
    120120(defvar *arm2-woi* nil)
    121121(defvar *arm2-open-code-inline* nil)
     122(defvar *arm2-optimize-for-space* nil)
    122123(defvar *arm2-register-restore-count* 0)
    123124(defvar *arm2-register-restore-ea* nil)
     
    360361           (*next-lcell-id* -1)
    361362           (*arm2-open-code-inline* nil)
     363           (*arm2-optimize-for-space* nil)
    362364           (*arm2-register-restore-count* nil)
    363365           (*arm2-compiler-register-save-label* nil)
     
    11541156
    11551157
    1156 
     1158(defun arm2-register-for-frame-offset (offset &optional suggested)
     1159  (let* ((mask *arm2-gpr-locations-valid-mask*)
     1160         (info *arm2-gpr-locations*))
     1161    (if (and suggested
     1162             (logbitp suggested mask)
     1163             (memq offset (svref info suggested)))
     1164      suggested
     1165      (dotimes (reg 16)
     1166        (when (and (logbitp reg mask)
     1167                   (memq offset (svref info reg)))
     1168          (return reg))))))
     1169
     1170 
    11571171
    11581172
     
    11631177           (mask *arm2-gpr-locations-valid-mask*)
    11641178           (info *arm2-gpr-locations*)
    1165            (regno (%hard-regspec-value reg)))
    1166       (unless (and (logbitp regno mask)
    1167                    (memq offset (svref info regno)))
    1168         (let* ((other (dotimes (i 16)
    1169                         (when (and (logbitp i mask)
    1170                                    (memq offset (svref info i)))
    1171                           (return i)))))
    1172           (cond (other
     1179           (regno (%hard-regspec-value reg))
     1180           (other (arm2-register-for-frame-offset offset regno)))
     1181      (unless (eql regno other)
     1182        (cond (other
    11731183                 (let* ((vinsn (! copy-node-gpr reg other)))
    11741184                   (setq *arm2-gpr-locations-valid-mask*
     
    11821192                         (logior mask (ash 1 regno)))
    11831193                   (setf (svref info regno) (list offset))
    1184                    vinsn))))))))
     1194                   vinsn)))))))
    11851195
    11861196(defun arm2-lcell-to-register (seg lcell reg)
     
    23262336  ; tradeoff.
    23272337  (with-arm-local-vinsn-macros (seg)
     2338    (if *arm2-optimize-for-space*
     2339      (if jump-p
     2340        (! jump-known-symbol-ool)
     2341        (! call-known-symbol-ool))
    23282342      (if jump-p
    23292343        (! jump-known-symbol)
    2330         (! call-known-symbol arm::arg_z))))
     2344        (! call-known-symbol arm::arg_z)))))
    23312345
    23322346;;; Nargs = nil -> multiple-value case.
     
    48254839       (setf (vinsn-label-info lab) (arm::emit-lap-label header lab))))))
    48264840
     4841
    48274842(defun arm2-expand-vinsns (header current sections)
    48284843  (do-dll-nodes (v header)
     
    54725487  (multiple-value-bind (cr-bit true-p) (acode-condition-to-arm-cr-bit cc)
    54735488    (multiple-value-bind (r1 r2) (arm2-two-untargeted-reg-forms seg form arm::arg_y type arm::arg_z)
    5474       (with-imm-target  () (target :signed-natural)
    5475         (! istruct-typep target r1 r2)
    5476         (arm2-test-reg-%izerop seg vreg xfer target cr-bit true-p 0)))))
     5489      (! istruct-type r1 r1)
     5490      (arm2-compare-registers seg vreg xfer r1 r2 cr-bit true-p))))
    54775491
    54785492(pushnew (%nx1-operator lisptag) *arm2-operator-supports-u8-target*)
Note: See TracChangeset for help on using the changeset viewer.