DJ Delorie [Mon, 20 Apr 2009 19:38:09 +0000 (19:38 +0000)]
* intrinsics.scm (intrinsics-analyze!): Include aliases.
(guess-mode): Drop COP* syntax.
(need-insn): Add "--syscall--" to the list.
(enum-type): Drop COP* syntax.
(intrinsics.h): Likewise.
(intrinsic-protos.h): Change file header to allow it to be
included.
DJ Delorie [Sat, 18 Apr 2009 02:56:43 +0000 (02:56 +0000)]
[cgen]
* cpu/mep-c5.cpu (f-12s20): Change to signed.
(lhucpm1): Limit to C5 mach.
(dsp0,dsp1): Rewrite as aliases so that intrinsics are generated.
* cpu/mep-core.cpu (extend-cdisp10): New.
(f-cdisp10): Change to signed, use extend-cdisp10 to sign extend.
Dave Brolley [Wed, 18 Oct 2006 18:04:40 +0000 (18:04 +0000)]
2006-10-18 Dave Brolley <brolley@redhat.com>
* Contribute the following changes:
2006-07-11 Dave Brolley <brolley@redhat.com>
* cpu/sh64-compact.cpu (movual, movual2): New insns.
(movcol): New insn.
* cpu/sh.cpu (sh4a-nofpu-models): New pmacro.
* sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
hardware or memory mode which was used.
* sid-cpu.scm (hw-need-write-stack?): New function.
(-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
identify hardware which uses write stacks.
(useful-mode-names): Renamed to write-stack-memory-mode-names.
Initialized to an empty list.
(-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
hw-need-write-stack?.
* hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
(define-getters <hardware-base>): Define used-in-delay-rtl?.
(used-in-delay-rtl?): New method of <hardware-base>.
(hw-used-in-delay-rtl?): New function.
2006-06-20 Dave Brolley <brolley@redhat.com>
* sid.scm (gen-attr-type): Removed.
* cpu/sh.cpu (SH2a-nofpu-MACH): Add sh5.
(SH2a-MACH): Add sh5.
(sh2a-nofpu-models): Add units for sh5.
(sh2a-fpu-models): Likewise.
2006-06-15 Dave Brolley <brolley@redhat.com>
* cpu/sh-sim.cpu: New file.
* cpu/sh-sid.cpu: New file.
* cpu/sh64-media.cpu (dshci): Add xtiming argument and splice it in.
(All fields): Remap for (insn-lsb0? #f)
(All insns): Add timing specs.
* cpu/sh64-compact.cpu (dshcf,dshcop): Replace 'ignored' argument with
'xattrs' and .splice it in.
(32-BIT-INSN,SH4-GROUP,SH4A-GROUP): New insn attributes.
(h-frc,h-drc): Add PROFILE attribute.
(h-fpccr): Removed.
(h-vbr): New hardware.
(All fields): Remap for (insn-lsb0? #f)
(f-imm20-hi,f-imm20-lo,f-imm20): New fields.
(fr0,fmovm,fmovn,imm20,imm12x4,imm12x8,vbr): New operands.
(fpscr): Use h-fpscr.
(fsdm,fsdn): Use h-fsd.
(dshci): Add xtiming argument and splice it in.
(dr,xd): pmacros removed.
(All insns): Add timing specs, *-MACH attribibutes,
SH4{A}-GROUP attributes.
(divu,mulr,ldc-vbr,ldc-sr,ldcl-vbr,movl12,movl13,stcl-vbr): New insns.
* cpu/sh.cpu): Include sh-sid.cpu or sh-sim.cpu depending on whether
we're being processed for sim or sid.
(define-arch): Change insn-lsb0? for #f. Add machs sh2e, sh2a-fpu,
sh2a-nofpu, sh4-nofpu, sh4a-nofpu, sh4a, sh4al.
(define-isa compact): Add (isa-parallel-insns 2).
(define-isa media): Add (isa-parallel-insns 2). Add
(default-insn-word-bitsize 32). Change base-insn-bitsize to 32.
(define-mach): Add sh2e, sh2a-fpu, sh2a-nofpu, sh4-nofpu, sh4a-nofpu,
sh4a, sh4al
(SH2-MACH, SH2e-MACH, SH2a-nofpu-MACH, SH2a-MACH, SH3-MACH)
(SH3e-MACH, SH4-nofpu-MACH, SH4-MACH, SH4a-nofpu-MACH, SH4a-MACH)
(SH4al-MACH, SH5-MACH): New pmacros.
(common-units, common-fp-units, sh2a-nofpu-units, sh2a-fpu-units)
(sh4-nofpu-units, sh4-common-fp-units, sh5-media-units)
(sh5-media-fp-units, common-model, common-model-with-fp)
(sh3-model, sh3e-model): New pmacros.
(define-model sh2): New model.
(define-model sh2e): New model.
(define-model sh3): New model.
(define-model sh3e): New model.
(define-model sh2a-nofpu): New model.
(define-model sh2a-fpu): New model.
(define-model sh4-nofpu): New model.
(define-model sh4): New model.
(define-model sh4a-nofpu): New model.
(define-model sh4a): New model.
(define-model sh4al): New model.
(define-model sh5-media): New model.
(define-model sh5): Add all units.
(all-models, sh2e-models, sh2a-nofpu-models, sh2a-fpu-models)
(sh3-models, sh3e-models, sh4-nofpu-models, sh4-models)
(sh5-media-models, shad-models, fsqrt-models): New pmacros.
(h-pc): Add PROFILE attribute.
(h-fr): Likewise.
(h-tr): Likewise.
(h-gr,h-grc): Likewise.
(h-cr): Set h-sr in setter.
(h-frbit): Get/Set h-fpscr.
(h-szbit,h-prbit): Likewise.
(h-fp): Add PROFILE attribute. Now indexed by even indices 0-62.
Add getter and setter.
(h-fc): Add PROFILE attribute. Now indexed by quad indices 0-60.
Adjust getter and setter.
(h-fmtx): Add PROFILE attribute. Now indexed by 0, 16, 32 and 48.
Adjust getter and setter.
(h-dr): Add PROFILE attribute. Now indexed by even indices 0-62.
(h-fsd,h-fmov): New hardware.
Dave Brolley [Fri, 14 Jul 2006 18:49:32 +0000 (18:49 +0000)]
2006-07-14 Dave Brolley <brolley@redhat.com>
* sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
hardware or memory mode which was used.
* sid-cpu.scm (hw-need-write-stack?): New function.
(-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
identify hardware which uses write stacks.
(useful-mode-names): Renamed to write-stack-memory-mode-names.
Initialized to an empty list.
(-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
hw-need-write-stack?.
* hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
(define-getters <hardware-base>): Define used-in-delay-rtl?.
(used-in-delay-rtl?): New method of <hardware-base>.
(hw-used-in-delay-rtl?): New function.
Dave Brolley [Tue, 9 May 2006 16:17:07 +0000 (16:17 +0000)]
2006-05-09 Dave Brolley <brolley@redhat.com>
* read.scm (include): Use arch-path as file location.
(arch-path): Define it with a default setting.
(-cgen): Update arch-path when "-a" option is specified.
Dave Brolley [Fri, 29 Jul 2005 19:25:33 +0000 (19:25 +0000)]
2005-07-29 Dave Brolley <brolley@redhat.com>
* sid-cpu.scm (-gen-scache-semantic-fn): Generate a declation of 'writte
n'
if with-profile or with-parallel-write.
(cgen-semantics.cxx): Make the @prefix@ namespace available if with-para
llel.
Dave Brolley [Wed, 18 May 2005 21:52:57 +0000 (21:52 +0000)]
2005-05-18 Dave Brolley <brolley@redhat.com>
* utils-sim.scm (-gen-decode-default-entry): New function.
(-gen-decode-insn-entry): Now takes 'invalid-insn' argument. Generate
code to check that all opcodes bits match.
(-gen-decoder-switch): Use -gen-decode-default-entry.
Jim Blandy [Tue, 17 May 2005 01:47:16 +0000 (01:47 +0000)]
* sid.scm (gen-ifetch): Require BITSIZE to be exactly the size
fetched by one of our GETIMEM* methods.
* utils-gen.scm (-extract-chunk-specs): Always fetch full
base-insn-sized chunks.
Nick Clifton [Fri, 18 Mar 2005 16:12:36 +0000 (16:12 +0000)]
Change wording of error message to "percent-operand" from "%operand" as the
latter confuses xgettext into thinking that it is a C printf formating directive,
which prevents proper translation.
Dave Brolley [Wed, 16 Feb 2005 21:52:33 +0000 (21:52 +0000)]
2005-02-16 Dave Brolley <brolley@redhat.com>
* utils.scm: Update copyright years.
* utils-gen.scm (gen-ifld-extract): Pass base-length to -gen-ifld-extrac
t-base.
* sid.scm (gen-ifetch): Handle the case where bitsize == 24.
Jim Blandy [Tue, 15 Feb 2005 09:01:49 +0000 (09:01 +0000)]
Make backtraces work more reliably.
* guile.scm: Set up debugging parameters, and enable debugging and
source positions while loading.
(cgen-call-with-debugging, cgen-debugging-stack-start): New
functions.
* read.scm: Don't set debugging parameters here.
(catch-with-backtrace): Function deleted.
(-cgen): Simply note the presence or absence of the -b option.
Pass the flag to cgen-call-with-debugging, so debugging is turned
off here if the user didn't request it, for faster computation.
(cgen): Call cgen-debugging-stack-start here, instead of
catch-with-backtrace.
* Makefile.am (GUILE): Explicitly load guile.scm here, and leave a
trailing -s.
(desc, html, opcodes, sim-arch, sim-cpu, gas-test, sim-test):
Don't write out the trailing -s here.
* Makefile.in: Regenerated.
* cgen-doc.scm, cgen-gas.scm, cgen-stest.scm): Don't load
fixup.scm here; let the caller decide which Scheme's customization
file to preload.
* dev.scm: Load guile.scm, not fixup.scm.
* fixup.scm: Deleted; contents have all moved to guile.scm.
* README: Doc fix.
Jim Blandy [Wed, 9 Feb 2005 22:04:03 +0000 (22:04 +0000)]
cgen/ChangeLog:
2005-02-09 Jim Blandy <jimb@redhat.com>
* cgen-sim.scm (load-files): Don't load fixup.scm. (See
corresponding change in the sim/common directory.)
sim/common/ChangeLog:
2005-02-09 Jim Blandy <jimb@redhat.com>
* Make-common.in (CGEN): Load guile.scm, and include a trailing
'-s' argument.
(CGEN_FLAGS_TO_PASS): Include single quotes around the reference
to $(CGEN), to ensure that the command substitution happens where
the variable is referenced in the submake, not when the submake's
arguments are expanded.
(cgen.sh): Be prepared for the 'cgen' argument to contain spaces.
(arch, cpu, decode, cpu-decode, defs, desc): Place the name of the
application Scheme script directly after ${cgen}; don't precede it
with a -s.
Jim Blandy [Tue, 8 Feb 2005 04:52:23 +0000 (04:52 +0000)]
cgen/ChangeLog:
2005-02-07 Jim Blandy <jimb@redhat.com>
* cgen-opc.scm: Don't load fixup.scm here. (See corresponding
changes in the opcodes directory.)
opcodes/ChangeLog:
2005-02-07 Jim Blandy <jimb@redhat.com>
* Makefile.am (CGEN): Load guile.scm before calling the main
application script.
* Makefile.in: Regenerated.
* cgen.sh: Be prepared for the 'cgen' argument to contain spaces.
Simply pass the cgen-opc.scm path to ${cgen} as its first
argument; ${cgen} itself now contains the '-s', or whatever is
appropriate for the Scheme being used.
Jim Blandy [Mon, 7 Feb 2005 18:51:31 +0000 (18:51 +0000)]
cgen/ChangeLog:
2005-02-07 Jim Blandy <jimb@redhat.com>
* guile.scm: New file, containing Guile-specific definitions and
adaptations. This is loaded by the app-specific shell scripts.
Initially identical to fixup.scm.
* cgen-sid.scm: Don't load fixup.scm here.
sid/component/cgen-cpu/ChangeLog:
2005-02-02 Jim Blandy <jimb@redhat.com>
* CGEN.sh.in: Request on the command line that cgen/guile.scm be
loaded before cgen-sid.scm; cgen-sid.scm no longer loads fixup.scm.
Jim Blandy [Thu, 16 Dec 2004 21:24:07 +0000 (21:24 +0000)]
* utils-cgen.scm (parse-name): Don't assume that string-map can be
applied to symbols. Process everything as strings, and then
convert to a symbol at the end.
Jim Blandy [Thu, 16 Dec 2004 21:23:13 +0000 (21:23 +0000)]
* read.scm (debug-repl): Temporarily redirect input and output to
/dev/tty while we debug, so we don't interfere with whatever CGEN
is reading or writing.
* utils.scm (setter-getter-fluid-let, with-input-and-output-to):
New functions.
Dave Brolley [Thu, 29 Jan 2004 20:20:48 +0000 (20:20 +0000)]
2004-01-29 Dave Brolley <brolley@redhat.com>
* decode.scm (-opcode-slots): For short insns, generate 'opcode' with
zeroes in the extra bit positions and generate 'opcode-mask' with ones
in the extra bit positions.
Dave Brolley [Sun, 26 Oct 2003 19:40:30 +0000 (19:40 +0000)]
2003-10-26 Dave Brolley <brolley@redhat.com>
* sid-decode.scm (-gen-record-profile-args): Test trace_counter_p
and final_insn_count_p. Don't test WITH_PROFILE_MODEL_P.
(-gen-extract-fn): Call -gen-record-profile-args.
* Makefile.am (ARCHFILE): New var.
(desc): Pass $(ARCHFILE) for -a parm, not $(ARCH).
(html,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Ditto.
* Makefile.in: Regenerate.
Dave Brolley [Mon, 8 Sep 2003 17:17:22 +0000 (17:17 +0000)]
2003-09-08 Dave Brolley <brolley@redhat.com>
On behalf of Doug Evans <dje@sebabeach.org>
Pass in paths to input files, instead of assuming they live in
$srcdir/cpu. Plus misc. option processing cleanup.
* cgen-doc.scm (doc-arguments): Make options strings not symbols.
Add pre-process pass to all options.
* cgen-gas.scm (gas-arguments): Ditto.
* cgen-sid.scm (sim-arguments): Ditto.
* cgen-sim.scm (sim-arguments): Ditto.
* cgen-stest.scm (stest-arguments): Ditto.
* cgen-opc.scm (opc-arguments): Ditto. New argument -OPC.
(-opc-file-path): New global.
(opc-file-path): New fn.
* opcodes.scm (read-cpu.opc): Replace srcdir,cpu args with opc-file.
All callers updated.
(gen-extra-cpu.h,gen-extra-cpu.c,gen-extra-opc.h,gen-extra-opc.c,
gen-extra-asm.c,gen-extra-dis.c,gen-extra-ibld.h,gen-extra-ibld.c):
Replace srcdir arg with opc-file. All callers updated.
* read.scm (-opt-spec-update): Delete.
(opt-get-first-pass,opt-get-second-pass): New fns.
(-cgen): Process application-specific arguments in two passes.