* cpu/sh64-compact.cpu (movw5): Use Correct operand field for reg.
* cpu/sh64-media.cpu (-ldhi-byte, -ldhi-word, -ldhi-long): New macros.
(-ldlo-byte, -ldlo-word, -ldlo-long): Likewise.
(-sthi-word, -sthi-long -stlo-byte, -stlo-word, -stlo-long): Likewise.
(ldhil, ldhiq, ldlol, ldloq, stlol, stloq): Implement.
(mshfhib, mshfhil, mshfhiw, mshflob, mshflol, mshflow): Fix indices.
(-sthi-byte): If there is a single byte to store, store it at
proper address.
(sthil, sthiq): Fix big-endian behaviour.
(mcnvslw, mcnvswb, mcnvswub, mmacfxwl, mmacnfx.wl): Fix indices.
(mmulfxl, mmulfxw, mmulfxrpw, mmulhiwl, mmullowl): Likewise.
(saturate): Use Dimode to check if saturation operation is required.
(usaturate): Likewise.
(mpermw): Fix mask.
(-maddsl, -maddsub): Compute to-be-saturated value in wider mode.
(-maddsw, mmacfxwl, mmacnfx.wl, -mshaldsl, -mshaldsw): Likewise.
(-mshardl, -mshardw, -msubsl, -msubsub, -msubsw): Likewise.
(msadubq): Fix subword index in second operand of first subtraction.
* doc/rtl.texi: Fix typo: define-attr, not define-attribute.
(Enumerated constants): Mention that an ifield must not specify a
multi-ifield.
(Instruction operands): Ditto for index.
(Expressions) <parallel>: Remove misplaced mention of local
variables.
<if>: Mention that mode must be specified and non-VOID when the
result is used.
* doc/porting.texi: When referring to *.opc, mention they are in
the cpu subdir. Call top-level directory toplevel, not devo.
Close string in define-normal-insn example.
Matthew Green [Fri, 11 Jan 2002 07:24:49 +0000 (07:24 +0000)]
[cgen/ChangeLog]
* cpu/xstormy16.cpu (gr-Rbj-names): Rename this ...
(gr-Rb-names): ... to this.
(h-Rb): New hardware peice.
(h-Rbj): Use gr-Rb-names.
(Rb): Use h-Rb.
Dave Brolley [Thu, 3 Jan 2002 18:30:26 +0000 (18:30 +0000)]
2002-01-03 Dave Brolley <brolley@redhat.com>
* decode.scm (-distinguishing-bit-population): Compute num-insns, the
number of insns in the list. Update the population count function to
identify and prioritize 3 catgories of useful bits.
(-population-top-few): Don't consider bits with a population count of
zero.
(-build-decode-table-entry): Don't call
filter-harmlessly-ambiguous-insns. Filter out non-specialized and
identical insns at the next tree level.
* insn.scm (filter-harmlessly-ambiguous-insns): Note in a comment that
this function is no longer used.
(filter-non-specialized-ambiguous-insns): New function.
(filter-identical-ambiguous-insns): New function.
(find-identical-insn): New function.
(filter-harmlessly-ambiguous-insns): Removed.
* insn.scm (syntax-break-out): Change $ escape specifier
from \$ to $$, to reduce interactions with scheme and C escaping
conventions.
* doc/rtl.texi (Instructions): Document change.
* more 16/32-bit insn set support; simulator (sid)
2001-07-11 Frank Ch. Eigler <fche@redhat.com>
* sid-cpu.scm (-gen-mach-params): New proc to emit ...CHUNK_BITSIZE...
(cgen-desc.h): Call it.
* sid-decode.scm (-gen-decode-fn): Use base-insn-bitsize as
decode-size.
* utils-sim.scm (-gen-decode-insn-entry): For SID only, prepare
entire_insn for extraction, if it's shorter than base-insn-bitsize.
* some support for funny-endian 16/32-bit insn sets
[cgen/ChangeLog]
2001-07-11 Frank Ch. Eigler <fche@redhat.com>
* desc-cpu.scm (-gen-mach-table-defns): Emit fourth field: the
mach->cpu insn-chunk-bitsize.
(-gen-cpu-open): In @arch@_cgen_rebuild_tables, process above new
field toward CGEN_CPU_TABLE->insn_chunk_bitsize.
* mach.scm (<cpu>): New field insn-chunk-bitsize.
(-cpu-parse, -cpu-read): Parse/initialize it.
* doc/rtl.texi (define-cpu): Document it.
[opcodes/ChangeLog]
2001-07-11 Frank Ch. Eigler <fche@redhat.com>
* cgen-dis.in (print_insn): Use cgen_get_insn_value instead of
bfd_get_bits.
* cgen-opc.c (cgen_get_insn_value, cgen_put_insn_value): Respect
non-zero CGEN_CPU_DESC->insn_chunk_bitsize.
[include/opcode/ChangeLog]
2001-07-11 Frank Ch. Eigler <fche@redhat.com>
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.