Changeset 10180


Ignore:
Timestamp:
Jul 22, 2008, 4:40:12 AM (11 years ago)
Author:
rme
Message:

A minor intermediate change that is supposed to ease bootstrapping
more substantial assembler changes. (There are no special bootstrapping
concerns with this commit.)

This just changes the names of some special variables that hold
assembler data (opcode templates, registers).

Keep LAP macros in the backend structure.

Location:
trunk/source/compiler/X86
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/compiler/X86/X8664/x8664-backend.lisp

    r10106 r10180  
    3535  (make-backend :lookup-opcode 'lookup-x86-opcode
    3636                :lookup-macro #'false
    37                 :lap-opcodes x86::*x8664-opcode-templates*
     37                :lap-opcodes x86::*x86-opcode-templates*
    3838                :define-vinsn 'define-x86-vinsn
    3939                :platform-syscall-mask (logior platform-os-linux platform-cpu-x86 platform-word-size-64)
     
    6666  (make-backend :lookup-opcode 'lookup-x86-opcode
    6767                :lookup-macro #'false
    68                 :lap-opcodes x86::*x8664-opcode-templates*
     68                :lap-opcodes x86::*x86-opcode-templates*
    6969                :define-vinsn 'define-x86-vinsn
    7070                :p2-dispatch *x862-specials*
     
    9595  (make-backend :lookup-opcode 'lookup-x86-opcode
    9696                :lookup-macro #'false
    97                 :lap-opcodes x86::*x8664-opcode-templates*
     97                :lap-opcodes x86::*x86-opcode-templates*
    9898                :define-vinsn 'define-x86-vinsn
    9999                :p2-dispatch *x862-specials*
     
    123123  (make-backend :lookup-opcode 'lookup-x86-opcode
    124124                :lookup-macro #'false
    125                 :lap-opcodes x86::*x8664-opcode-templates*
     125                :lap-opcodes x86::*x86-opcode-templates*
    126126                :define-vinsn 'define-x86-vinsn
    127127                :p2-dispatch *x862-specials*
  • trunk/source/compiler/X86/X8664/x8664-vinsns.lisp

    r9732 r10180  
    44924492 (fixup-x86-vinsn-templates
    44934493  *x8664-vinsn-templates*
    4494   x86::*x86-64-opcode-template-lists*))
     4494  x86::*x86-opcode-template-lists*))
    44954495
    44964496(provide "X8664-VINSNS")
  • trunk/source/compiler/X86/x86-asm.lisp

    r8610 r10180  
    34153415  (setf (x86-opcode-template-ordinal (svref *x8664-opcode-templates* i)) i))
    34163416 
    3417    
     3417(defparameter *x86-opcode-templates* *x8664-opcode-templates*)
    34183418     
    34193419(defparameter *x86-32-opcode-template-lists*
     
    34483448    t))
    34493449
    3450 (defparameter *x86-opcode-template-lists* ())
     3450(defparameter *x86-opcode-template-lists* *x86-64-opcode-template-lists*)
    34513451
    34523452(defvar *x8632-registers* (make-hash-table :test #'equalp))
  • trunk/source/compiler/X86/x86-lap.lisp

    r9879 r10180  
    203203
    204204(defun x86-lap-macro-function (name)
    205   (gethash (string name) #|(backend-lap-macros *target-backend*)|#
    206            *x86-lap-macros*))
     205  (gethash (string name) (backend-lap-macros *target-backend*)))
    207206
    208207(defun (setf x86-lap-macro-function) (def name)
     
    210209    (when (gethash s x86::*x86-opcode-template-lists*)
    211210      (error "~s already defines an x86 instruction . " name))
    212     (setf (gethash s *x86-lap-macros* #|(backend-lap-macros *x86-backend*)|#) def)))
     211    (setf (gethash s (backend-lap-macros *x86-backend*)) def)))
    213212
    214213(defmacro defx86lapmacro (name arglist &body body)
     
    381380(defun lookup-x86-register (regname designator)
    382381  (let* ((r (typecase regname
    383               (symbol (or (gethash (string regname) x86::*x86-registers*)
     382              (symbol (or (gethash (string regname) x86::*x8664-registers*)
    384383                          (if (eq regname :rcontext)
    385384                            (svref x86::*x8664-register-entries*
     
    391390                                      (< val (length x86::*x8664-register-entries*))
    392391                                      (svref x86::*x8664-register-entries* val))))))
    393               (string (gethash regname x86::*x86-registers*))
     392              (string (gethash regname x86::*x8664-registers*))
    394393              (fixnum (if (and (typep regname 'fixnum)
    395394                                      (>= regname 0)
     
    13221321                                      (not (constant-symbol-p name))
    13231322                                      (or (not (gethash (string name)
    1324                                                         x86::*x86-registers*))
     1323                                                        x86::*x8664-registers*))
    13251324                                          (error "Symbol ~s already names and x86 register" name))
    13261325                                      name)
  • trunk/source/compiler/X86/x862.lisp

    r10174 r10180  
    53445344                 (x86-emit-instruction-from-vinsn
    53455345                  (svref (target-arch-case
    5346                           (:x8664 x86::*x8664-opcode-templates*)) (car f))
     5346                          (:x8664 x86::*x86-opcode-templates*)) (car f))
    53475347                  head
    53485348                  frag-list
Note: See TracChangeset for help on using the changeset viewer.