Commit 3923d40f authored by Frode Vatvedt Fjeld's avatar Frode Vatvedt Fjeld

Changed indenting style of defclass forms.

parent 6486391e
......@@ -9,7 +9,7 @@
;;;; Created at: Thu May 4 15:16:45 2000
;;;; Distribution: See the accompanying file COPYING.
;;;;
;;;; $Id: codec.lisp,v 1.1.1.1 2004/01/12 14:19:00 ffjeld Exp $
;;;; $Id: codec.lisp,v 1.2 2004/01/16 11:54:14 ffjeld Exp $
;;;;
;;;;------------------------------------------------------------------
......@@ -39,75 +39,94 @@
(defclass template ()
((value :type unsigned-byte
:initarg value
:accessor template-value)
(numo :type (integer 1 12)
:initarg numo
:accessor template-numo)
(priority :type integer
:initarg priority
:initform +template-default-priority+
:accessor template-priority)))
((value
:type unsigned-byte
:initarg value
:accessor template-value)
(numo
:type (integer 1 12)
:initarg numo
:accessor template-numo)
(priority
:type integer
:initarg priority
:initform +template-default-priority+
:accessor template-priority)))
(defclass instr-template (template)
((mask :type signed-byte
:initarg mask
:accessor template-mask)
(not-list :type list ; list of value/masks that must *not* match.
:initform '()
:initarg not-list
:accessor template-not-list)
(cpu-mode :type (member :32-bit :16-bit :any-mode)
:initform :any-mode
:initarg cpu-mode
:accessor template-cpu-mode)
(operand-mode :type (member :32-bit :16-bit :any-mode)
:initform :any-mode
:initarg operand-mode
:accessor template-operand-mode)
(addressing-mode :type (member :32-bit :16-bit :any-mode)
:initform :any-mode
:initarg addressing-mode
:accessor template-addressing-mode)
(req-prefixes :type list ; list of prefixes required for a match
:initform '()
:initarg req-prefixes
:accessor template-req-prefixes)
(not-prefixes :type list ; list of prefixes disqualifying any match
:initform '()
:initarg not-prefixes
:accessor template-not-prefixes)
(instr-classname :initarg instr-classname
:accessor template-instr-classname)
(instr-numo :type (integer 1 16)
:initarg instr-numo
:accessor template-instr-numo)
(instr-operand-types :type list
:initarg instr-operand-types
:accessor template-instr-operand-types)
(instr-operand-classes :type list ; this template generates operands of these classes (in this order)
:initarg instr-operand-classes
:accessor template-instr-operand-classes)
((mask
:type signed-byte
:initarg mask
:accessor template-mask)
(not-list
:type list ; list of value/masks that must *not* match.
:initform '()
:initarg not-list
:accessor template-not-list)
(cpu-mode
:type (member :32-bit :16-bit :any-mode)
:initform :any-mode
:initarg cpu-mode
:accessor template-cpu-mode)
(operand-mode
:type (member :32-bit :16-bit :any-mode)
:initform :any-mode
:initarg operand-mode
:accessor template-operand-mode)
(addressing-mode
:type (member :32-bit :16-bit :any-mode)
:initform :any-mode
:initarg addressing-mode
:accessor template-addressing-mode)
(req-prefixes
:type list ; list of prefixes required for a match
:initform '()
:initarg req-prefixes
:accessor template-req-prefixes)
(not-prefixes
:type list ; list of prefixes disqualifying any match
:initform '()
:initarg not-prefixes
:accessor template-not-prefixes)
(instr-classname
:initarg instr-classname
:accessor template-instr-classname)
(instr-numo
:type (integer 1 16)
:initarg instr-numo
:accessor template-instr-numo)
(instr-operand-types
:type list
:initarg instr-operand-types
:accessor template-instr-operand-types)
(instr-operand-classes
:type list ; this template generates operands of these classes (in this order)
:initarg instr-operand-classes
:accessor template-instr-operand-classes)
(instr-operand-base-classes
:type list ; caching the base-classes of instr-operand-classes
:initarg instr-operand-base-classes
:accessor template-instr-operand-base-classes)
(instr-modr/m-p :type boolean ; does instruction have modr/m?
:initarg modr/m-p
:accessor template-instr-modr/m-p)
(instr-sib-p :type boolean ; does instruction have SIB?
:initarg sib-p
:accessor template-instr-sib-p)
(instr-displacement-numo :type (integer 0 4) ; size of "displacement" field.
:initarg displacement-numo
:accessor template-instr-displacement-numo)
(instr-immediate-numo :type (integer 0 4) ; size of "immediate" field.
:initarg immediate-numo
:accessor template-instr-immediate-numo)
(instr-opcode-numo :type (integer 1 2) ; size of "opcode" field.
:initarg opcode-numo
:accessor template-instr-opcode-numo)))
(instr-modr/m-p
:type boolean ; does instruction have modr/m?
:initarg modr/m-p
:accessor template-instr-modr/m-p)
(instr-sib-p
:type boolean ; does instruction have SIB?
:initarg sib-p
:accessor template-instr-sib-p)
(instr-displacement-numo
:type (integer 0 4) ; size of "displacement" field.
:initarg displacement-numo
:accessor template-instr-displacement-numo)
(instr-immediate-numo
:type (integer 0 4) ; size of "immediate" field.
:initarg immediate-numo
:accessor template-instr-immediate-numo)
(instr-opcode-numo
:type (integer 1 2) ; size of "opcode" field.
:initarg opcode-numo
:accessor template-instr-opcode-numo)))
(defmethod print-object ((obj instr-template) stream)
(if *print-pretty*
......@@ -125,7 +144,8 @@
(call-next-method obj stream)))
(defclass prefix-template (template)
((value :type (unsigned-byte 8))))
((value
:type (unsigned-byte 8))))
(defmethod template-numo ((template prefix-template))
(values 1))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment