OSDN Git Service

* belated outward merge
authorfche <fche>
Mon, 29 Jan 2001 18:56:26 +0000 (18:56 +0000)
committerfche <fche>
Mon, 29 Jan 2001 18:56:26 +0000 (18:56 +0000)
2001-01-26  Frank Ch. Eigler  <fche@redhat.com>

* sid-cpu.scm (gen-parallel-exec-type): Use unsigned long long for
writeback tracking.
(-gen-write-fn, -gen-sem-case, -gen-sfrag-case): Ditto.
* sid-decode.scm (-gen-scache-decls): Exclude writeback tracking field
if unnecessary.
* sid.scm (<operand> gen-write): Use unsigned long long expression
for writeback.
(-op-gen-set-trace, -op-gen-set-trace-parallel): Ditto.
(<unit> gen-profile-code): Ditto.

2001-01-08  Frank Ch. Eigler  <fche@redhat.com>

* operand.scm (<operand> pretty-sem-name): New field.
(<operand> make): Initialize it from hw-name.
(op:set-pretty-sem-name!): New function.
(<operand> gen-pretty-name): Default to fetching new field.
* rtl.scm (hw): Copy hw-name to pretty-sem-name instead.  Restore
sem-name setting from -rtx-hw-name.

cgen/ChangeLog
cgen/operand.scm
cgen/rtl.scm
cgen/sid-cpu.scm
cgen/sid-decode.scm
cgen/sid.scm

index 8e8e9d6..e51d648 100644 (file)
@@ -1,3 +1,15 @@
+2001-01-26  Frank Ch. Eigler  <fche@redhat.com>
+
+       * sid-cpu.scm (gen-parallel-exec-type): Use unsigned long long for
+       writeback tracking.
+       (-gen-write-fn, -gen-sem-case, -gen-sfrag-case): Ditto.
+       * sid-decode.scm (-gen-scache-decls): Exclude writeback tracking field
+       if unnecessary.
+       * sid.scm (<operand> gen-write): Use unsigned long long expression
+       for writeback.
+       (-op-gen-set-trace, -op-gen-set-trace-parallel): Ditto.
+       (<unit> gen-profile-code): Ditto.
+
 2001-01-23  Johan Rydberg  <jrydberg@opencores.org>
 
        * doc/rtl.texi (Expressions): Document the (index-of ...) and
@@ -5,6 +17,15 @@
 
 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
 
+       * operand.scm (<operand> pretty-sem-name): New field.
+       (<operand> make): Initialize it from hw-name.
+       (op:set-pretty-sem-name!): New function.
+       (<operand> gen-pretty-name): Default to fetching new field.
+       * rtl.scm (hw): Copy hw-name to pretty-sem-name instead.  Restore
+       sem-name setting from -rtx-hw-name.
+
+2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
+
        * rtl.scm (hw): Copy hw-name to new operand's sem-name, to simplify
        its subsequent gen-pretty-name.
 
index e0f6d7d..a3faf1d 100644 (file)
@@ -1,5 +1,5 @@
 ; Operands
-; Copyright (C) 2000 Red Hat, Inc.
+; Copyright (C) 2000, 2001 Red Hat, Inc.
 ; This file is part of CGEN.
 ; See file COPYING.CGEN for details.
 
                ; with function unit input/output arguments.
                sem-name
 
