Ben Elliston [Thu, 5 Jul 2001 12:45:47 +0000 (12:45 +0000)]
2001-07-05 Ben Elliston <bje@redhat.com>
* README: Update.
* read.scm (include): Include files from srcdir/cpu.
(-cgen): Likewise for loading .cpu files.
* *.cpu: Move all cpu descriptions into cpu subdirectory.
* *.opc: Likewise.
* simplify.inc: Likewise.
Ben Elliston [Wed, 4 Jul 2001 06:49:02 +0000 (06:49 +0000)]
2001-07-04 Ben Elliston <bje@redhat.com>
* read.scm (include): Log "Including file" message at level 1,
rather than outputting it with (display).
(cpu-load): Log "Loading cpu description" and "Processing cpu
description" messages at levels 1 and 2, respectively, rather than
using (display).
* cgen-asm.c (cgen_parse_keyword): When looking for the
boundaries of a keyword, allow any special characters
that are actually in one of the allowed keyword.
* cgen-opc.c (cgen_keyword_add): Add any special characters
to the nonalpha_chars field.
Geoff Keating [Thu, 14 Jun 2001 19:52:57 +0000 (19:52 +0000)]
* gas-test.scm (gen-gas-test): Create 8 testcases, not just 5.
(<operand> 'test-data): Involve both the index and the hardware
in testcase generation.
(<hw-indx> 'test-data): Generate test data from the underlying
object.
(<ifield> 'test-data): Generate test data by computing bit
patterns for the field, then decoding them.
(<hw-address> 'test-data): Allow for new calling convention.
(<hw-iaddress> 'test-data): Likewise.
(<keyword> 'test-data): Convert index values into keywords.
(<hw-asm> 'test-data): Convert index values into integer strings.
Ben Elliston [Fri, 11 May 2001 02:24:51 +0000 (02:24 +0000)]
2001-05-11 Ben Elliston <bje@redhat.com>
* gas-test.scm (cgen-build.sh, gentest): Escape $ with a backslash
when generating allinsn.d from objdump output. Without it, the
testsuite will treat $ as the regular expression for end of line.
Ben Elliston [Wed, 9 May 2001 01:34:03 +0000 (01:34 +0000)]
* doc/porting.texi (Doing a GAS port): Replace `cgen_opcode_open'
with `cgen_cpu_open'; documentation had become out of date.
* doc/rtl.texi (Instruction operands): Likewise.
[opcodes/ChangeLog]
2001-05-07 Frank Ch. Eigler <fche@redhat.com>
* cgen-dis.in (default_print_insn): Tolerate min<base instructions
even at end of a section.
* cgen-ibld.in (extract_normal): Tolerate min!=base!=max instructions
by ignoring precariously-unpacked insn_value in favor of raw buffer.
[cgen/ChangeLog]
2001-05-07 Frank Ch. Eigler <fche@redhat.com>
* iformat.scm (compute-insn-base-mask-length): Rewrite to tolerate
various-base-length instruction sets.
Ben Elliston [Mon, 2 Apr 2001 22:04:48 +0000 (22:04 +0000)]
2001-04-02 Ben Elliston <bje@redhat.com>
* sim-decode.scm (@prefix@_init_idesc_table): Compute tabsize
using the size of the table and its elements.
(-gen-decode-insn-globals): Define the idesc table's size to be
the last instruction enum plus one, not @PREFIX@_INSN_MAX.
* sim-model.scm (-gen-mach-defns): Define CPU_MAX_INSNS as the
last instruction enum plus one, not @CPU@_INSN_MAX.
Ben Elliston [Mon, 2 Apr 2001 21:18:27 +0000 (21:18 +0000)]
2001-04-02 Ben Elliston <bje@redhat.com>
* sid-cpu.scm (-last-insn): New function.
(-gen-sem-switch-engine): Loop through idesc while less than or
equal to the last instruction enum, not less than the MAX enum.
(-gen-sfrag-engine-fn): Clean up frag_label_table initialisation.
* sid-decode.scm (-gen-decode-insn-globals): Define the idesc
table's size to be the last instruction enum plus one, not
@PREFIX@_INSN_MAX.
* sid.scm (gen-cpu-insn-enum-decl): Do not append a dummy `max'
instruction onto the instruction list.
Ben Elliston [Mon, 26 Mar 2001 05:17:28 +0000 (05:17 +0000)]
2001-03-26 Ben Elliston <bje@redhat.com>
* gas-test.scm (<keyword>,test-data): Prefix keywords by their
specified prefix and, if necessary, escape `$' in gas-build.sh to
prevent unwanted shell variable expansion.
Ben Elliston [Sat, 24 Mar 2001 12:22:35 +0000 (12:22 +0000)]
2001-03-24 Ben Elliston <bje@redhat.com>
* gas-test.scm (<hw-asm>,test-data): Choose pseudo-random data.
(<keyword>,test-data): Likewise.
(<hw-address>,test-data): Likewise.
(<hw-iaddress>,test-data): Likewise.
(-collate-test-set): New function.
(build-test-set): Use it.
(gen-gas-test): Generate five test cases per instruction.
(cgen-allinsn.exp): Include "-*- Tcl -*-" in DejaGNU test file.
* read.scm: Load "slib/random" if random is not defined.
* slib/random.scm: New file.
Ben Elliston [Tue, 20 Mar 2001 19:30:13 +0000 (19:30 +0000)]
2001-03-20 Ben Elliston <bje@redhat.com>
* opc-itab.scm (-gen-insn-enum): Do not append a dummy `max'
instruction onto the instruction list. Define MAX_INSNS to be the
value of the last instruction enum plus one.
Frank Ch. Eigler [Mon, 29 Jan 2001 18:56:26 +0000 (18:56 +0000)]
* belated outward merge
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.
Johan Rydberg [Sat, 6 Jan 2001 15:44:00 +0000 (15:44 +0000)]
* openrisc.cpu (or32): Setup semantics for h-delay-insn to
current insn plus 4.
(h-delay-insn): New hardware register.
(l-jal): Uses h-delay-insn instead of pc when setting link register.
(l-jalr): Likewise.
(l-bal): Likewise.
Ben Elliston [Sat, 6 Jan 2001 12:11:09 +0000 (12:11 +0000)]
2001-01-06 Ben Elliston <bje@redhat.com>
* utils-gen.scm (gen-sfmt-enum-decl): Use @prefix@ and @PREFIX@
instead of @cpu@ and @CPU@ to generically prefix symbol names.
* sim-cpu.scm (-gen-sem-fn-table-entry): Likewise.
(-gen-semantic-fn-table): Likewise.
(-gen-scache-semantic-fn): Likewise.
(-gen-no-scache-semantic-fn): Likewise.
(cgen-read.c): Likewise.
(cgen-sem-switch.c): Likewise.
* desc-cpu.scm (cgen-desc.c): Use @arch@, not @prefix@, since this
is a filename prefix.
* sim-decode.scm (IDESC-TABLE-VAR): Use @prefix@, et al.
(-gen-decode-insn-globals): Likewise.
(-gen-idesc-decls): Likewise.
(cgen-decode.h): Likewise.
(cgen-decode.c): Likewise.
* sim.scm (gen-cpu-insn-enum-decl): Likewise.
(gen-cpu-insn-enum): Likewise.
(sim-finish!): Likewise.
* utils-sim.scm (gen-define-argbuf-macro): Handle sfmt=#f case, to be
used by simple/non-scache simulators.
* sim-cpu.scm (-gen-read-case): Call gen-define/undef-field-macro
regardless of with-scache?.
(-gen-write-case, -gen-no-scache-semantic-fn, -gen-sem-case): Ditto.
Ben Elliston [Fri, 1 Dec 2000 04:45:20 +0000 (04:45 +0000)]
2000-12-01 Ben Elliston <bje@redhat.com>
* sim-cpu.scm (cgen-cpu.h): Only emit argbuf, scache and extract
definitions if run without with-multipla-isa?.
(cgen-defs.h): New function. Emit an ISA-specific defs file.
* cgen-sim.scm (sim-arguments): Accept -G option to generate defs.
Ben Elliston [Fri, 24 Nov 2000 04:25:32 +0000 (04:25 +0000)]
2000-11-24 Ben Elliston <bje@redhat.com>
* sim-cpu.scm (-gen-hardware-struct): New function.
(-gen-hardware-types): If with-multiple-isa is specified, emit all
hardware elements wich have share one or more ISAs with the ISAs
being kept.
* utils-cgen.scm (gen-define-with-symcat): New function.
* desc-cpu.scm (gen-ifld-defns): Use it.
(gen-hw-table-defns): Use it.
(-gen-hash-defines): Use it.
(gen-operand-table): Use it.
(gen-insn-table): Use it. Remove spurious `#undef MNEM'.
* opc-itab.scm (-gen-ifmt-table): Use it.
(-gen-insn-opcode-table): Use it.
(-gen-macro-insn-table): Use it.
* opc-opinst.scm (-gen-operand-instance-tables): Use it.
* sim-cpu.scm (cgen-semantics.c): Use it.
(cgen-sem-switch.c): Use it.
Frank Ch. Eigler [Sat, 11 Nov 2000 17:26:22 +0000 (17:26 +0000)]
* parameter to enable sim decode/extract separation
2000-11-10 Frank Ch. Eigler <fche@redhat.com>
* utils-sim.scm (-gen-decode-insn-entry): Add fn? parameter to signal
request to emit calls to insn extractors as functions rather than
branches to inline blocks.
(-gen-decode-expr-set-itype, -gen-decode-expr-entry): Ditto.
(-gen-decode-table-entry, -gen-decoder-switch, gen-decoder): Ditto.
* sim-decode.c (-gen-decode-fn): Tell (gen-decode) to emit branches
to extractor clauses.
Frank Ch. Eigler [Fri, 10 Nov 2000 16:43:21 +0000 (16:43 +0000)]
* major sim decoder improvement
* minor diagnostic tweaks
2000-11-10 Frank Ch. Eigler <fche@redhat.com>
* decode.scm (-distinguishing-bit-population): Significantly
improve popularity heuristic. Renamed from
(-mask-bit-population): Gone.
(-population-above-threshold): Sort new bit numbers in order of
popularity.
(-population-top-few): Allow up to three more bits to be selected
than requested. Correct selection order to prefer better bits.
Correct bug in fewer-than-requested case. Keep threshold as
floating-point.
(decode-best-get-bits): Pass also the insn-values.
* utils-sim.scm (-gen-decoder-switch): Add comment suggesting a
future optimization.
* utils.scm (message): Format nested lists better.
Dave Brolley [Fri, 6 Oct 2000 16:55:16 +0000 (16:55 +0000)]
2000-10-06 Dave Brolley <brolley@redhat.com>
* utils-gen.scm (-gen-ifld-extract-base): Compute start position as
ifld-start + ifld-word-offset.
(gen-ifld-extract): Check adata-integral-insn? before checking whether
the field is beyond the base number of bits.
(gen-define-ifields): Use a base-length of 32 if adata-integral-insn?.
(gen-extract-ifields): Ditto.
* gas-test.scm (gentest): Generate backslashes before '[' and ']'
characters in the regular expression.
* consistency improvement for isa-filtering in *ifield parsers
2000-09-15 Frank Ch. Eigler <fche@redhat.com>
* enum.scm (define-full-insn-enum): Filter with keep-isa predicate.
* ifield.scm (-ifield-parse, -multi-ifield-parse): No longer assert
single-isa predicate, but support keep-isa filtering.
* rtl-c.scm (s-sequence): Handle nested c-calls in both
statement-expression and comma-expression contexts.
(s-c-call, s-c-raw-call): Add warning comment about bad assumption.
Frank Ch. Eigler [Tue, 22 Aug 2000 19:14:30 +0000 (19:14 +0000)]
* snapshot of work toward more complete support of derived-operands
2000-08-22 Frank Ch. Eigler <fche@redhat.com>
* Makefile.in (DIST_COMMON): Regenerated.
* ifield.scm (derived-ifield needed-iflds): New method.
* iformat.scm (-ifmt-lookup-sfmt!): Use base ifields for
sfmts built from derived-ifields.
* operand.scm (-derived-parse-encoding): Give derived-ifield a fixed
type symbol 'derived-ifield, not an unparseable string.
* utils-sim.scm (op-needed-iflds) Handler 'derived-ifield case.
(-sfmt-contents): Add tracing.
From Doug Evans <dje@transmeta.com>:
* sim.scm (operand cxmake-get): Result is a <c-expr>, not a string of
C code.
Doug Evans [Sun, 20 Aug 2000 22:52:32 +0000 (22:52 +0000)]
* rtl-c.scm (rtl-c-expr-with-estate): New fn.
(rtl-c-expr-parsed,rtl-c-expr): New fns.
(-rtl-c-get): Rename from rtl-c-get.
(rtl-c-get): New fn for getter logging.