From: devans Date: Sun, 24 Jan 2010 23:48:37 +0000 (+0000) Subject: * utils-cgen.scm: Follow commenting convention. X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=a797d678efeb19b6a0cd2c46c495c4ce6d532df8;p=pf3gnuchains%2Fpf3gnuchains4x.git * utils-cgen.scm: Follow commenting convention. --- diff --git a/cgen/ChangeLog b/cgen/ChangeLog index 0d660f7a65..36746b549c 100644 --- a/cgen/ChangeLog +++ b/cgen/ChangeLog @@ -2,6 +2,7 @@ * cos.scm: Follow commenting convention. Why did a single ; have to get indented like it does? :-( + * utils-cgen.scm: Ditto. 2010-01-23 Doug Evans diff --git a/cgen/utils-cgen.scm b/cgen/utils-cgen.scm index 685112502b..35b74028da 100644 --- a/cgen/utils-cgen.scm +++ b/cgen/utils-cgen.scm @@ -1,23 +1,23 @@ -; CGEN Utilities. -; Copyright (C) 2000, 2002, 2003, 2009 Red Hat, Inc. -; This file is part of CGEN. -; See file COPYING.CGEN for details. -; -; This file contains utilities specific to cgen. -; Generic utilities should go in utils.scm. - -; True if text of sanitize markers are to be emitted. -; This is a debugging tool only, though it could have use in sanitized trees. +;;CGEN Utilities. +;;Copyright (C) 2000, 2002, 2003, 2009 Red Hat, Inc. +;;This file is part of CGEN. +;;See file COPYING.CGEN for details. +;; +;;This file contains utilities specific to cgen. +;;Generic utilities should go in utils.scm. + +;;True if text of sanitize markers are to be emitted. +;;This is a debugging tool only, though it could have use in sanitized trees. (define include-sanitize-marker? #t) -; Utility to display command line invocation for debugging purposes. +;;Utility to display command line invocation for debugging purposes. (define (display-argv argv) (let ((cep (current-error-port))) (display "cgen -s " cep) (for-each (lambda (arg) - ; Output double-quotes if string has a space for better - ; correspondence to how to specify string to shell. + ;; Output double-quotes if string has a space for better + ;; correspondence to how to specify string to shell. (if (string-index arg #\space) (write arg cep) (display arg cep)) @@ -26,11 +26,11 @@ (newline cep)) ) -; COS utilities. -; Perhaps these should be provided with cos (cgen-object-system), but for -; now they live here. +;;COS utilities. +;;Perhaps these should be provided with cos (cgen-object-system), but for +;;now they live here. -; Define the getter for a list of elements of a class. +;;Define the getter for a list of elements of a class. (defmacro define-getters (class class-prefix elm-names) (cons 'begin @@ -43,7 +43,7 @@ elm-names)) ) -; Define the setter for a list of elements of a class. +;;Define the setter for a list of elements of a class. (defmacro define-setters (class class-prefix elm-names) (cons 'begin @@ -56,8 +56,8 @@ elm-names)) ) -; Make an object, specifying values for particular elements. -; ??? Eventually move to cos.scm/cos.c. +;;Make an object, specifying values for particular elements. +;;??? Eventually move to cos.scm/cos.c. (define (vmake class . args) (let ((obj (new class))) @@ -208,8 +208,8 @@ *UNSPECIFIED* ) -; Each named entry in the description file typically has these three members: -; name, comment attrs. +;;Each named entry in the description file typically has these three members: +;;name, comment attrs. (define (class-make ' '() '(name comment attrs) '())) @@ -224,15 +224,15 @@ (method-make! 'set-atlist! (lambda (self newval) (elm-set! self 'attrs newval))) -; All objects defined in the .cpu file have these elements. -; Where in the class hierarchy they're recorded depends on the object. -; Additionally most objects have `name', `comment' and `attrs' elements. +;;All objects defined in the .cpu file have these elements. +;;Where in the class hierarchy they're recorded depends on the object. +;;Additionally most objects have `name', `comment' and `attrs' elements. (define (obj:name obj) (send obj 'get-name)) (define (obj-set-name! obj name) (send obj 'set-name! name)) (define (obj:comment obj) (send obj 'get-comment)) -; Utility to return the name as a string. +;;Utility to return the name as a string. (define (obj:str-name obj) (symbol->string (obj:name obj))) @@ -246,17 +246,17 @@ obj-list)) ) -; Subclass of for use by description file objects. -; -; Records the source location of the object. -; -; We also record an internally generated entry, ordinal, to record the -; relative position within the description file. It's generally more efficient -; to record some kinds of objects (e.g. insns) in a hash table. But we also -; want to emit these objects in file order. Recording the object's relative -; position lets us generate an ordered list when we need to. -; We can't just use the line number because we want an ordering over multiple -; input files. +;;Subclass of for use by description file objects. +;; +;;Records the source location of the object. +;; +;;We also record an internally generated entry, ordinal, to record the +;;relative position within the description file. It's generally more efficient +;;to record some kinds of objects (e.g. insns) in a hash table. But we also +;;want to emit these objects in file order. Recording the object's relative +;;position lets us generate an ordered list when we need to. +;;We can't just use the line number because we want an ordering over multiple +;;input files. (define (class-make ' '() @@ -282,11 +282,11 @@ (define (obj-ordinal obj) (send obj 'get-ordinal)) (define (obj-set-ordinal! obj ordinal) (send obj 'set-ordinal! ordinal)) -; Return a boolean indicating if X is a . +;;Return a boolean indicating if X is a . (define (source-ident? x) (class-instance? x)) -; Parsing utilities +;;Parsing utilities ;;; A parsing/processing context, used to give better error messages. ;;; LOCATION must be an object created with make-location. @@ -303,46 +303,46 @@ nil) ) -; Accessors. +;;Accessors. (define-getters context (location prefix)) -; Create a object that is just a prefix. +;;Create a object that is just a prefix. (define (make-prefix-context prefix) (make #f prefix) ) -; Create a object that (current-reader-location) with PREFIX. +;;Create a object that (current-reader-location) with PREFIX. (define (make-current-context prefix) (make (current-reader-location) prefix) ) -; Create a object from object OBJ. +;;Create a object from object OBJ. (define (make-obj-context obj prefix) (make (obj-location obj) prefix) ) -; Create a new context from CONTEXT with TEXT appended to the prefix. +;;Create a new context from CONTEXT with TEXT appended to the prefix. (define (context-append context text) (make (context-location context) (string-append (context-prefix context) text)) ) -; Create a new context from CONTEXT with NAME appended to the prefix. +;;Create a new context from CONTEXT with NAME appended to the prefix. (define (context-append-name context name) (context-append context (stringsym-append ":" name)) ) -; Call this to issue an error message when all you have is a context. -; CONTEXT is a object or #f if there is none. -; INTRO is a general introduction to what cgen was doing. -; ERRMSG is, yes, you guessed it, the error message. -; EXPR is the value that had the error if there is one. +;;Call this to issue an error message when all you have is a context. +;;CONTEXT is a object or #f if there is none. +;;INTRO is a general introduction to what cgen was doing. +;;ERRMSG is, yes, you guessed it, the error message. +;;EXPR is the value that had the error if there is one. (define (context-error context intro errmsg . expr) (apply context-owner-error @@ -352,14 +352,14 @@ (cons errmsg expr))))) ) -; Call this to issue an error message when you have a context and an -; or object (we call the "owner"). -; CONTEXT is a object or #f if there is none. -; OWNER is an or object or #f if there is none. -; INTRO is a general introduction to what cgen was doing. -; If OWNER is non-#f, the text " of " is appended. -; ERRMSG is, yes, you guessed it, the error message. -; EXPR is the value that had the error if there is one. +;;Call this to issue an error message when you have a context and an +;; or object (we call the "owner"). +;;CONTEXT is a object or #f if there is none. +;;OWNER is an or object or #f if there is none. +;;INTRO is a general introduction to what cgen was doing. +;; If OWNER is non-#f, the text " of " is appended. +;;ERRMSG is, yes, you guessed it, the error message. +;;EXPR is the value that had the error if there is one. (define (context-owner-error context owner intro errmsg . expr) ;; If we don't have a context, look at the owner to try to find one. @@ -404,11 +404,11 @@ expr)))) ) -; Parse an object name. -; NAME is either a symbol or a list of symbols which are concatenated -; together. Each element can in turn be a list of symbols, and so on. -; This supports symbol concatenation in the description file without having -; to using string-append or some such. +;;Parse an object name. +;;NAME is either a symbol or a list of symbols which are concatenated +;;together. Each element can in turn be a list of symbols, and so on. +;;This supports symbol concatenation in the description file without having +;;to using string-append or some such. (define (parse-name context name) (string->symbol @@ -421,9 +421,9 @@ (else (parse-error context "improper name" name))))) ) -; Parse an object comment. -; COMMENT is either a string or a list of strings, each element of which may -; in turn be a list of strings. +;;Parse an object comment. +;;COMMENT is either a string or a list of strings, each element of which may +;;in turn be a list of strings. (define (parse-comment context comment) (cond ((string? comment) comment) @@ -434,7 +434,7 @@ (else (parse-error context "improper comment" comment))) ) -; Parse a symbol. +;;Parse a symbol. (define (parse-symbol context value) (if (and (not (symbol? value)) (not (string? value))) @@ -442,7 +442,7 @@ (->symbol value) ) -; Parse a string. +;;Parse a string. (define (parse-string context value) (if (and (not (symbol? value)) (not (string? value))) @@ -450,8 +450,8 @@ (->string value) ) -; Parse a number. -; VALID-VALUES is a list of numbers and (min . max) pairs. +;;Parse a number. +;;VALID-VALUES is a list of numbers and (min . max) pairs. (define (parse-number context value . valid-values) (if (not (number? value)) @@ -466,7 +466,7 @@ (parse-error context "invalid number" value valid-values)) ) -; Parse a boolean value +;;Parse a boolean value (define (parse-boolean context value) (if (boolean? value) @@ -474,13 +474,13 @@ (parse-error context "not a boolean (#f/#t)" value)) ) -; Parse a list of handlers. -; Each entry is (symbol "string"). -; These map function to a handler for it. -; The meaning is up to the application but generally the handler is a -; C/C++ function name. -; ALLOWED is a list valid values for the symbol or #f if anything is allowed. -; The result is handlers unchanged. +;;Parse a list of handlers. +;;Each entry is (symbol "string"). +;;These map function to a handler for it. +;;The meaning is up to the application but generally the handler is a +;;C/C++ function name. +;;ALLOWED is a list valid values for the symbol or #f if anything is allowed. +;;The result is handlers unchanged. (define (parse-handlers context allowed handlers) (if (not (list? handlers)) @@ -494,10 +494,10 @@ handlers ) -; Return a boolean indicating if X is a keyword. -; This also handles symbols named :foo because Guile doesn't stablely support -; :keywords (how does one enable :keywords? read-options doesn't appear to -; work). +;;Return a boolean indicating if X is a keyword. +;;This also handles symbols named :foo because Guile doesn't stablely support +;;:keywords (how does one enable :keywords? read-options doesn't appear to +;;work). (define (keyword-list? x) (and (list? x) @@ -507,15 +507,15 @@ (char=? (string-ref (symbol->string (car x)) 0) #\:)))) ) -; Convert a list like (#:key1 val1 #:key2 val2 ...) to -; ((#:key1 val1) (#:key2 val2) ...). -; Missing values are specified with an empty list. -; This also supports (:sym1 val1 ...) because Guile doesn't stablely support -; :keywords (#:keywords work, but #:foo shouldn't appear in the description -; language). +;;Convert a list like (#:key1 val1 #:key2 val2 ...) to +;;((#:key1 val1) (#:key2 val2) ...). +;;Missing values are specified with an empty list. +;;This also supports (:sym1 val1 ...) because Guile doesn't stablely support +;;:keywords (#:keywords work, but #:foo shouldn't appear in the description +;;language). (define (keyword-list->arg-list kl) - ; Scan KL backwards, building up each element as we go. + ;; Scan KL backwards, building up each element as we go. (let loop ((result nil) (current nil) (rkl (reverse kl))) (cond ((null? rkl) result) @@ -536,9 +536,9 @@ (cdr rkl))))) ) -; Signal an error if the argument name is not a symbol. -; This is done by each of the argument validation routines so the caller -; doesn't need to make two calls. +;;Signal an error if the argument name is not a symbol. +;;This is done by each of the argument validation routines so the caller +;;doesn't need to make two calls. (define (arg-list-validate-name context arg-spec) (if (null? arg-spec) @@ -548,8 +548,8 @@ *UNSPECIFIED* ) -; Signal a parse error if an argument was specified with a value. -; ARG-SPEC is (name value). +;;Signal a parse error if an argument was specified with a value. +;;ARG-SPEC is (name value). (define (arg-list-check-no-args context arg-spec) (arg-list-validate-name context arg-spec) @@ -559,8 +559,8 @@ *UNSPECIFIED* ) -; Validate and return a symbol argument. -; ARG-SPEC is (name value). +;;Validate and return a symbol argument. +;;ARG-SPEC is (name value). (define (arg-list-symbol-arg context arg-spec) (arg-list-validate-name context arg-spec) @@ -571,15 +571,15 @@ (cadr arg-spec) ) -; Sanitization +;;Sanitization -; Sanitization is handled via attributes. Anything that must be sanitized -; has a `sanitize' attribute with the value being the keyword to sanitize on. -; Ideally most, if not all, of the guts of the generated sanitization is here. +;;Sanitization is handled via attributes. Anything that must be sanitized +;;has a `sanitize' attribute with the value being the keyword to sanitize on. +;;Ideally most, if not all, of the guts of the generated sanitization is here. -; Utility to simplify expression in .cpu file. -; Usage: (sanitize isa-name-list keyword entry-type entry-name1 [entry-name2 ...]) -; Enum attribute `(sanitize keyword)' is added to the entry. +;;Utility to simplify expression in .cpu file. +;;Usage: (sanitize isa-name-list keyword entry-type entry-name1 [entry-name2 ...]) +;;Enum attribute `(sanitize keyword)' is added to the entry. (define (sanitize isa-name-list keyword entry-type . entry-names) (for-each (lambda (entry-name) @@ -599,17 +599,17 @@ (else (parse-error (make-prefix-context "sanitize") "unknown entry type" entry-type))) - ; ENTRY is #f in the case where the element was discarded - ; because its mach wasn't selected. But in the case where - ; we're keeping everything, ensure ENTRY is not #f to - ; catch spelling errors. + ;; ENTRY is #f in the case where the element was discarded + ;; because its mach wasn't selected. But in the case where + ;; we're keeping everything, ensure ENTRY is not #f to + ;; catch spelling errors. (if entry (begin (obj-cons-attr! entry (enum-attr-make 'sanitize keyword)) - ; Propagate the sanitize attribute to class members - ; as necessary. + ;; Propagate the sanitize attribute to class members + ;; as necessary. (case entry-type ((hardware) (if (hw-indices entry) @@ -628,20 +628,20 @@ entry-name))))) entry-names) - #f ; caller eval's our result, so return a no-op + #f ;; caller eval's our result, so return a no-op ) -; Return TEXT sanitized with KEYWORD. -; TEXT must exist on a line (or lines) by itself. -; i.e. it is assumed that it begins at column 1 and ends with a newline. -; If KEYWORD is #f, no sanitization is generated. +;;Return TEXT sanitized with KEYWORD. +;;TEXT must exist on a line (or lines) by itself. +;;i.e. it is assumed that it begins at column 1 and ends with a newline. +;;If KEYWORD is #f, no sanitization is generated. (define (gen-sanitize keyword text) (cond ((null? text) "") - ((pair? text) ; pair? -> cheap list? + ((pair? text) ;; pair? -> cheap list? (if (and keyword include-sanitize-marker?) (string-list - ; split string to avoid removal + ;; split string to avoid removal "/* start-" "sanitize-" keyword " */\n" text @@ -653,7 +653,7 @@ "" (if (and keyword include-sanitize-marker?) (string-append - ; split string to avoid removal + ;; split string to avoid removal "/* start-" "sanitize-" keyword " */\n" text @@ -662,8 +662,8 @@ text)))) ) -; Return TEXT sanitized with OBJ's sanitization, if it has any. -; OBJ may be #f. +;;Return TEXT sanitized with OBJ's sanitization, if it has any. +;;OBJ may be #f. (define (gen-obj-sanitize obj text) (if obj @@ -673,10 +673,10 @@ (gen-sanitize #f text)) ) -; Cover procs to handle generation of object declarations and definitions. -; All object output should be routed through gen-decl and gen-defn. +;;Cover procs to handle generation of object declarations and definitions. +;;All object output should be routed through gen-decl and gen-defn. -; Send the gen-decl message to OBJ, and sanitize the output if necessary. +;;Send the gen-decl message to OBJ, and sanitize the output if necessary. (define (gen-decl obj) (logit 3 "Generating decl for " @@ -689,7 +689,7 @@ (else "")) ) -; Send the gen-defn message to OBJ, and sanitize the output if necessary. +;;Send the gen-defn message to OBJ, and sanitize the output if necessary. (define (gen-defn obj) (logit 3 "Generating defn for " @@ -702,9 +702,9 @@ (else "")) ) -; Attributes +;;Attributes -; Return the C/C++ type to use to hold a value for attribute ATTR. +;;Return the C/C++ type to use to hold a value for attribute ATTR. (define (gen-attr-type attr) (if (string=? (string-downcase (gen-sym attr)) "isa") @@ -717,14 +717,14 @@ )) ) -; Return C macros for accessing an object's attributes ATTRS. -; PREFIX is one of "cgen_ifld", "cgen_hw", "cgen_operand", "cgen_insn". -; ATTRS is an alist of attribute values. The value is unimportant except that -; it is used to determine bool/non-bool. -; Non-bools need to be separated from bools as they're each recorded -; differently. Non-bools are recorded in an int for each. All bools are -; combined into one int to save space. -; ??? We assume there is at least one bool. +;;Return C macros for accessing an object's attributes ATTRS. +;;PREFIX is one of "cgen_ifld", "cgen_hw", "cgen_operand", "cgen_insn". +;;ATTRS is an alist of attribute values. The value is unimportant except that +;;it is used to determine bool/non-bool. +;;Non-bools need to be separated from bools as they're each recorded +;;differently. Non-bools are recorded in an int for each. All bools are +;;combined into one int to save space. +;;??? We assume there is at least one bool. (define (gen-attr-accessors prefix attrs) (string-append @@ -762,14 +762,14 @@ attrs) "\n") ) -; Return C code to declare an enum of attributes ATTRS. -; PREFIX is one of "cgen_ifld", "cgen_hw", "cgen_operand", "cgen_insn". -; ATTRS is an alist of attribute values. The value is unimportant except that -; it is used to determine bool/non-bool. -; Non-bools need to be separated from bools as they're each recorded -; differently. Non-bools are recorded in an int for each. All bools are -; combined into one int to save space. -; ??? We assume there is at least one bool. +;;Return C code to declare an enum of attributes ATTRS. +;;PREFIX is one of "cgen_ifld", "cgen_hw", "cgen_operand", "cgen_insn". +;;ATTRS is an alist of attribute values. The value is unimportant except that +;;it is used to determine bool/non-bool. +;;Non-bools need to be separated from bools as they're each recorded +;;differently. Non-bools are recorded in an int for each. All bools are +;;combined into one int to save space. +;;??? We assume there is at least one bool. (define (gen-attr-enum-decl prefix attrs) (string-append @@ -784,29 +784,29 @@ "\n") ) -; Return name of symbol ATTR-NAME. -; PREFIX is the prefix arg to gen-attr-enum-decl. +;;Return name of symbol ATTR-NAME. +;;PREFIX is the prefix arg to gen-attr-enum-decl. (define (gen-attr-name prefix attr-name) (string-upcase (gen-c-symbol (string-append prefix "_" (symbol->string attr-name)))) ) -; Normal gen-mask argument to gen-bool-attrs. -; Returns "(1<< PREFIX_NAME)" where PREFIX is from atlist-prefix and -; NAME is the name of the attribute. -; ??? This used to return PREFIX_NAME-CGEN_ATTR_BOOL_OFFSET. -; The tradeoff is simplicity vs perceived maximum number of boolean attributes -; needed. In the end the maximum number needn't be fixed, and the simplicity -; of the current way is good. +;;Normal gen-mask argument to gen-bool-attrs. +;;Returns "(1<< PREFIX_NAME)" where PREFIX is from atlist-prefix and +;;NAME is the name of the attribute. +;;??? This used to return PREFIX_NAME-CGEN_ATTR_BOOL_OFFSET. +;;The tradeoff is simplicity vs perceived maximum number of boolean attributes +;;needed. In the end the maximum number needn't be fixed, and the simplicity +;;of the current way is good. (define (gen-attr-mask prefix name) (string-append "(1<<" (gen-attr-name prefix name) ")") ) -; Return C expression of bitmasks of boolean attributes in ATTRS. -; ATTRS is an object, it need not be pre-sorted. -; GEN-MASK is a procedure that returns the C code of the mask. +;;Return C expression of bitmasks of boolean attributes in ATTRS. +;;ATTRS is an object, it need not be pre-sorted. +;;GEN-MASK is a procedure that returns the C code of the mask. (define (gen-bool-attrs attrs gen-mask) (let loop ((result "0") @@ -815,23 +815,23 @@ (cond ((null? alist) result) ((and (boolean? (cdar alist)) (cdar alist)) (loop (string-append result - ; `|' is used here instead of `+' so we don't - ; have to care about duplicates. + ;; `|' is used here instead of `+' so we don't + ;; have to care about duplicates. "|" (gen-mask (atlist-prefix attrs) (caar alist))) (cdr alist))) (else (loop result (cdr alist))))) ) -; Return the C definition of OBJ's attributes. -; TYPE is one of 'ifld, 'hw, 'operand, 'insn. -; [Other objects have attributes but these are the only ones we currently -; emit definitions for.] -; OBJ is any object that supports the 'get-atlist message. -; ALL-ATTRS is an ordered alist of all attributes. -; "ordered" means all the non-boolean attributes are at the front and -; duplicate entries have been removed. -; GEN-MASK is the gen-mask arg to gen-bool-attrs. +;;Return the C definition of OBJ's attributes. +;;TYPE is one of 'ifld, 'hw, 'operand, 'insn. +;;[Other objects have attributes but these are the only ones we currently +;;emit definitions for.] +;;OBJ is any object that supports the 'get-atlist message. +;;ALL-ATTRS is an ordered alist of all attributes. +;;"ordered" means all the non-boolean attributes are at the front and +;;duplicate entries have been removed. +;;GEN-MASK is the gen-mask arg to gen-bool-attrs. (define (gen-obj-attr-defn type obj all-attrs num-non-bools gen-mask) (let* ((attrs (obj-atlist obj)) @@ -841,18 +841,18 @@ "{ " (gen-bool-attrs attrs gen-mask) ", {" - ; For the boolean case, we can (currently) get away with only specifying - ; the attributes that are used since they all fit in one int and the - ; default is currently always #f (and won't be changed without good - ; reason). In the non-boolean case order is important since each value - ; has a specific spot in an array, all of them must be specified. + ;; For the boolean case, we can (currently) get away with only specifying + ;; the attributes that are used since they all fit in one int and the + ;; default is currently always #f (and won't be changed without good + ;; reason). In the non-boolean case order is important since each value + ;; has a specific spot in an array, all of them must be specified. (if (null? all-non-bools) " 0" - (string-drop1 ; drop the leading "," + (string-drop1 ;; drop the leading "," (string-map (lambda (attr) (let ((val (or (assq-ref non-bools (obj:name attr)) (attr-default attr)))) - ; FIXME: Are we missing attr-prefix here? + ;; FIXME: Are we missing attr-prefix here? (string-append ", " (send attr 'gen-value-for-defn val)))) all-non-bools))) @@ -860,10 +860,10 @@ )) ) -; Return the C definition of the terminating entry of an object's attributes. -; ALL-ATTRS is an ordered alist of all attributes. -; "ordered" means all the non-boolean attributes are at the front and -; duplicate entries have been removed. +;;Return the C definition of the terminating entry of an object's attributes. +;;ALL-ATTRS is an ordered alist of all attributes. +;;"ordered" means all the non-boolean attributes are at the front and +;;duplicate entries have been removed. (define (gen-obj-attr-end-defn all-attrs num-non-bools) (let ((all-non-bools (list-take num-non-bools all-attrs))) @@ -871,10 +871,10 @@ "{ 0, {" (if (null? all-non-bools) " { 0, 0 }" - (string-drop1 ; drop the leading "," + (string-drop1 ;; drop the leading "," (string-map (lambda (attr) (let ((val (attr-default attr))) - ; FIXME: Are we missing attr-prefix here? + ;; FIXME: Are we missing attr-prefix here? (string-append ", " (send attr 'gen-value-for-defn val)))) all-non-bools))) @@ -882,35 +882,35 @@ )) ) -; Return a boolean indicating if ATLIST indicates a CTI insn. +;;Return a boolean indicating if ATLIST indicates a CTI insn. (define (atlist-cti? atlist) (or (atlist-has-attr? atlist 'UNCOND-CTI) (atlist-has-attr? atlist 'COND-CTI)) ) -; Misc. gen-* procs +;;Misc. gen-* procs -; Return name of obj as a C symbol. +;;Return name of obj as a C symbol. (define (gen-sym obj) (gen-c-symbol (obj:name obj))) -; Return the name of the selected cpu family. -; An error is signalled if more than one has been selected. +;;Return the name of the selected cpu family. +;;An error is signalled if more than one has been selected. (define (gen-cpu-name) - ; FIXME: error checking + ;; FIXME: error checking (gen-sym (current-cpu)) ) -; Return HAVE_CPU_. +;;Return HAVE_CPU_. (define (gen-have-cpu cpu) (string-append "HAVE_CPU_" (string-upcase (gen-sym cpu))) ) -; Return the bfd mach name for MACH. +;;Return the bfd mach name for MACH. (define (gen-mach-bfd-name mach) (string-append "bfd_mach_" (gen-c-symbol (mach-bfd-name mach))) @@ -979,7 +979,7 @@ (symbol