[movitz-cvs] CVS update: ia-x86/read.lisp

Frode Vatvedt Fjeld ffjeld at common-lisp.net
Tue Feb 10 00:04:08 UTC 2004


Update of /project/movitz/cvsroot/ia-x86
In directory common-lisp.net:/tmp/cvs-serv12096

Modified Files:
	read.lisp 
Log Message:
Designate the ia-x86 package with #:ia-x86 rather than "IA-X86".
Also, a few very minor edits.

Date: Mon Feb  9 19:04:08 2004
Author: ffjeld

Index: ia-x86/read.lisp
diff -u ia-x86/read.lisp:1.2 ia-x86/read.lisp:1.3
--- ia-x86/read.lisp:1.2	Fri Jan 16 06:54:14 2004
+++ ia-x86/read.lisp	Mon Feb  9 19:04:08 2004
@@ -9,11 +9,11 @@
 ;;;; Created at:    Mon Jul 31 13:54:27 2000
 ;;;; Distribution:  See the accompanying file COPYING.
 ;;;;                
-;;;; $Id: read.lisp,v 1.2 2004/01/16 11:54:14 ffjeld Exp $
+;;;; $Id: read.lisp,v 1.3 2004/02/10 00:04:08 ffjeld Exp $
 ;;;;                
 ;;;;------------------------------------------------------------------
 
-(in-package "IA-X86")
+(in-package #:ia-x86)
 
 ;;; Implements the following assembly syntax:
 ;;;
@@ -63,7 +63,7 @@
   (assert (member spec +all-registers+)
       (spec)
     "Expected a register: ~A" spec)
-  (find-symbol (symbol-name spec) "IA-X86"))
+  (find-symbol (symbol-name spec) #:ia-x86))
 
 (defun is-register-p (spec)
   (and (symbolp spec)
@@ -209,7 +209,7 @@
   (loop for p in prefix-spec
       with user-size = nil
       if (symbolp p)
-      collect (let ((ps (find-symbol (symbol-name p) "IA-X86")))
+      collect (let ((ps (find-symbol (symbol-name p) #:ia-x86)))
 		(if (decode-set +prefix-opcode-map+ ps :errorp nil)
 		    ps
 		  (error "No such prefix: ~A" p)))
@@ -218,14 +218,6 @@
       do (setf user-size p)
       finally (return (values prefixes user-size))))
 	      
-;;;  (mapcar #'(lambda (p)
-;;;	      (let ((ps (find-symbol (symbol-name p)
-;;;				     "IA-X86")))
-;;;		(if (decode-set *prefix-opcode-map* ps :errorp nil)
-;;;		    ps
-;;;		  (error "No such prefix: ~A" p))))
-;;;	  prefix-spec))
-
 (defvar *find-instruction-cache* (make-hash-table :test #'eq))
 
 (defun read-instruction (sexpr)
@@ -235,10 +227,10 @@
 	(setf (values prefix-list user-size) (read-prefixes (first sexpr))
 	      instr-name (second sexpr)
 	      operand-list (nthcdr 2 sexpr))
-	(setf prefix-list nil
-	      user-size nil
-	      instr-name (first sexpr)
-	      operand-list (nthcdr 1 sexpr)))
+      (setf prefix-list nil
+	    user-size nil
+	    instr-name (first sexpr)
+	    operand-list (nthcdr 1 sexpr)))
     (case instr-name
       (:align
        (make-instance 'alignment :type operand-list))
@@ -246,14 +238,14 @@
        (mapcar #'read-operand operand-list))
       (t (make-instance (or (gethash instr-name *find-instruction-cache*)
 			    (setf (gethash instr-name *find-instruction-cache*)
-				  (multiple-value-bind (instr-symbol instr-symbol-status)
-				      (find-symbol (string instr-name) "IA-X86-INSTR")
-				    (unless instr-symbol-status
-				      (error "No instruction named ~A." (string instr-name)))
-				    instr-symbol)))
-			'prefixes prefix-list
-			'user-size user-size
-			'operands (mapcar #'read-operand operand-list))))))
+			      (multiple-value-bind (instr-symbol instr-symbol-status)
+				  (find-symbol (string instr-name) #:ia-x86-instr)
+				(unless instr-symbol-status
+				  (error "No instruction named ~A." (string instr-name)))
+				instr-symbol)))
+	   'prefixes prefix-list
+	   'user-size user-size
+	   'operands (mapcar #'read-operand operand-list))))))
       
 
 (defun inline-data-p (expr)





More information about the Movitz-cvs mailing list