Ignore:
Timestamp:
Jul 25, 2010, 8:59:17 PM (9 years ago)
Author:
gb
Message:

Split ARM instructions into two 16-bit halves, to try to reduce
incidental consing in the assembler.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/arm/compiler/ARM/arm-lap.lisp

    r13981 r14042  
    8585
    8686
    87 
     87#+big-endian-host
     88(defun set-arm-code-vector-word (code-vector i insn)
     89  (setf (uvref code-vector i)
     90        (logior (ash (arm::lap-instruction-opcode-high insn) 16)
     91                         (arm::lap-instruction-opcode-low insn))))
     92
     93#+little-endian-host
     94(defun set-arm-code-vector-word (code-vector i insn)
     95  (declare (type (simple-array (unsigned-byte 16) (*)) code-vector)
     96           (fixnum i)
     97           (optimize (speed 3) (safety 0)))
     98  (let* ((j (+ i i)))
     99    (declare (fixnum j))
     100    (setf (aref code-vector j) (arm::lap-instruction-opcode-low insn)
     101          (aref code-vector (the fixnum (1+ j)))
     102          (arm::lap-instruction-opcode-high insn))))
     103   
     104 
    88105
    89106
     
    110127      (do-dll-nodes (insn seg)
    111128        (unless (eql (arm::instruction-element-size insn) 0)
    112           (setf (uvref code-vector i) (arm::lap-instruction-opcode insn))
     129          (set-arm-code-vector-word code-vector i insn)
    113130          (incf i)))
    114131      (dolist (immpair arm::*arm-constants*)
     
    142159       (arm::emit-lap-instruction-element
    143160        (let* ((insn (arm::make-lap-instruction nil)))
    144           (setf (arm::lap-instruction-opcode insn) (logand #xffffffff (eval arg)))
     161          (arm::set-field-value insn (byte 32 0) (logand #xffffffff (eval arg)))
    145162          insn)
    146163        current))
     
    148165      (:single
    149166       (check-usage :single)
    150        (append-dll-node
     167       (arm::emit-lap-instruction-element
    151168        (let* ((insn (arm::make-lap-instruction nil)))
    152           (setf (arm::lap-instruction-opcode insn) (single-float-bits (float (eval arg) 0.0f0)))
     169          (arm::set-field-value insn (byte 32 0) (single-float-bits (float (eval arg) 0.0f0)))
    153170          insn)
    154171        current))
     
    158175         (let* ((insnlow (arm::make-lap-instruction nil))
    159176                (insnhigh (arm::make-lap-instruction nil)))
    160            (setf (arm::lap-instruction-opcode insnlow) low
    161                  (arm::lap-instruction-opcode insnhigh) high)
    162            (append-dll-node insnlow current)
    163            (append-dll-node insnhigh current)))))
     177           (arm::set-field-value insnlow (byte 32 0) low)
     178           (arm::set-field-value insnhigh (byte 32 0) high)
     179           (arm::emit-lap-instruction-element insnlow current)
     180           (arm::emit-lap-instruction-element insnhigh current)))))
    164181    current))
    165182       
Note: See TracChangeset for help on using the changeset viewer.