OSDN Git Service

* cgen-opc.scm (-opc-file-path,opc-file-path): Move to opcodes.scm
authordevans <devans>
Tue, 7 Jul 2009 18:27:08 +0000 (18:27 +0000)
committerdevans <devans>
Tue, 7 Jul 2009 18:27:08 +0000 (18:27 +0000)
(opc-arguments, -OPC): Call set-opc-file-path!.
* opcodes.scm (-opc-file-path,opc-file-path): Moved here.
(set-opc-file-path!): New function.
* dev.scm: Mention set-opc-file-path!.  Mention doc options.

cgen/ChangeLog
cgen/cgen-opc.scm
cgen/dev.scm
cgen/opcodes.scm

index 8c0982a..bbc3e5f 100644 (file)
@@ -1,5 +1,11 @@
 2009-07-07  Doug Evans  <dje@sebabeach.org>
 
+       * cgen-opc.scm (-opc-file-path,opc-file-path): Move to opcodes.scm
+       (opc-arguments, -OPC): Call set-opc-file-path!.
+       * opcodes.scm (-opc-file-path,opc-file-path): Moved here.
+       (set-opc-file-path!): New function.
+       * dev.scm: Mention set-opc-file-path!.  Mention doc options.
+
        * opc-ibld.scm (gen-insn-builder): Convert symbols to strings
        before passing to gen-c-args.
 
index 81cfd0f..276fdb8 100644 (file)
   (load (string-append srcdir "/opc-opinst.scm"))
 )
 
-; Records the -OPC arg which specifies the path to the .opc file.
-(define -opc-file-path #f)
-(define (opc-file-path)
-  (if -opc-file-path
-      -opc-file-path
-      (error ".opc file unspecified, missing -OPC argument"))
-)
-
 (define opc-arguments
   (list
    (list "-OPC" "file" "specify path to .opc file"
-        (lambda (arg) (set! -opc-file-path arg))
+        (lambda (arg) (set-opc-file-path! arg))
         #f)
    (list "-H" "file" "generate $arch-desc.h in <file>"
         #f
index b73d9da..4d77681 100644 (file)
@@ -189,8 +189,12 @@ comma separated list of machs to keep or `all'
 keep-isa:
 comma separated list of isas to keep or `all'
 
+doc options:
+[none yet]
+
 opcode options:
 [none yet]
+Remember to call (set-opc-file-path! \"/path/to/cpu.opc\").
 
 gas test options:
 [none yet]
index 3410c55..cb2c28b 100644 (file)
@@ -7,6 +7,17 @@
 ; Specify which application.
 (set! APPLICATION 'OPCODES)
 
+; Records the -OPC arg which specifies the path to the .opc file.
+(define -opc-file-path #f)
+(define (opc-file-path)
+  (if -opc-file-path
+      -opc-file-path
+      (error ".opc file unspecified, missing -OPC argument"))
+)
+(define (set-opc-file-path! path)
+  (set! -opc-file-path path)
+)
+
 ; Boolean indicating if we're to build the operand instance table.
 ; The default is no, since only the m32r uses it at present.
 ; ??? Simulator tracing support could use it.