+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
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.
; 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))))
; 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?
"\
} operands;
/* For conditionally written operands, bitmask of which ones were. */
- unsigned written;
+ unsigned long long written;
};\n\n"
)
)
"")
(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"
" @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.
"")
; 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.
"")
; 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.
// 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);
; 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)