+               ; Pretty name as used in tracing code.
+               ; Generally this is the same as the hardware element's name.
+               pretty-sem-name
+
                ; Semantic name of hardware element refered to by this operand.
                hw-name
 
  (lambda (self name comment attrs hw-name mode-name index handlers getter setter)
    (elm-set! self 'name name)
    (elm-set! self 'sem-name name)
+   (elm-set! self 'pretty-sem-name hw-name)
    (elm-set! self 'comment comment)
    (elm-set! self 'attrs attrs)
    (elm-set! self 'hw-name hw-name)
 
 (define op:sem-name (elm-make-getter <operand> 'sem-name))
 (define op:set-sem-name! (elm-make-setter <operand> 'sem-name))
+(define op:set-pretty-sem-name! (elm-make-setter <operand> 'pretty-sem-name))
 (define op:hw-name (elm-make-getter <operand> 'hw-name))
 (define op:mode-name (elm-make-getter <operand> 'mode-name))
 (define op:selector (elm-make-getter <operand> 'selector))
 (method-make!
  <operand> 'gen-pretty-name
  (lambda (self mode)
-   (let* ((name (if (elm-bound? self 'sem-name) (elm-get self 'sem-name) (obj:name self)))
+   (let* ((name (if (elm-bound? self 'pretty-sem-name) (elm-get self 'pretty-sem-name) 
+                   (if (elm-bound? self 'sem-name) (elm-get self 'sem-name)
+                       (obj:name self))))
          (pname (cond ((string=? "h-memory" (string-take 8 name)) "memory")
                       ((string=? "h-" (string-take 2 name)) (string-drop 2 name))
                       (else name))))
index a11fb8e..6159c2e 100644 (file)
@@ -1,5 +1,5 @@
 ; Basic RTL support.
-; Copyright (C) 2000 Red Hat, Inc.
+; Copyright (C) 2000, 2001 Red Hat, Inc.
 ; This file is part of CGEN.
 ; See file COPYING.CGEN for details.
 
       (elm-xset! result 'type hw)
       (elm-xset! result 'mode mode)
 
+      (op:set-pretty-sem-name! result hw-name)
+
       ; The name of the operand must include the index so that multiple copies
       ; of a hardware object (e.g. h-gr[0], h-gr[14]) can be distinguished.
       (let ((name (-rtx-hw-name hw hw-name index-arg)))
        (send result 'set-name! name)
-       (op:set-sem-name! result hw-name))
+       (op:set-sem-name! result name))
 
       ; Empty comment and attribute.
       ; ??? Stick the arguments in the comment for debugging purposes?
index 83acc06..613b721 100644 (file)
@@ -366,7 +366,7 @@ struct @prefix@_parexec {
    "\
   } operands;
   /* For conditionally written operands, bitmask of which ones were.  */
-  unsigned written;
+  unsigned long long written;
 };\n\n"
    )
 )
@@ -448,7 +448,7 @@ namespace @cpu@ {
        "")
    (gen-define-parallel-operand-macro sfmt)
    "  @prefix@_scache* abuf = sem;\n"
-   "  unsigned written = abuf->written;\n"
+   "  unsigned long long written = abuf->written;\n"
    "  PCADDR pc = abuf->addr;\n"
    "  PCADDR npc = 0; // dummy value for branches\n"
    "  sem_status status = SEM_STATUS_NORMAL; // ditto\n"
@@ -545,7 +545,7 @@ using namespace @cpu@;
      "  @prefix@_scache* abuf = sem;\n"
      ; Unconditionally written operands are not recorded here.
      (if (or (with-profile?) (with-parallel-write?))
-        "  unsigned written = 0;\n"
+        "  unsigned long long written = 0;\n"
         "")
      ; The address of this insn, needed by extraction and semantic code.
      ; Note that the address recorded in the cpu state struct is not used.
@@ -673,7 +673,7 @@ using namespace @cpu@; // FIXME: namespace organization still wip
         "")
      ; Unconditionally written operands are not recorded here.
      (if (or (with-profile?) (with-parallel-write?))
-        "      unsigned written = 0;\n"
+        "      unsigned long long written = 0;\n"
         "")
      ; The address of this insn, needed by extraction and semantic code.
      ; Note that the address recorded in the cpu state struct is not used.
@@ -968,7 +968,7 @@ struct @prefix@_pbb_label {
         "")
      ; Unconditionally written operands are not recorded here.
      (if (or (with-profile?) (with-parallel-write?))
-        "      unsigned written = 0;\n"
+        "      unsigned long long written = 0;\n"
         "")
      ; The address of this insn, needed by extraction and semantic code.
      ; Note that the address recorded in the cpu state struct is not used.
index 0c89055..9070c2f 100644 (file)
@@ -298,10 +298,14 @@ struct @prefix@_scache {
   // argument buffer
   @prefix@_sem_fields fields;
 
+" (if (or (with-profile?) (with-parallel-write?))
+      (string-append "
   // writeback flags
   // Only used if profiling or parallel execution support enabled during
   // file generation.
-  unsigned written;
+  unsigned long long written;
+")
+      "") "
 
   // decode given instruction
   void decode (@cpu@_cpu* current_cpu, PCADDR pc, @prefix@_insn_word base_insn, @prefix@_insn_word entire_insn);
index b33c8cb..f08eab8 100644 (file)
      ; all the tests can be collapsed together.  Not sure that's a big
      ; enough win yet.
      (if (op:cond? self)
-        (string-append "  if (written & (1 << "
+        (string-append "  if (written & (1ULL << "
                        (number->string (op:num self))
                        "))\n"
                        "    {\n"
                (cx:make-with-atlist mode "opval" (cx:atlist newval))))
    (if (and (with-profile?)
            (op:cond? op))
-       (string-append "    written |= (1 << "
+       (string-append "    written |= (1ULL << "
                      (number->string (op:num op))
                      ");\n")
        "")
    "    " -par-operand-macro " (" (gen-sym op) ")"
    " = opval;\n"
    (if (op:cond? op)
-       (string-append "    written |= (1 << "
+       (string-append "    written |= (1ULL << "
                      (number->string (op:num op))
                      ");\n")
        "")
      (string-append
       "  {\n"
       "    int referenced = 0;\n"
-      "    int UNUSED insn_referenced = abuf->written;\n"
+      "    unsigned long long UNUSED insn_referenced = abuf->written;\n"
       ; Declare variables to hold unit arguments.
       (string-map (lambda (arg) (gen-arg-decl arg #f))
                  inputs)