1 2005-12-05 Hans-Peter Nilsson <hp@axis.com>
3 * utils-sim.scm (-gen-decode-insn-entry): Correct last change for
4 non-(adata-integral-insn? CURRENT-ARCH) case.
6 2005-10-28 Dave Brolley <brolley@redhat.com>
8 Contribute the following changes:
9 2005-09-19 Dave Brolley <brolley@redhat.com>
11 * attr.scm (gen-value-for-defn-raw): New methods.
12 (gen-value-for-defn): Don't test for 'SID-SIMULATOR. Call
13 gen-value-for-defn-raw.
14 * sid.scm (gen-obj-attr-sid-defn): Call gen-value-for-defn-raw.
16 2002-12-13 Dave Brolley <brolley@redhat.com>
18 * utils-cgen.scm (gen-attr-type): Moved from sid.scm.
19 (-gen-attr-accessors): New function.
20 (gen-obj-attr-defn): Update terminating initializer.
21 (gen-obj-attr-end-defn): New function.
22 * sid.scm (gen-attr-type): Moved to utils-cgen.scm.
23 * sid-cpu.scm (cgen-desc.h): Generate code to include
24 "opcode/cgen-bitset.h"
25 * intrinsics.scm (kept-insn-isas): Correct the extraction of the isa
27 * desc.scm ('gen-defn): Update terminating initializer.
28 * desc-cpu.scm (gen-ifld-decls): Call -gen-attr-accessors. Update
29 terminatinig initializer.
30 (gen-hw-decls): Ditto.
31 (gen-operand-decls): Ditto.
32 (gen-insn-decls): Ditto.
33 (-gen-hash-defines): Generate code to include "opcde/cgen-bitset.h"
34 (gen-insn-table): Update terminating initializer.
35 (-gen-cpu-open): Update generation of @arch@_cgen_rebuild_tables,
36 @arch@_cgen_cpu_open, @arch@_cgen_cpu_close.
37 * attr.scm (charmask-bytes): New function.
38 (bitset-attr->charmask): New function.
39 (<bitset-attribute>): Handle isa-attributes specially. Also handle
40 differences for SID-SIMULATOR.
41 (<integer-attribute>): Handle differences for SID-SIMULATOR.
42 (<enum-attribute>): Ditto.
44 2005-10-26 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
46 * cpu/m32r.opc (parse_hi16): Do not assume a 32-bit host word size.
48 2005-10-24 DJ Delorie <dj@redhat.com>
50 * operand.scm (-anyof-merge-syntax): Print a more useful error
53 2005-10-19 Nick Clifton <nickc@redhat.com>
55 * cpu/m32r.opc (parse_slo16): Fix bad application of previous
58 2005-10-18 Andreas Schwab <schwab@suse.de>
60 * cpu/m32r.opc (parse_slo16): Better version of previous patch.
62 2005-10-14 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
64 * cpu/m32r.opc (parse_slo16): Do not assume a 32-bit host word
67 2005-08-02 Dave Brolley <brolley@redhat.com>
69 * rtl-c.scm (s-unop): Don't dereference
70 CGEN_CPU_FPU (current_cpu)->ops->xxxxx in the generated code.
71 (s-binop, s-convop, s-cmpop): Likewise.
73 2005-07-29 Dave Brolley <brolley@redhat.com>
75 * sid-cpu.scm (-gen-scache-semantic-fn): Generate a declation of 'written'
76 if with-profile or with-parallel-write.
77 (cgen-semantics.cxx): Make the @prefix@ namespace available if with-parallel.
78 * operand.scm (op:new-mode): Convert (obj:name op) to a string for
81 2005-07-15 Alan Modra <amodra@bigpond.net.au>
83 * cpu/fr30.opc (print_register_list): Correct format strings.
84 * cpu/ip2k.opc: Likewise.
86 2005-07-05 Nick Clifton <nickc@redhat.com>
88 * cpu/iq2000.opc (parse_lo16, parse_mlo16): Make value parameter
89 unsigned in order to avoid compile time warnings about sign
92 2005-07-01 Nick Clifton <nickc@redhat.com>
94 * desc-cpu.scm: Update to ISO C90 function declaration style.
95 * opc-asmdis.scm: Likewise.
96 * opc-ibld.scm: Likewise.
97 * opc-itab.scm: Likewise.
98 * cpu/fr30.opc: Likewise.
99 * cpu/i960.opc: Likewise.
100 * cpu/ip2k.opc: Likewise.
101 * cpu/iq2000.opc: Likewise.
102 * cpu/m32r.opc: Likewise.
103 * cpu/openrisc.opc: Likewise.
104 * cpu/sh.opc: Likewise.
105 * cpu/sparc.opc: Likewise.
106 * cpu/xstormy16.opc: Likewise.
108 2005-06-15 Dave Brolley <brolley@redhat.com>
110 * sid-cpu.scm (-gen-hw-stream-and-destream-fns): New function.
111 (cgen-cpu.h): Call it.
113 Contributed on behalf of Graydon Hoare
114 2001-06-05 graydon hoare <graydon@redhat.com>
116 * utils.scm (foldl): Define.
120 (intersection): Simplify.
121 * sid.scm : Set APPLICATION to SID-SIMULATOR.
122 (-op-gen-delayed-set-maybe-trace): Define.
123 (<operand> 'gen-set-{quiet,trace}): Delegate to
124 op-gen-delayed-set-quiet etc. Note: this is still a little tangled
125 up and needs cleaning.
126 (-with-parallel?): Hardwire with-parallel to #t.
127 (<operand> 'cxmake-get): Replace with lookahead-aware code
128 * sid-decode.scm: Remove per-insn writeback fns.
129 (-gen-idesc-decls): Redefine sem_fn type.
130 * sid-cpu.scm (gen-write-stack-structure): Replace parexec stuff
131 with write stack stuff.
132 (cgen-write.cxx): Replace per-insn writebacks with single write
133 stack writeback. Add write stack reset function.
134 (-gen-scache-semantic-fn insn): Replace parexec stuff with write
136 * rtl-c.scm (xop): Clone operand into delayed operand if #:delayed
137 estate attribute set.
138 (delay): Set #:delayed attribute to calculated delay, update
139 maximum delay of cpu, check (delay ...) usage.
140 * operand.scm (<operand>): Add delayed slot to <operand>.
141 * mach.scm (<cpu>): Add max-delay slot to <cpu>.
142 * dev.scm (load-sid): Set APPLICATION to SID-SIMULATOR.
143 * doc/rtl.texi (Expressions): Add section on (delay ...).
145 2005-06-13 Jim Blandy <jimb@redhat.com>
147 * pmacros.scm (-pmacro-upcase, -pmacro-downcase): Handle symbols
150 2005-06-07 Zack Weinberg <zack@codesourcery.com>
152 * doc/porting.texi: Change all mention of md_apply_fix3 and
153 gas_cgen_md_apply_fix3 to md_apply_fix and gas_cgen_md_apply_fix
156 2005-05-18 Dave Brolley <brolley@redhat.com>
158 * utils-sim.scm (-gen-decode-default-entry): New function.
159 (-gen-decode-insn-entry): Now takes 'invalid-insn' argument. Generate
160 code to check that all opcodes bits match.
161 (-gen-decoder-switch): Use -gen-decode-default-entry.
163 2005-05-16 Jim Blandy <jimb@redhat.com>
165 * sid.scm (gen-ifetch): Require BITSIZE to be exactly the size
166 fetched by one of our GETIMEM* methods.
167 * utils-gen.scm (-extract-chunk-specs): Always fetch full
168 base-insn-sized chunks.
170 2005-05-10 Nick Clifton <nickc@redhat.com>
172 * Update the address and phone number of the FSF organization in
173 the GPL notices in the following files:
174 COPYING.CGEN, utils.scm, cpu/iq2000m.cpu, cpu/openrisc.cpu,
175 cpu/powerpc.cpu, slib/random.scm
177 2005-05-06 Jim Blandy <jimb@redhat.com>
179 * pprint.scm, cos-pprint.scm: Add documentation.
181 * pprint.scm (pprint): Don't wipe out elide-table after each call.
183 * pprint.scm, cos-pprint.scm: New files.
185 2005-04-04 Nick Clifton <nickc@redhat.com>
187 * opcodes.scm (-gen-parse-address): Initialise value to zero to
188 avoid a compile time warning.
190 2005-03-18 Nick Clifton <nickc@redhat.com>
192 * cpu/ip2k.opc (parse_lit8): Change wording of error message to
193 "percent-operand" from "%operand" as the latter confuses xgettext
194 into thinking that it is a C printf formating directive, which
195 prevents proper translation.
197 2005-02-23 Nick Clifton <nickc@redhat.com>
199 * opcodes.scm (gen-parse-number): Add a cast to the desired
200 pointer signed'ness in order to prevent compile time warnings.
201 * cpu/ip2k.opc: Fixed compile time warnings about differing
202 signed'ness of pointers passed to functions.
203 * cpu/iq2000.opc: Likewise.
204 * cpu/m32r.opc: Likewise.
205 * cpu/openrisc.opc: Likewise.
206 * cpu/xstormy16.opc: Likewise.
208 2005-02-22 Alan Modra <amodra@bigpond.net.au>
210 * desc-cpu.scm (gen-ifld-decls): Move cgen_ifld_table from here..
211 (cgen-desc.h): ..to here, after opcode/cgen.h include.
213 2005-02-16 Dave Brolley <brolley@redhat.com>
215 * utils.scm: Update copyright years.
216 * utils-gen.scm (gen-ifld-extract): Pass base-length to -gen-ifld-extract-base.
217 * sid.scm (gen-ifetch): Handle the case where bitsize == 24.
218 * operand.scm (-derived-operand-parse): Move logit message from level 1
221 2005-02-15 Nick Clifton <nickc@redhat.com>
223 * opc-itab.scm (-gen-ifmt-table-1): Add an ATTRIBUTE_UNUSED to
224 prevent compile time warning messages.
225 * opc-opinst.scm (-gen-operand-instance-table): Likewise.
226 * utils-gen.scm (attr-int-gen-defn): Likewise.
227 (attr-gen-defn): Likewise.
228 * cpu/ip2k.opc (parse_addr16_p): Remove unused function.
229 (print_dollarhex16): Remove unused function.
231 2005-02-15 Jim Blandy <jimb@redhat.com>
233 * guile.scm (cgen-call-with-debugging): Doc fix.
235 Make backtraces work more reliably.
236 * guile.scm: Set up debugging parameters, and enable debugging and
237 source positions while loading.
238 (cgen-call-with-debugging, cgen-debugging-stack-start): New
240 * read.scm: Don't set debugging parameters here.
241 (catch-with-backtrace): Function deleted.
242 (-cgen): Simply note the presence or absence of the -b option.
243 Pass the flag to cgen-call-with-debugging, so debugging is turned
244 off here if the user didn't request it, for faster computation.
245 (cgen): Call cgen-debugging-stack-start here, instead of
246 catch-with-backtrace.
248 * Makefile.am (GUILE): Explicitly load guile.scm here, and leave a
250 (desc, html, opcodes, sim-arch, sim-cpu, gas-test, sim-test):
251 Don't write out the trailing -s here.
252 * Makefile.in: Regenerated.
253 * cgen-doc.scm, cgen-gas.scm, cgen-stest.scm): Don't load
254 fixup.scm here; let the caller decide which Scheme's customization
256 * dev.scm: Load guile.scm, not fixup.scm.
257 * fixup.scm: Deleted; contents have all moved to guile.scm.
260 * guile.scm (debug-write): New function.
262 2005-02-14 Jim Blandy <jimb@redhat.com>
264 * pmacros.scm (pmacros-init!): For .eval macros, use eval1 as the
265 transformer procedure, not eval. Transformer procedures take one
268 2005-02-11 Nick Clifton <nickc@redhat.com>
270 * cpu/iq2000.opc (parse_jtargq10): Change type of valuep argument
271 to 'bfd_vma *' in order avoid compile time warning message.
273 2005-02-09 Jim Blandy <jimb@redhat.com>
275 * cgen-sim.scm (load-files): Don't load fixup.scm. (See
276 corresponding change in the sim/common directory.)
278 2005-02-07 Jim Blandy <jimb@redhat.com>
280 * cgen-opc.scm: Don't load fixup.scm here. (See corresponding
281 changes in the opcodes directory.)
283 * guile.scm: New file, containing Guile-specific definitions and
284 adaptations. This is loaded by the app-specific shell scripts.
285 Initially identical to fixup.scm.
286 * cgen-sid.scm: Don't load fixup.scm here.
288 * cos.scm: Profile elm-xset! when requested, not elm-set!; the
291 2005-01-27 Jim Blandy <jimb@redhat.com>
293 * utils.scm (string/symbol->append): Renamed from 'concat'.
294 * opcodes.scm (gen-switch): Use new name.
295 * insn.scm (-sub-insn-make!): Same.
296 * rtl.scm (rtx-dump): Same.
297 * semantics.scm (semantic-compile): Same.
299 2005-01-20 Jim Blandy <jimb@redhat.com>
301 * opcodes.scm (gen-switch): Use concat instead of string-map.
303 * utils.scm (concat): New function.
304 * insn.scm (-sub-insn-make!): Use concat instead of string-map.
305 * rtl.scm (rtx-dump): Same.
306 * semantics.scm (semantic-compile): Same.
308 2004-12-16 Jim Blandy <jimb@redhat.com>
310 * utils-cgen.scm (parse-name): Don't assume that string-map can be
311 applied to symbols. Process everything as strings, and then
312 convert to a symbol at the end.
314 * read.scm (debug-repl): Temporarily redirect input and output to
315 /dev/tty while we debug, so we don't interfere with whatever CGEN
316 is reading or writing.
317 * utils.scm (setter-getter-fluid-let, with-input-and-output-to):
320 2004-11-15 Michael K. Lechner <mike.lechner@gmail.com>
322 * cpu/iq2000.cpu: Added quotes around macro arguments so that they
323 will work with newer versions of guile.
325 2004-10-27 Nick Clifton <nickc@redhat.com>
327 * cpu/iq2000m.cpu: Import latest version from cpu/ directory.
328 * cpu/iq2000.cpu: Likewise.
330 2004-07-21 DJ Delorie <dj@redhat.com>
332 * cpu/xstormy16.cpu (movhmemgr): Use hmem8, not lmem8.
334 2003-03-14 Frank Ch. Eigler <fche@redhat.com>
336 * cpu/iq2000.opc (parse_jtargq10): Add ATTRIBUTE_UNUSED on unused args.
337 (parse_jtargq10, iq2000_cgen_isa_register, parse_mlo16): Declare.
339 2004-03-30 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
341 * cpu/m32r.opc (parse_hi16): Fixed shigh(0xffff8000) bug.
343 2004-03-22 Dave Brolley <brolley@redhat.com>
345 * utils.scm (copyright-fsf): Update copyright years.
346 (copyright-red-hat): Ditto.
347 * sid.scm (-op-gen-set-trace): Generate trace code before semantic
349 (-op-gen-set-trace-parallel): Ditto.
351 2004-02-10 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.dot.com>
353 * cpu/m32r.opc (my_print_insn): Fixed incorrect output when
354 disassembling codes for 0x*2 addresses.
356 2004-01-29 Dave Brolley <brolley@redhat.com>
358 * decode.scm (-opcode-slots): For short insns, generate 'opcode' with
359 zeroes in the extra bit positions and generate 'opcode-mask' with ones
360 in the extra bit positions.
362 2003-12-15 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
364 * cpu/m32r.cpu: Add PIPE_O attribute to "pop" instruction.
366 2003-12-04 Alan Modra <amodra@bigpond.net.au>
368 * cpu/openrisc.opc (openrisc_sign_extend_16bit): Don't rely on
369 "short" being 16 bit.
370 (parse_hi16): Likewise. Fix type-punned pointer warnings too, and
371 internationalize error message.
372 (parse_lo16): Likewise. Remove useless code.
374 2003-12-03 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
376 * cpu/m32r.cpu : Add new model m32r2.
377 Add new instructions.
378 Replace occurrances of 'Mitsubishi' with 'Renesas'.
379 Changed PIPE attr of push from O to OS.
380 Care for Little-endian of M32R.
381 * cpu/m32r.opc (CGEN_DIS_HASH, my_print_insn):
382 Care for Little-endian of M32R.
383 (parse_slo16): signed extension for value.
385 2003-10-26 Dave Brolley <brolley@redhat.com>
387 * sid-decode.scm (-gen-record-profile-args): Test trace_counter_p
388 and final_insn_count_p. Don't test WITH_PROFILE_MODEL_P.
389 (-gen-extract-fn): Call -gen-record-profile-args.
391 2003-10-21 Dave Brolley <brolley@redhat.com>
393 * sid-model.scm (-gen-model-class-decls): Generate MAX_UNITS as
395 * decode.scm (-opcode-slots): Correct typo in logit call.
397 2003-10-09 Jim Blandy <jimb@redhat.com>
399 * desc-cpu.scm (gen-hw-table-decls): Emit an 'extern' declaration
400 for @arch@_cgen_hw_table. GDB needs to be able to find this.
402 * mach.scm (def-isa-attr!): hardware can have ISA attributes, too.
404 2003-10-06 Dave Brolley <brolley@redhat.com>
406 * gen-all-doc: Add fr550.
408 2003-09-11 Doug Evans <dje@sebabeach.org>
410 * Makefile.am (ARCHFILE): New var.
411 (desc): Pass $(ARCHFILE) for -a parm, not $(ARCH).
412 (html,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Ditto.
413 * Makefile.in: Regenerate.
415 2003-09-08 Dave Brolley <brolley@redhat.com>
417 On behalf of Doug Evans <dje@sebabeach.org>
418 Pass in paths to input files, instead of assuming they live in
419 $srcdir/cpu. Plus misc. option processing cleanup.
420 * cgen-doc.scm (doc-arguments): Make options strings not symbols.
421 Add pre-process pass to all options.
422 * cgen-gas.scm (gas-arguments): Ditto.
423 * cgen-sid.scm (sim-arguments): Ditto.
424 * cgen-sim.scm (sim-arguments): Ditto.
425 * cgen-stest.scm (stest-arguments): Ditto.
426 * cgen-opc.scm (opc-arguments): Ditto. New argument -OPC.
427 (-opc-file-path): New global.
428 (opc-file-path): New fn.
429 * opcodes.scm (read-cpu.opc): Replace srcdir,cpu args with opc-file.
431 (gen-extra-cpu.h,gen-extra-cpu.c,gen-extra-opc.h,gen-extra-opc.c,
432 gen-extra-asm.c,gen-extra-dis.c,gen-extra-ibld.h,gen-extra-ibld.c):
433 Replace srcdir arg with opc-file. All callers updated.
434 * read.scm (-opt-spec-update): Delete.
435 (opt-get-first-pass,opt-get-second-pass): New fns.
436 (-cgen): Process application-specific arguments in two passes.
438 2003-08-29 Dave Brolley <brolley@redhat.com>
440 * cpu/frv.cpu: Removed.
441 * cpu/frv.opc: Removed.
443 2003-08-21 Nick Clifton <nickc@redhat.com>
445 * cpu/frv.cpu (mbtoh): Replace input parameter to
446 u-media-dual-expand and u-media-dual-btoh with output parameter.
447 (cmbtoh): Add profiling hack.
449 2003-08-19 Michael Snyder <msnyder@redhat.com>
451 * cpu/frv.cpu: Fix typo, Frintkeven -> FRintkeven
453 2003-08-07 Michael Meissner <gnu@the-meissners.org>
455 * opc-opinst.scm (-gen-operand-instance-table): Initialize all of
456 the elements for the END record of CGEN_OPINST, silencing warnings.
458 2003-07-15 Doug Evans <dje@sebabeach.org>
460 Add guile 1.6.4 support.
461 - empty list must be quoted
462 - string functions have stricter type checking
463 - eval now takes a second argument
464 - symbol-bound? is deprecated
465 * attr.scm (-attr-parse): Use stringsym-append to build errtxt.
466 (bitset-attr->list): Ensure arg to string-cut is a string.
467 (attr-parse): Ensure args to string-ref and string-drop1 are strings.
468 (<enum-attribute>,gen-value-for-defn): Fetch string name of self.
469 * cos.scm (-class-list): Must quote empty list.
470 (-class-parent-classes,-class-compute-class-desc): Ditto.
471 (class-make,make,object-reset!): Ditto.
472 (method-make-make!): Call eval1 instead of eval.
473 (method-make-forward!,method-make-virtual-forward!): Ditto.
474 * decode.scm (subdtable-add): Use stringsym-append instead of
476 (-gen-exprtable-name): Fetch string name of exprtable-entry-insn.
477 (-build-decode-table-entry): Fetch string name of insn.
478 * desc-cpu.scm (-gen-isa-table-defns): Fetch string name of isa.
479 (-gen-mach-table-defns): Ditto for mach.
480 (gen-ifld-defns): Ditto for ifld.
481 (gen-hw-table-defns): Ditto for hw.
482 (gen-operand-table): Ditto for op.
483 (gen-insn-table-entry): Ditto for insn.
484 * desc.scm (gen-attr-table-defn): Ditto for attr.
485 (<keyword>,gen-defn): Don't pass symbols to string-append.
486 * enum.scm (parse-enum-vals): Use symbolstr-append instead of
488 (enum-vals-upcase): Use symbol-upcase to build result.
489 (-enum-parse): Use stringsym-append to build errtxt.
490 * fixup.scm (*guile-major-version*,*guile-minor-version*): New globals.
491 (eval1): New function.
492 (symbol-bound?): Provide own version if >= guile 1.6.
493 * hardware.scm (define-keyword): Use string-append instead of
495 * html.scm (gen-html-header,gen-table-of-contents,gen-arch-intro,
496 cgen.html,cgen-insn.html): Convert current-arch-name to a string
498 (gen-list-entry): Handle either symbol or string `name' arg.
499 (gen-obj-doc-header): Fetch string name of `o' arg.
500 (define-cpu-intro): Ditto for cpu.
501 (gen-mach-intro): Ditto for mach.
502 (gen-model-intro): Ditto for model.
503 (gen-isa-intro): Ditto for isa.
504 (gen-machine-doc-1): Ditto for isa.
505 (gen-reg-doc-1): Convert mach to string first.
506 (gen-insn-doc-1): Ditto. Convert model/unit names to strings first.
507 (gen-insn-doc-list): Fetch string name of mach. Convert insn name
509 (gen-insn-categories): Fetch string name of mach. Convert
510 enum-val-name to string first.
511 (gen-insn-docs): Fetch string name of mach.
512 * ifield.scm (ifld-ilk): Result is a string.
513 * iformat.scm (-ifmt-search-key): Convert attr value to string first.
514 Fetch string name of ifld.
515 (-sfmt-search-key): Similarily for ifld and op.
516 * insn.scm (syntax-make): Fetch string name of syntax element.
517 * mach.scm (-cpu-parse): Use stringsym-append to build errtxt.
518 * minsn.scm (minsn-make-alias): Fetch string name of minsn.
519 * mode.scm (mode:c-type): Result is a string.
520 (mode:enum): Fetch string name of mode.
521 (-mode-parse): Use stringsym-append to build errtxt.
522 * model.scm (model:enum): Fetch string name of model.
523 (-model-parse): Use stringsym-append to build errtxt.
524 (parse-insn-timing): Must quote empty list.
525 * opc-itab.scm (-gen-minsn-table-entry): Fetch string name of minsn.
526 (-gen-minsn-opcode-entry): Ditto.
527 * opcodes.scm (<operand>,gen-function-name): `what' arg is a symbol,
529 (read-cpu.opc): Convert current-arch-name to a string before using.
530 * operand.scm (<operand>,gen-pretty-name): Ensure `name' is a string.
531 (<derived-operand>): Must quote empty list.
532 (op-sort): Simplify, call alpha-sort-obj-list to do sort.
533 * pgmr-tools.scm (pgmr-pretty-print-insn-value): Fetch string name
535 * pmacros.scm (-pmacro-build-lambda): Use eval1 instead of eval.
536 (-pmacro-sym): Must convert symbols to strings before passing to
538 (-pmacro-str): Ditto.
539 (pmacros-init!): Use eval1 instead of eval.
540 * read.scm (keep-mach-atlist?): Simplify, use bitset-attr->list.
541 (keep-isa-atlist?): Ditto.
542 (cmd-if): Use eval1 instead of eval.
543 * rtl-c.scm (<c-expr>,get-name): Fetch string name of self.
544 (-rtl-c-get): Fetch string name of src.
545 (s-unop): Ditto for mode.
546 (s-binop,s-binop-with-bit,s-shop,s-convop,s-cmpop): Ditto.
547 (-gen-par-temp-defns,subword): Ditto.
548 (join): Use stringsym-append instead of string-append.
549 * rtl-traverse.scm (rtx-option?): Convert option to string first.
550 (rtx-traverse-debug): Fetch string name of rtx-obj.
551 * rtl.scm (def-rtx-node): Use eval1 instead of eval.
552 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
553 (rtx-pretty-name): Result is a string.
554 (-rtx-hw-name): Use symbolstr-append instead of symbol-append.
555 * semantics.scm (semantic-compile): Simplify, use alpha-sort-obj-list.
556 * sid-cpu.scm (cgen-write.cxx): Convert current-arch-name to a string
558 (-gen-sfrag-case): Fetch string name of user.
559 * sid-model.scm (unit:enum): Fetch string name of unit.
560 * sid.scm (<hw-memory>,cxmake-get): Fetch string name of mode.
561 (<hw-memory>,gen-set-quiet): Ditto.
562 (gen-mode-defs): Ditto.
563 (sim-finish!): Convert current-arch-name to a string before using.
564 * sim-cpu.scm (-gen-scache-semantic-fn): Fetch string name of insn.
565 (-gen-no-scache-semantic-fn): Ditto.
566 (cgen-defs.h): Fetch string name of isa.
567 (cgen-read.c): Convert current-arch-name to a string before using.
568 (cgen-write.c): Ditto.
569 * sim-model.scm (unit:enum): Fetch string name of unit.
570 (gen-model-fn-decls): Use stringsym-append instead of string-append.
571 (-gen-model-timing-table): Fetch string name of model.
572 (-gen-mach-model-table): Ditto.
573 (-gen-mach-defns): Fetch string name of mach.
574 * sim.scm (gen-reg-access-defn): Fetch string name of hw.
575 (<hw-memory>,cxmake-get): Fetch string name of mode.
576 (<hw-memory>,gen-set-quiet): Ditto.
577 (gen-mode-defs): Ditto.
578 (sim-finish!): Must quote empty list.
579 * utils-cgen.scm (<ident>): Must quote empty list.
580 (obj:str-name): New fn.
581 (parse-comment): Result is a string.
582 (parse-symbol): Result is a symbol.
583 (parse-string): Result is a string.
584 (keyword-list?): Convert arg to string before calling string-ref.
585 (keyword-list->arg-list): Ditto.
586 (gen-attr-name): Convert attr-name to string first.
587 (alpha-sort-obj-list): Use symbol<? instead of string<?.
588 * utils-gen.scm (attr-gen-decl): Fetch string name of attr.
589 (gen-define-ifmt-ifields): Ditto for fld.
590 * utils.scm (gen-c-symbol): Ensure str is a string before calling
592 (gen-file-name): Ditto.
593 (symbol-downcase,symbol-upcase,symbol<?): New fns.
594 (stringsym-append,symbolstr-append,->string,->symbol): New fns.
595 (reduce): Call eval1 instead of eval.
596 * cpu/m32r.cpu (addi): Don't use `#.'.
598 * gen-all-sim: Fix some typos.
600 2003-07-08 Doug Evans <dje@sebabeach.org>
602 * gen-all-doc: Ensure run from cgen src dir.
603 * gen-all-opcodes: Build in ./tmp-opcodes. Don't delete dir when done.
604 * gen-all-sid: Similarily, in ./tmp-sid.
605 * gen-all-sim: Similarily, in ./tmp-sim.
607 2003-06-20 Doug Evans <dje@sebabeach.org>
609 * gen-all-sim: Add fr30,sh64 support. Only generate m32r by default.
611 2003-06-19 Doug Evans <dje@sebabeach.org>
613 * mach.scm (-ifld-already-defined?): New proc.
614 (current-ifld-add!): Use it.
615 (-op-already-defined?): New proc.
616 (current-op-add!): Use it.
617 (-insn-already-defined?): New proc.
618 (current-insn-add!): Use it.
619 (-minsn-already-defined?): New proc.
620 (current-minsn-add!): Use it.
621 (obj-isa-list): New proc.
622 (isa-supports?): Use it.
624 2003-06-10 Doug Evans <dje@sebabeach.org>
626 * insn.scm (insn-builtin!): RELAX renamed to RELAXABLE.
627 * cpu/m32r.cpu (all insns): Ditto.
629 * mach.scm (current-*-add!): Disallow redefinition. Make result
632 * gen-all-doc: Split arm and frv docs up a bit.
634 * cpu/arm.cpu: Add IDOC attribute.
635 * cpu/frv.cpu: Ditto.
636 * cpu/i960.cpu: Ditto.
637 * cpu/openrisc.cpu: Ditto.
638 * cpu/xstormy16.cpu: Ditto.
639 * cpu/m32r.cpu: Ditto.
640 (all insns): Explicitly specify IDOC attribute.
642 * Makefile.am (MACH,ISAS,INSN_FILE_NAME): New vars.
643 (desc,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Use MACH,ISAS.
644 (html): Use MACH,ISAS,INSN_FILE_NAME. Generate insn.html separately.
645 * Makefile.in: Regenerate.
646 * attr.scm (<integer-attribute>:parse-value-def): Implement.
647 (-attr-read): Defer computing default value until we know the type.
648 (attr-has-attr?): Delete, move contents to <attr-list>:has-attr?.
649 (<attr-list>:attr-present?): New method.
650 (atlist-attr-present?,obj-attr-present?): New fns.
651 (obj-has-attr-value?,obj-has-attr-value-no-default?): New fns.
652 (attr-builtin!): New insn attr IDOC.
653 * cgen-doc.scm (doc-arguments): New args -I,-N.
654 * enum.scm (parse-enum-vals): New arg errtxt, all callers updated.
655 Support comment as fourth element of enum value.
656 (enum-val-name,enum-val-value,enum-val-attrs,enum-val-comment): New fns.
657 * html.scm (gen-html-header): New arg kind, all callers updated.
658 (gen-table-of-contents): New arg insn-file, all callers updated.
659 (gen-list-entry,gen-doc-header): New fn.
660 (get-operands): Delete.
661 (gen-iformat-table): Rewrite.
662 (gen-insn-doc-1): Print constant-folded and trimmed semantics.
663 (gen-insn-doc-list): New args name, comment, insns. All callers updated.
664 (get-insn-properties,guess-insn-idoc-attr!): New fn.
665 (insn-sets-pc?,insn-refs-mem?,insn-uses-fpu?): New fns.
666 (get-insns-for-category,gen-categories-insn-lists): New fns.
667 (gen-insn-docs): Simplify each insn's semantics first.
668 Print insn tables sorted by IDOC categories.
669 (*insn-html-file-name*): New global.
670 (cgen-insn.html): New fn.
672 * insn.scm (<insn>): Create a setter for the `tmp' member.
673 * semantics.scm (insn-build-known-values): Renamed from
674 -build-known-values. All callers updated.
676 * rtl.scm: Move traveral/evaluation support to ...
677 * rtl-traverse.scm: New file.
678 * read.scm: Maybe-load rtl-traverse.scm.
680 * rtl.scm (-rtx-valid-types): Add SETRTX.
682 * rtx-funcs.scm (nop,parallel): Fix mode.
684 * utils.scm (eqv-lookup-index): New fn.
685 (assq-lookup-index): Renamed from lookup-index. All callers updated.
687 * dev.scm (load-doc): Set APPLICATION.
689 2003-06-10 Dave Brolley <brolley@redhat.com>
691 * sid-cpu.scm: Generate #include of config.h into @prefix@-sem.cxx.
692 * sid-decode.scm: Generate #include of config.h into
694 * sid-model.scm: Generate #include of config.h into @prefix@-model.cxx.
696 2003-06-07 Doug Evans <dje@sebabeach.org>
698 * gen-all-sid: New file.
699 * gen-all-opcodes: New file.
701 2003-06-05 Nick Clifton <nickc@redhat.com>
703 * cpu/frv.cpu (FRintieven): New operand. An even-numbered only
704 version of the FRinti operand.
705 (FRintjeven): Likewise for FRintj.
706 (FRintkeven): Likewise for FRintk.
707 (mdcutssi, media-dual-word-rotate-r-r, mqsaths,
708 media-quad-arith-sat-semantics, media-quad-arith-sat,
709 conditional-media-quad-arith-sat, mdunpackh,
710 media-quad-multiply-semantics, media-quad-multiply,
711 conditional-media-quad-multiply, media-quad-complex-i,
712 media-quad-multiply-acc-semantics, media-quad-multiply-acc,
713 conditional-media-quad-multiply-acc, munpackh,
714 media-quad-multiply-cross-acc-semantics, mdpackh,
715 media-quad-multiply-cross-acc, mbtoh-semantics,
716 media-quad-cross-multiply-cross-acc-semantics,
717 media-quad-cross-multiply-cross-acc, mbtoh, mhtob-semantics,
718 media-quad-cross-multiply-acc-semantics, cmbtoh,
719 media-quad-cross-multiply-acc, media-quad-complex, mhtob,
720 media-expand-halfword-to-double-semantics, mexpdhd, cmexpdhd,
721 cmhtob): Use new operands.
722 * cpu/frv.opc (CGEN_VERBOSE_ASSEMBLER_ERRORS): Define.
723 (parse_even_register): New function.
725 2003-06-04 Doug Evans <dje@sebabeach.org>
727 Better handling of 64 bit and mixed 32/64 bit architectures.
728 * hardware.scm (hw-update-word-modes!): New fn.
729 * mach.scm (define-cpu)): Call mode-set-word-modes!,
730 hw-update-word-modes!.
731 (state-word-bitsize): Replace FIXME with requested check.
732 (arch-analyze-insns!): Call mode-ensure-word-sizes-defined.
733 * mode.scm (mode-find): Ignore INT,UINT.
734 (-mode-word-sizes-kind): New global.
735 (mode-set-word-modes!,mode-set-identical-word-bitsizes!,
736 mode-set-biggest-word-bitsizes!,mode-ensure-word-sizes-defined): New fns.
737 (mode-init!): Initialize -mode-word-sizes-kind. Move initialization
739 (mode-builtin!): ... here. Initialize WI/UWI/AI/IAI to something
740 unusable, correct values set later.
741 (mode-finish!): Remove cruft.
742 * html.scm (doc-init!): Call mode-set-biggest-word-bitsizes!.
743 * opcodes.scm (opcodes-init!): Ditto.
744 * rtx-funcs.scm (annul): Fix mode of pc.
745 * cpu/ia64.cpu: Remove cruft that sets word modes.
746 * cpu/xstormy16.cpu (define-cpu): Set word-bitsize.
748 2003-06-03 Nick Clifton <nickc@redhat.com>
750 * cpu/frv.cpu (media-dual-word-rotate-r-r): Use a signed 6-bit
751 immediate value not unsigned.
753 2003-05-21 J"orn Rennecke <joern.rennecke@superh.com>
755 * cpu/sh.cpu: Amend comments to refer to SuperH.
756 * cpu/sh64-compact.cpu: Change comment to refer to SuperH.
757 * cpu/sh64-media.cpu: Likewise.
758 (Saturation): Update manual reference.
760 2003-05-15 Doug Evans <dje@sebabeach.org>
762 * Makefile.am (srcroot): New var.
764 * Makefile.in: Regenerate.
765 * cgen-doc.scm: New file.
766 * html.scm: New file.
767 * gen-all-doc: New file.
768 * dev.scm (cload): Handle DOC application.
770 * machs.scm (machs-for-cpu): New fn.
771 * model.scm (models-for-cpu): New fn.
772 * utils.scm (gen-c-copyright): Renamed from gen-copyright.
774 (iota): Rewrite to be identical to pmacro version. All uses updated.
775 * utils-cgen.scm (alpha-sort-obj-list): New fn.
777 * utils-sim.scm (-gen-decoder-switch): Back out patch of 2003-01-09.
778 (-gen-decode-bits): Instead put in better fix here.
780 * cpu/i960.cpu (index): Rename to indx. All uses updated.
782 2003-05-01 DJ Delorie <dj@redhat.com>
784 * cpu/xstormy16.cpu (alignfix-mem): Correct logic for unaligned
786 (set-alignfix-mem): Likewise.
788 2003-04-16 Dave Brolley <brolley@redhat.com>
790 * doc/rtl.texi (Iiming): Correct example to use 'model-name'.
791 * utils.scm (copyright-fsf): Update generate copyright years.
792 (copyright-cygnus): Ditto.
793 * sid.scm (-op-gen-set-trace): Generate code to fill in bitmask of modified
795 (-gen-arch-model-decls): Don't generate unit enum declaration or MAX_UNITS
797 (<operand>'gen-profile-code): New parameter 'when'.
798 (<iunit>'gen-profile-code): Ditto.
799 (<insn>'gen-profile-code): Ditto.
800 (<unit>'gen-profile-code): Ditto. Only generate 'referenced' and
801 'insn_reference' for the 'after' function.
802 * model.scm (unit:enum): Moved to sim-model.scm.
803 * sim-model.scm (unit:enum): Moved from model.scm.
804 * sid-decode.scm (-gen-scache-decls): Generate the 'written' field.
805 * cgen-sid.scm (sim-arguments): Document the generation of model.h.
806 * sid-model.scm (unit:enum): New version for sid.
807 (gen-model-class-name): New function.
808 (gen-model-unit-fn-decl): New function.
809 (gen-model-fn-decls): Call gen-model-unit-fn-decl.
810 (gen-model-unit-fn-name): New parameter 'when'.
811 (-gen-model-insn-fn-name): Ditto.
812 (-gen-model-insn-qualified-fn-name): New function.
813 (-gen-model-insn-fn-decl): New function.
814 (-gen-model-insn-fn-decls): New function.
815 (-gen-model-insn-fn): New parameter 'when'. Call
816 -gen-model-insn-qualified-fn-name.
817 (-gen-model-insn-fns): Generate the constructor for the model. Generate
818 functions for modelling insn before and after execution.
819 (-gen-model-class-decls): New function.
820 (" (gen-model-class-name model) "): New function.
821 (gen-model-classes): New function.
822 (-gen-insn-timing): Generate functions for modelling insn before and after
824 (-gen-insn-unit-timing): Generate class-qualified names.
825 (-gen-model-timing-table): Ditto.
826 (cgen-model.cxx): Generate #include for @cpu@.h. Omit generation of code
827 not needed (yet) by sid.
828 (cgen-model.h): New function.
830 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
832 * cpu/sh.cpu: Replace occurrances of 'Hitachi' with 'Renesas'.
833 * cpu/sh64-compact.cpu: Likewise.
834 * cpu/sh64-media.cpu: Likewise.
836 2003-03-21 DJ Delorie <dj@redhat.com>
838 * cpu/xstormy16.cpu (basic-psw): New argument ws (wordsize),
839 which indicates if the sign flag is set from bit 15 or 7.
841 (set-psw): New argument ws, propogate it.
842 (set-psw-nowrite): Likewise.
843 (set-mem-psw): Likewise.
844 (set-psw-carry): Likewise. Use temporaries to prevent
845 prematurely overwriting needed inputs.
846 (set-psw-rrotate17): Fix logic.
847 (shrgrgr): Preserve carry for zero-bit shifts.
848 (shrgrimm): Likewise.
850 (shlgrimm): Likewise.
852 (asrgrimm): Likewise.
855 2003-03-12 Frank Ch. Eigler <fche@redhat.com>
857 * sid.scm: Set APPLICATION to SID-SIMULATOR.
859 2002-03-05 DJ Delorie <dj@redhat.com>
861 * cpu/xstormy16.cpu (set-psw-add): Use temporaries to prevent
862 prematurely overwriting needed inputs.
863 (set-psw-sub): Likewise.
865 Fri Feb 21 19:48:19 2003 J"orn Rennecke <joern.rennecke@superh.com>
867 * cpu/sh64-media.cpu (make-mextr): Fix setting of count.
869 2003-02-18 DJ Delorie <dj@redhat.com>
871 * xstormy16.cpu (set-mem-alignfix-psw): Remove.
872 (movlmemimm): Just mask the address.
873 (movhmemimm): Likewise.
874 (movlmemgr): Likewise.
875 (movhmemgr): Likewise.
876 (set-psw): Always set the psw last.
877 (set-psw-carry): Likewise.
878 (set-psw-add): Likewise.
879 (set-psw-sub): Likewise.
881 * xstormy16.cpu (set-psw-rrotate17): New. Choose the correct set
882 of 16 patterns from the set-psw-rotate17 function.
883 (movgrigr, movgripostincgr, movgripredecgr, movgriigr,
884 movgriipostincgr, movgriipredecgr): Set psw correctly.
885 (movfgrigr, movfgripostincgr, movfgripredecgr, movfgriigr,
886 movfgriipostincgr, movfgriipredecgr): Fix semantics.
887 (rrcgrgr, rrcgrimm4): Use new set-psw-rrotate17 function.
889 2003-02-11 Dave Brolley <brolley@redhat.com>
891 * desc-cpu.scm (gen-ifld-defns): Add all ifields to the
892 @arch@_cgen-ifld_table.
893 (gen-maybe-multi-ifld): Use the ifield enumerators to index the
894 @arch@_cgen-ifld_table.
896 2003-02-03 Frank Ch. Eigler <fche@redhat.com>
898 * sid-cpu.scm (-gen-sfrag-engine-fn): Generate more hygienic C++.
900 2003-01-09 Graydon Hoare <graydon@redhat.com>
902 * utils-sim.scm (-gen-decoder-switch): Fix edge condition for
905 2003-01-07 Graydon Hoare <graydon@redhat.com>
907 * utils-gen.scm (attr-int-gen-defn): Define.
909 2002-12-21 Doug Evans <dje@sebabeach.org>
911 * ifield.scm (-ifield-parse): Rewrite <bitrange> computation.
912 (-get-ifld-word-offset,-get-ifld-word-length): New fns.
914 * dev.scm (cload): Update location of .cpu files.
916 2002-12-19 Doug Evans <dje@sebabeach.org>
918 * utils-sim.scm (gen-profile-sym): New fn.
919 (<operand>,sbuf-profile-sym): New method.
920 (<operand>,sbuf-profile-elm): Use it.
921 * sim.scm (<operand>,gen-record-profile): Use sbuf-profile-sym instead
922 of hardcoding symbol name.
923 (<operand>,gen-profile-code): Ditto.
924 (<unit>,gen-profile-code): Use gen-profile-sym instead of hardcoding
927 * mode.scm (mode-sem-mode): New fn.
928 * operand.scm (op:new-mode): Update. mode-name.
929 (op-natural-mode?) New fn.
930 * rtl.scm (hw): Set hw-name,mode-name.
932 Back out sim*.scm changes of 2001-04-02 Ben Elliston <bje@redhat.com>
934 * sim-decode.scm (-gen-decode-insn-globals): Use @PREFIX@_INSN__MAX
935 as size of IDESC-TABLE-VAR.
936 (@prefix@_init_idesc_table): Ditto.
937 * sim-model.scm (-gen-mach-defns): Ditto.
938 * sim.scm (gen-cpu-insn-enum-decl): Rename last elm from max to -max.
940 * utils-sim.scm (-gen-decode-insn-entry): Fix some spacing in output.
942 * insn.scm (-parse-insn-format-symbol): Improve error message.
943 (-parse-insn-format): Ditto.
945 * gen-all-sim: New script.
947 2002-12-16 DJ Delorie <dj@delorie.com>
949 * cpu/xstormy16.opc (parse_immediate16): Add prototype.
951 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
953 * cpu/xstormy16.cpu (imm16): Call handler immediate16.
954 * cpu/xstormy16.opc (parse_small_immediate): Return on '@'.
955 (parse_immediate16): Handle immediate16 values, which now include
956 @hi(label) and @lo(label)
958 2002-12-03 Alan Modra <amodra@bigpond.net.au>
960 * desc-cpu.scm (gen-maybe-multi-ifld): Remove superfluous parens.
961 Add braces and cast for union field.
962 (gen-multi-ifield-nodes): Add braces and cast for union field.
963 (cgen_operand_table): Similarly fix sentinel.
964 (cgen_cpu_close): Constify "insns". Formatting.
965 (cgen-desc.c): Include xregex.h.
966 * cpu/ip2k.opc (ip2k_cgen_insn_supported): Move to opc.c section.
968 <opc.c>: Include safe-ctype.h.
969 (ip2k_asm_hash): Use ISSPACE and TOLOWER.
970 (PARSE_FUNC_DECL): Declare. Use to prototype parse_fr, parse_addr16,
971 parse_addr16_p, parse_addr16_cjp, parse_lit8 and parse_bit3.
972 (parse_fr): Constify "old_strp". Correct type of "tempvalue".
973 Don't test it for >= 0. Use ISSPACE rather than isspace. Formatting.
974 (parse_addr16): Correct type of "value". Formatting.
975 (parse_addr16_p): Likewise.
976 (parse_addr16_cjp): Likewise.
977 (parse_lit8): Likewise.
978 (parse_bit3): Formatting.
979 (PRINT_FUNC_DECL): Define. Use to prototype print_fr, print_dollarhex,
980 print_dollarhex8, print_dollarhex16, print_dollarhex_addr16h,
981 print_dollarhex_addr16l, print_dollarhex_p, print_dollarhex_cj and
983 (print_fr): Add ATTRIBUTE_UNUSED on unused args. Formatting.
984 (print_dollarhex): Add ATTRIBUTE_UNUSED on unused args.
985 (print_dollarhex8): Likewise.
986 (print_dollarhex16): Likewise.
987 (print_dollarhex_addr16h): Likewise.
988 (print_dollarhex_addr16l): Likewise.
989 (print_dollarhex_p): Likewise.
990 (print_dollarhex_cj): Likewise.
991 (print_decimal): Likewise.
992 * cpu/xstormy16.opc (parse_mem8): Use ISALNUM rather than isalnum.
994 2002-11-30 Hans-Peter Nilsson <hp@axis.com>
996 * doc/rtl.texi (Model variants): Mention current limitations for
997 unit inputs and outputs.
998 (Hardware elements) <attribute PROFILE>: Be slightly more
1000 (Instructions) <timing>: input/output overrides have a direction
1003 2002-11-25 DJ Delorie <dj@redhat.com>
1005 * xstormy16.cpu (sdiv, divlh, sdivlh): Fix sdivlh/divlh encodings.
1007 2002-11-21 Jeff Johnston <jjohnstn@redhat.com>
1009 * cpu/iq10.cpu: New file.
1010 * cpu/iq2000.cpu: Likewise.
1011 * cpu/iq2000.opc: Likewise.
1012 * cpu/iq2000m.cpu: Likewise.
1014 2002-11-19 DJ Delorie <dj@redhat.com>
1016 * cpu/xstormy16.cpu (sdiv, divlh, sdivlh): New.
1018 2002-11-05 Frank Ch. Eigler <fche@redhat.com>
1020 * dev.scm: Call getenv with a string, not a symbol.
1022 2002-10-08 Doug Evans <dje@transmeta.com>
1023 Hans-Peter Nilsson <hp@axis.com>
1025 * types.scm (bitrange-overlap?): Handle lsb0?.
1027 2002-09-07 Frank Ch. Eigler <fche@redhat.com>
1029 From Robert Cragie <rcc@jennic.com>:
1030 * cpu/arm7.cpu (ldm*-sw*, stm*-sw*): New instructions.
1032 2002-07-17 Frank Ch. Eigler <fche@redhat.com>
1033 Ben Elliston <bje@redhat.com>
1034 John Healy <jhealy@redhat.com>
1035 Jeff Johnston <jjohnstn@redhat.com>
1036 Alan Lehotsky <alehotsky@redhat.com>
1037 Ubicom Inc. <SupportDesk@ubicom.com>
1039 * cpu/ip2k.cpu: New file.
1040 * cpu/ip2k.opc: Likewise.
1042 2002-07-01 Hans-Peter Nilsson <hp@axis.com>
1044 * utils-gen.scm (-gen-extract-word): Handle lsb0?.
1046 2002-06-25 J"orn Rennecke <joern.rennecke@superh.com>
1048 * cpu/sh64-compact.cpu (movw5): Use Correct operand field for reg.
1049 * cpu/sh64-media.cpu (-ldhi-byte, -ldhi-word, -ldhi-long): New macros.
1050 (-ldlo-byte, -ldlo-word, -ldlo-long): Likewise.
1051 (-sthi-word, -sthi-long -stlo-byte, -stlo-word, -stlo-long): Likewise.
1052 (ldhil, ldhiq, ldlol, ldloq, stlol, stloq): Implement.
1053 (mshfhib, mshfhil, mshfhiw, mshflob, mshflol, mshflow): Fix indices.
1054 (-sthi-byte): If there is a single byte to store, store it at
1056 (sthil, sthiq): Fix big-endian behaviour.
1057 (mcnvslw, mcnvswb, mcnvswub, mmacfxwl, mmacnfx.wl): Fix indices.
1058 (mmulfxl, mmulfxw, mmulfxrpw, mmulhiwl, mmullowl): Likewise.
1059 (saturate): Use Dimode to check if saturation operation is required.
1060 (usaturate): Likewise.
1062 (-maddsl, -maddsub): Compute to-be-saturated value in wider mode.
1063 (-maddsw, mmacfxwl, mmacnfx.wl, -mshaldsl, -mshaldsw): Likewise.
1064 (-mshardl, -mshardw, -msubsl, -msubsub, -msubsw): Likewise.
1065 (msadubq): Fix subword index in second operand of first subtraction.
1067 2002-06-20 Hans-Peter Nilsson <hp@axis.com>
1069 * sim-cpu.scm (gen-semantic-code): Prepend with setup-semantics
1072 2002-06-18 Dave Brolley <brolley@redhat.com>
1074 * cpu/frv.cpu: New cpu description.
1075 * cpu/frv.opc: New cpu support code.
1077 2002-05-21 Dave Brolley <brolley@redhat.com>
1079 * decode.scm (-opcode-slots): Don't consider bits beyond the
1082 2002-05-17 Johan Rydberg <jrydberg@rtmk.org>
1084 * cpu/powerpc.cpu: New file.
1086 2002-05-01 Graydon Hoare <graydon@redhat.com>
1088 * desc-cpu.scm (@arch@_cgen_cpu_close): Fix memory leaks.
1090 2002-03-20 Hans-Peter Nilsson <hp@axis.com>
1092 * doc/pmacros.texi (Symbol concatenation): Mention that .sym
1093 results are expanded recursively.
1095 2002-03-19 Hans-Peter Nilsson <hp@axis.com>
1097 * pmacros.scm (-pmacro-expand,scan): If result is a symbol,
1098 call scan-symbol on it, to enable recursive macro-expansion.
1100 2002-01-25 Frank Ch. Eigler <fche@redhat.com>
1102 * sid-cpu.scm (-gen-hardware-types): Generate single hardware union
1103 for multiple-isa configurations.
1104 * sid-decode.scm (-gen-decode-fn): Tolerate empty insn list.
1106 2002-02-04 Ben Elliston <bje@redhat.com>
1108 * cpu/sh.cpu, cpu/sh.opc: New files.
1109 * cpu/sh64-comact.cpu, cpu/sh64-media.cpu: Likewise.
1111 2002-01-29 Hans-Peter Nilsson <hp@axis.com>
1113 * doc/rtl.texi: Fix typo: define-attr, not define-attribute.
1114 (Enumerated constants): Mention that an ifield must not specify a
1116 (Instruction operands): Ditto for index.
1117 (Expressions) <parallel>: Remove misplaced mention of local
1119 <if>: Mention that mode must be specified and non-VOID when the
1122 2002-01-28 Hans-Peter Nilsson <hp@axis.com>
1124 * doc/porting.texi: When referring to *.opc, mention they are in
1125 the cpu subdir. Call top-level directory toplevel, not devo.
1126 Close string in define-normal-insn example.
1128 * doc/pmacros.texi: Fix .substr typo to .substring.
1129 Mention that .sym expansions are not further expanded.
1131 2002-01-22 Graydon Hoare <graydon@redhat.com>
1133 * desc-cpu.scm (ifld-number-cache): Add.
1135 (gen-maybe-multi-ifld-of-op): Add.
1136 (gen-maybe-multi-ifld): Add.
1137 (gen-multi-ifield-nodes): Add.
1138 (cgen-desc.c): Add call to gen-multi-ifield-nodes.
1140 2002-01-10 matthew green <mrg@redhat.com>
1142 * cpu/xstormy16.cpu (gr-Rbj-names): Rename this ...
1143 (gr-Rb-names): ... to this.
1144 (h-Rb): New hardware piece.
1145 (h-Rbj): Use gr-Rb-names.
1147 (holdx): New instruction.
1149 2002-01-07 Ben Elliston <bje@redhat.com>
1151 * utils.scm (package-cygnus-simulators): Rename from this ..
1152 (package-red-hat-simulators): .. to this.
1153 * opcodes.scm (option-set!): Use package-red-hat-simulators.
1154 * sid-cpu.scm (cgen-desc.h): Likewise.
1155 (cgen-cpu.h): Likewise.
1156 (cgen-defs.h): Likewise.
1157 (cgen-write.cxx): Likewise.
1158 (cgen-semantics.cxx): Likewise.
1159 (cgen-sem-switch.cxx): Likewise.
1160 * sid-decode.scm (cgen-decode.h): Likewise.
1161 (cgen-decode.cxx): Likewise.
1162 * sid-model.scm (cgen-model.cxx): Likewise.
1163 * sid.scm (option-set!): Likewise.
1164 * sim.scm (option-set!): Likewise.
1166 2002-01-07 Ben Elliston <bje@redhat.com>
1168 * utils.scm (copyright-fsf): Add 2002.
1169 (copyright-cygnus): Rename to copyright-red-hat.
1170 (copyright-red-hat): Add 2002.
1171 (CURRENT-COPYRIGHT): Update comment.
1172 * opcodes.scm (option-set!): Update callers.
1173 * sid-model.scm (cgen-model.cxx): Likewise.
1174 * sid-cpu.scm: Likewise.
1175 * sid-decode.scm: Likewise.
1176 * sid.scm (option-set!): Handle "redhat" as an option for
1177 "copyright"; use copyright-red-hat.
1178 * sim.scm (option-set!): Likewise.
1180 2002-01-03 Dave Brolley <brolley@redhat.com>
1182 * decode.scm (-distinguishing-bit-population): Compute num-insns, the
1183 number of insns in the list. Update the population count function to
1184 identify and prioritize 3 catgories of useful bits.
1185 (-population-top-few): Don't consider bits with a population count of
1187 (-build-decode-table-entry): Don't call
1188 filter-harmlessly-ambiguous-insns. Filter out non-specialized and
1189 identical insns at the next tree level.
1190 * insn.scm (filter-harmlessly-ambiguous-insns): Note in a comment that
1191 this function is no longer used.
1192 (filter-non-specialized-ambiguous-insns): New function.
1193 (filter-identical-ambiguous-insns): New function.
1194 (find-identical-insn): New function.
1195 (filter-harmlessly-ambiguous-insns): Removed.
1197 2001-11-26 Geoffrey Keating <geoffk@redhat.com>
1198 matthew green <mrg@redhat.com>
1199 Frank Ch. Eigler <fche@redhat.com>
1200 Nick Clifton <nickc@cambridge.redhat.com>
1202 * cpu/xstormy16.cpu: New file.
1203 * cpu/xstormy16.opc: New file.
1205 2001-11-26 Frank Ch. Eigler <fche@redhat.com>
1207 * doc/sim.texi, rtl.texi, porting.texi: Correct texinfo markup typos.
1209 2001-11-14 Dave Brolley <brolley@redhat.com>
1211 * utils-gen.scm (-gen-extract-word): Correct computation of the length
1212 of the field being extracted.
1214 2001-10-29 Johan Rydberg <johan@rydberg.com>
1216 * doc/rtl.texi (Expressions): Document the (error ..), (sqrt ..),
1217 (cos ...) and (sin ..) rtx.
1219 2001-10-13 Nick Clifton <nickc@cambridge.redhat.com>
1221 * desc-cpu.scm: Do not include ctype.h in generated desc
1222 files. They will inherit safe-ctype.h instead.
1224 2001-10-08 Nick Clifton <nickc@cambridge.redhat.com>
1226 * desc-cpu.scm: Add missing function prototypes (for generated
1227 C files). Fix compile time warning messages about unused
1228 parameters (for generated C files).
1229 * opc-asmdis.scm: The same.
1230 * opc-ibld.c: The same.
1231 * opc-itab.scm: The same.
1232 * cpu/fr30.opc: The same.
1233 * cpu/m32r.opc: The same.
1234 * cpu/openrisc.opc: The same.
1236 2001-09-17 graydon hoare <graydon@redhat.com>
1238 * insn.scm (syntax-break-out): Correct logic in handling escaped
1241 2001-07-12 Jeff Johnston <jjohnstn@redhat.com>
1243 * opc-itab.scm (@arch@_cgen_init_opcode_table): Unconditionally
1244 call @arch@_cgen_build_insn_regex now that regex support is in
1247 2001-07-12 Frank Ch. Eigler <fche@redhat.com>
1249 * insn.scm (filter-harmlessly-ambiguous-insns): Fix msg typo.
1250 (mask-superset?): Look for strict supersets to allow rejection of
1253 2001-07-11 Frank Ch. Eigler <fche@redhat.com>
1255 * sid-cpu.scm (-gen-mach-params): New proc to emit ...CHUNK_BITSIZE...
1256 (cgen-desc.h): Call it.
1257 * sid-decode.scm (-gen-decode-fn): Use base-insn-bitsize as
1259 * utils-sim.scm (-gen-decode-insn-entry): For SID only, prepare
1260 entire_insn for extraction, if it's shorter than base-insn-bitsize.
1262 2001-07-11 Frank Ch. Eigler <fche@redhat.com>
1264 * desc-cpu.scm (-gen-mach-table-defns): Emit fourth field: the
1265 mach->cpu insn-chunk-bitsize.
1266 (-gen-cpu-open): In @arch@_cgen_rebuild_tables, process above new
1267 field toward CGEN_CPU_TABLE->insn_chunk_bitsize.
1268 * mach.scm (<cpu>): New field insn-chunk-bitsize.
1269 (-cpu-parse, -cpu-read): Parse/initialize it.
1270 * doc/rtl.texi (define-cpu): Document it.
1272 2001-07-09 Geoffrey Keating <geoffk@redhat.com>
1274 * ifield.scm (<ifield> 'field-start): Don't look at word-len.
1276 2001-07-06 Ben Elliston <bje@redhat.com>
1278 * opcodes.scm (read-cpu.opc): Read .opc files from subdir/cpu.
1280 2001-07-05 Ben Elliston <bje@redhat.com>
1284 * read.scm (include): Include files from srcdir/cpu.
1285 (-cgen): Likewise for loading .cpu files.
1286 * sid.scm (sim-finish!): Read .sim files from srcdir/cpu.
1287 * *.cpu: Move all cpu descriptions into cpu subdirectory.
1289 * simplify.inc: Likewise.
1291 2001-07-04 Ben Elliston <bje@redhat.com>
1293 * read.scm (include): Log "Including file" message at level 1,
1294 rather than outputting it with (display).
1295 (cpu-load): Log "Loading cpu description" and "Processing cpu
1296 description" messages at levels 1 and 2, respectively, rather than
1299 2001-06-14 Geoffrey Keating <geoffk@redhat.com>
1301 * desc.scm (<keyword> 'gen-defn): Add extra zero into
1302 CGEN_KEYWORD_ENTRY initializers.
1304 * gas-test.scm (gen-gas-test): Create 8 testcases, not just 5.
1305 (<operand> 'test-data): Involve both the index and the hardware
1306 in testcase generation.
1307 (<hw-indx> 'test-data): Generate test data from the underlying
1309 (<ifield> 'test-data): Generate test data by computing bit
1310 patterns for the field, then decoding them.
1311 (<hw-address> 'test-data): Allow for new calling convention.
1312 (<hw-iaddress> 'test-data): Likewise.
1313 (<keyword> 'test-data): Convert index values into keywords.
1314 (<hw-asm> 'test-data): Convert index values into integer strings.
1316 * gas-test.scm (cgen-build.sh): Escape '.' as well.
1318 2001-06-01 Frank Ch. Eigler <fche@redhat.com>
1320 * rtl.scm (hw): Encode hw access mode into <operand> name, since this
1321 is required for multi-mode hw types (memory).
1323 2001-05-11 Ben Elliston <bje@redhat.com>
1325 * gas-test.scm (cgen-build.sh, gentest): Escape $ with a backslash
1326 when generating allinsn.d from objdump output. Without it, the
1327 testsuite will treat $ as the regular expression for end of line.
1329 2001-05-09 Ben Elliston <bje@redhat.com>
1331 * doc/porting.texi (Doing a GAS port): Replace `cgen_opcode_open'
1332 with `cgen_cpu_open'; documentation had become out of date.
1333 * doc/rtl.texi (Instruction operands): Likewise.
1335 2001-05-07 Frank Ch. Eigler <fche@redhat.com>
1337 * iformat.scm (compute-insn-base-mask-length): Rewrite to tolerate
1338 various-base-length instruction sets.
1340 2001-04-02 Ben Elliston <bje@redhat.com>
1342 * sid-cpu.scm (-last-insn): New function.
1343 (-gen-sem-switch-engine): Loop through idesc while less than or
1344 equal to the last instruction enum, not less than the MAX enum.
1345 (-gen-sfrag-engine-fn): Clean up frag_label_table initialisation.
1346 * sid-decode.scm (-gen-decode-insn-globals): Define the idesc
1347 table's size to be the last instruction enum plus one, not
1349 * sid.scm (gen-cpu-insn-enum-decl): Do not append a dummy `max'
1350 instruction onto the instruction list.
1352 * sim-decode.scm (@prefix@_init_idesc_table): Compute tabsize
1353 using the size of the table and its elements.
1354 (-gen-decode-insn-globals): Define the idesc table's size to be
1355 the last instruction enum plus one, not @PREFIX@_INSN_MAX.
1356 * sim-model.scm (-gen-mach-defns): Define CPU_MAX_INSNS as the
1357 last instruction enum plus one, not @CPU@_INSN_MAX.
1359 2001-03-28 Ben Elliston <bje@redhat.com>
1361 * doc/version.texi (UPDATED, EDITION): Update.
1362 * doc/stamp-vti: Likewise.
1364 2001-03-26 Ben Elliston <bje@redhat.com>
1366 * doc/credits.texi (Credits): Update.
1368 * gas-test.scm (<keyword>,test-data): Prefix keywords by their
1369 specified prefix and, if necessary, escape `$' in gas-build.sh to
1370 prevent unwanted shell variable expansion.
1372 2001-03-24 Ben Elliston <bje@redhat.com>
1374 * gas-test.scm (<hw-asm>,test-data): Choose pseudo-random data.
1375 (<keyword>,test-data): Likewise.
1376 (<hw-address>,test-data): Likewise.
1377 (<hw-iaddress>,test-data): Likewise.
1378 (-collate-test-set): New function.
1379 (build-test-set): Use it.
1380 (gen-gas-test): Generate five test cases per instruction.
1381 (cgen-allinsn.exp): Include "-*- Tcl -*-" in DejaGNU test file.
1383 * read.scm: Load "slib/random" if random is not defined.
1384 * slib/random.scm: New file.
1386 * utils.scm: Remove comments about the Hobbit compiler.
1387 (copyright-cygnus): Add 2001.
1388 (package-cygnus-simulators): Replace "Cygnus" with "Red Hat".
1389 (package-gnu-simulators): Tidy.
1391 2001-03-23 Ben Elliston <bje@redhat.com>
1393 * cgen-gas.scm: Inline documentation improvements.
1395 2001-03-21 Ben Elliston <bje@redhat.com>
1397 * opc-itab.scm (compute-syntax): Emit a parse error if an operand
1398 given in a syntax string is undefined.
1400 * opc-itab.scm (compute-syntax): Emit a parse error if an operand
1401 name is empty or invalid -- eg. "$(rs)" instead of "($rs)".
1403 2001-03-20 Patrick Macdonald <patrickm@redhat.com>
1405 * desc-cpu.scm (@arch@_cgen_cpu_open): Correct machine calculation
1406 for arg_type CGEN_CPU_OPEN_BFDMACH.
1408 2001-03-20 Ben Elliston <bje@redhat.com>
1410 * opc-itab.scm (-gen-insn-enum): Do not append a dummy `max'
1411 instruction onto the instruction list. Define MAX_INSNS to be the
1412 value of the last instruction enum plus one.
1414 2001-03-14 Nick Clifton <nickc@redhat.com>
1416 * utils.scm (copyright-fsf): Add 2001. Remove (C).
1418 2001-03-05 Dave Brolley <brolley@redhat.com>
1420 * sim-decode.scm (-gen-extract-case): Generate declaration of "insn"
1421 if the number of ifields is greater than zero.
1423 2001-03-01 Frank Ch. Eigler <fche@redhat.com>
1425 * sid.cpu (-op-gen-set-trace[-parallel], -create-virtual-insns!):
1426 Emit LIKELY/UNLIKELY branch probability hints.
1427 * sid-decode.cpu (-gen-record-args): Ditto.
1429 2001-02-02 Patrick Macdonald <patrickm@redhat.com>
1431 * desc-cpu.scm (-gen-hash-defines): Rename
1432 CGEN_ACTUAL_MAX_SYNTAX_BYTES to CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS.
1434 2001-01-26 Frank Ch. Eigler <fche@redhat.com>
1436 * sid-cpu.scm (gen-parallel-exec-type): Use unsigned long long for
1438 (-gen-write-fn, -gen-sem-case, -gen-sfrag-case): Ditto.
1439 * sid-decode.scm (-gen-scache-decls): Exclude writeback tracking field
1441 * sid.scm (<operand> gen-write): Use unsigned long long expression
1443 (-op-gen-set-trace, -op-gen-set-trace-parallel): Ditto.
1444 (<unit> gen-profile-code): Ditto.
1446 2001-01-23 Johan Rydberg <jrydberg@opencores.org>
1448 * doc/rtl.texi (Expressions): Document the (index-of ...) and
1451 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
1453 * operand.scm (<operand> pretty-sem-name): New field.
1454 (<operand> make): Initialize it from hw-name.
1455 (op:set-pretty-sem-name!): New function.
1456 (<operand> gen-pretty-name): Default to fetching new field.
1457 * rtl.scm (hw): Copy hw-name to pretty-sem-name instead. Restore
1458 sem-name setting from -rtx-hw-name.
1460 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
1462 * rtl.scm (hw): Copy hw-name to new operand's sem-name, to simplify
1463 its subsequent gen-pretty-name.
1465 * read.scm: Increase thread working stack limit and backtrace
1468 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
1470 * doc/rtl.texi: Deprecate and depreciate the decode-assist construct.
1472 2001-01-06 Johan Rydberg <jrydberg@opencores.org>
1474 * openrisc.cpu (or32): Setup semantics for h-delay-insn to
1475 current insn plus 4.
1476 (h-delay-insn): New hardware register.
1477 (l-jal): Uses h-delay-insn instead of pc when setting link register.
1481 * openrisc.opc (parse_hi16): Sign extend value.
1482 (parse_lo16): Likewise.
1484 2001-01-06 Ben Elliston <bje@redhat.com>
1486 * utils-gen.scm (gen-sfmt-enum-decl): Use @prefix@ and @PREFIX@
1487 instead of @cpu@ and @CPU@ to generically prefix symbol names.
1488 * sim-cpu.scm (-gen-sem-fn-table-entry): Likewise.
1489 (-gen-semantic-fn-table): Likewise.
1490 (-gen-scache-semantic-fn): Likewise.
1491 (-gen-no-scache-semantic-fn): Likewise.
1492 (cgen-read.c): Likewise.
1493 (cgen-sem-switch.c): Likewise.
1494 * desc-cpu.scm (cgen-desc.c): Use @arch@, not @prefix@, since this
1495 is a filename prefix.
1496 * sim-decode.scm (IDESC-TABLE-VAR): Use @prefix@, et al.
1497 (-gen-decode-insn-globals): Likewise.
1498 (-gen-idesc-decls): Likewise.
1499 (cgen-decode.h): Likewise.
1500 (cgen-decode.c): Likewise.
1501 * sim.scm (gen-cpu-insn-enum-decl): Likewise.
1502 (gen-cpu-insn-enum): Likewise.
1503 (sim-finish!): Likewise.
1505 2001-01-05 Johan Rydberg <jrydberg@opencores.org>
1507 * openrisc.cpu: New file.
1508 * openrisc.opc: Likewise.
1510 2000-12-12 Ben Elliston <bje@redhat.com>
1512 * doc/rtl.texi (Expressions): Document the (delay ..) rtx.
1514 2000-12-07 Ben Elliston <bje@redhat.com>
1516 * sim-decode.scm (-gen-extract-case): Do not emit a definition for
1517 "insn" when there are zero ifields to extract.
1519 2000-12-04 Frank Ch. Eigler <fche@redhat.com>
1521 * utils-sim.scm (gen-define-argbuf-macro): Handle sfmt=#f case, to be
1522 used by simple/non-scache simulators.
1523 * sim-cpu.scm (-gen-read-case): Call gen-define/undef-field-macro
1524 regardless of with-scache?.
1525 (-gen-write-case, -gen-no-scache-semantic-fn, -gen-sem-case): Ditto.
1527 2000-12-03 Ben Elliston <bje@redhat.com>
1529 * desc-cpu.scm (cgen-desc.h): Clarify generated filenames.
1530 (cgen-desc.c): Likewise.
1532 2000-12-01 Greg McGary <greg@mcgary.org>
1534 * desc.scm (<keyword>,gen-defn): Prepend prefix to keyword names.
1536 2000-12-01 Ben Elliston <bje@redhat.com>
1538 * sim-cpu.scm (cgen-cpu.h): Only emit argbuf, scache and extract
1539 definitions if run without with-multipla-isa?.
1540 (cgen-defs.h): New function. Emit an ISA-specific defs file.
1541 * cgen-sim.scm (sim-arguments): Accept -G option to generate defs.
1543 2000-11-24 Ben Elliston <bje@redhat.com>
1545 * sim-cpu.scm (-gen-hardware-struct): New function.
1546 (-gen-hardware-types): If with-multiple-isa is specified, emit all
1547 hardware elements wich have share one or more ISAs with the ISAs
1550 * sim.scm (-with-multiple-isa?): New symbol.
1551 (with-multiple-isa?): New function.
1552 (option-init!): Initialise -with-multiple-isa?.
1553 (option-set!): Handle with-multiple-isa option.
1555 2000-11-21 Ben Elliston <bje@redhat.com>
1557 * utils.scm (copyright-fsf): Add the year 2000.
1559 2000-11-20 Frank Ch. Eigler <fche@redhat.com>
1561 * opc-itab.scm (-gen-ifmt-table, -gen-macro-insn-table: Remove
1562 unneeded "\n\n" from F() macro definition.
1564 2000-11-15 Greg McGary <greg@mcgary.org>
1566 * utils-cgen.scm (gen-define-with-symcat): New function.
1567 * desc-cpu.scm (gen-ifld-defns): Use it.
1568 (gen-hw-table-defns): Use it.
1569 (-gen-hash-defines): Use it.
1570 (gen-operand-table): Use it.
1571 (gen-insn-table): Use it. Remove spurious `#undef MNEM'.
1572 * opc-itab.scm (-gen-ifmt-table): Use it.
1573 (-gen-insn-opcode-table): Use it.
1574 (-gen-macro-insn-table): Use it.
1575 * opc-opinst.scm (-gen-operand-instance-tables): Use it.
1576 * sim-cpu.scm (cgen-semantics.c): Use it.
1577 (cgen-sem-switch.c): Use it.
1579 2000-11-10 Frank Ch. Eigler <fche@redhat.com>
1581 * utils-sim.scm (-gen-decode-insn-entry): Add fn? parameter to signal
1582 request to emit calls to insn extractors as functions rather than
1583 branches to inline blocks.
1584 (-gen-decode-expr-set-itype, -gen-decode-expr-entry): Ditto.
1585 (-gen-decode-table-entry, -gen-decoder-switch, gen-decoder): Ditto.
1587 * sim-decode.c (-gen-decode-fn): Tell (gen-decode) to emit branches
1588 to extractor clauses.
1590 2000-11-10 Frank Ch. Eigler <fche@redhat.com>
1592 * decode.scm (-distinguishing-bit-population): Significantly
1593 improve popularity heuristic. Renamed from
1594 (-mask-bit-population): Gone.
1595 (-population-above-threshold): Sort new bit numbers in order of
1597 (-population-top-few): Allow up to three more bits to be selected
1598 than requested. Correct selection order to prefer better bits.
1599 Correct bug in fewer-than-requested case. Keep threshold as
1601 (decode-best-get-bits): Pass also the insn-values.
1603 * utils-sim.scm (-gen-decoder-switch): Add comment suggesting a
1604 future optimization.
1606 * utils.scm (message): Format nested lists better.
1608 2000-11-09 Doug Evans <dje@casey.transmeta.com>
1610 * dev.scm: Add srcdir to %load-path.
1612 * rtx-funcs.scm (subword): Mode of argument can be different
1613 than mode of result, so don't use OP0 to specify argument's mode.
1615 2000-11-02 Ben Elliston <bje@redhat.com>
1617 * doc/porting.texi (Building a GAS test suite): Document my change
1620 2000-11-01 Ben Elliston <bje@redhat.com>
1622 * sim-test.scm (cgen-build.sh): Include "-*- Asm -*-" in test cases.
1624 2000-10-31 Ben Elliston <bje@redhat.com>
1626 * gas-test.scm (cgen-build.sh): Allow the generated script to run
1627 with no command line arguments if the gas build directory can be
1630 2000-10-26 Doug Evans <dje@casey.transmeta.com>
1632 * insn.scm (-parse-insn-format-symbol): Fix spelling error,
1633 op-ifld -> op-ifield.
1635 2000-10-23 Frank Ch. Eigler <fche@redhat.com>
1637 * thumb.scm (cc-tests): Add (ISA thumb) attribute.
1639 2000-10-13 matthew green <mrg@cygnus.com>
1641 * utils-cgen.scm (get-ifetch): Move from here ...
1642 * sim.scm (get-ifetch): ... to here.
1643 * sid.scm (get-ifetch): Copy and port to c++.
1645 2000-10-06 Dave Brolley <brolley@redhat.com>
1647 * utils-gen.scm (-gen-ifld-extract-base): Compute start position as
1648 ifld-start + ifld-word-offset.
1649 (gen-ifld-extract): Check adata-integral-insn? before checking whether
1650 the field is beyond the base number of bits.
1651 (gen-define-ifields): Use a base-length of 32 if adata-integral-insn?.
1652 (gen-extract-ifields): Ditto.
1653 * gas-test.scm (gentest): Generate backslashes before '[' and ']'
1654 characters in the regular expression.
1656 2000-10-02 Frank Ch. Eigler <fche@redhat.com>
1658 * desc-cpu.scm: (gen-operand-decls): Emit MAX_OPERANDS as a
1659 preprocessor constant.
1661 2000-09-21 Frank Ch. Eigler <fche@redhat.com>
1663 * slib/logical.scm: New file from slib. Provides robust bitwise
1664 logical operations for large integers.
1665 * read.scm: maybe-load it.
1667 2000-09-15 Frank Ch. Eigler <fche@redhat.com>
1669 * enum.scm (define-full-insn-enum): Filter with keep-isa predicate.
1670 * ifield.scm (-ifield-parse, -multi-ifield-parse): No longer assert
1671 single-isa predicate, but support keep-isa filtering.
1673 2000-09-08 Frank Ch. Eigler <fche@redhat.com>
1675 * rtl-c.scm (s-sequence): Handle nested c-calls in both
1676 statement-expression and comma-expression contexts.
1677 (s-c-call, s-c-raw-call): Add warning comment about bad assumption.
1679 2000-09-08 Frank Ch. Eigler <fche@redhat.com>
1681 * decode.scm (-population-top-few): Signal error gracefully if
1682 decoding is about to become ambiguous.
1684 2000-09-06 Frank Ch. Eigler <fche@redhat.com>
1686 * doc/rtl.texi (decode-assist): Describe this field as optional.
1688 2000-09-06 Frank Ch. Eigler <fche@redhat.com>
1690 * utils-gen.scm (gen-multi-ifld-extract): Handle case of multi-ifield
1693 2000-09-05 Dave Brolley <brolley@redhat.com>
1695 * sim.scm (sim-finish!): Honour the definition of FAST_P when calling
1696 @cpu@_pbb_begin. Use 0 if FAST_P is not defined.
1698 2000-08-29 Dave Brolley <brolley@redhat.com>
1700 * utils-gen.scm (gen-ifld-extract): Pass total-len if
1701 adata-integral-insn is true for this architecture.
1703 2000-08-24 Frank Ch. Eigler <fche@redhat.com>
1705 * hardware.scm (<hw-immediate> get-index-mode): Define method.
1706 * operand.scm (<operand> gen-pretty-name): Tolerate no op:sem-name.
1707 * rtl-c.scm (-c-rtl-get): Improve an error message.
1708 * sim.scm (-op-gen-set-trace): Support <derived-operand> lvalues.
1710 2000-08-22 Frank Ch. Eigler <fche@redhat.com>
1712 * Makefile.in (DIST_COMMON): Regenerated.
1713 * ifield.scm (<derived-ifield> needed-iflds): New method.
1714 * iformat.scm (-ifmt-lookup-sfmt!): Use base ifields for
1715 sfmts built from <derived-ifield>s.
1716 * operand.scm (-derived-parse-encoding): Give <derived-ifield> a fixed
1717 type symbol 'derived-ifield, not an unparseable string.
1718 * utils-sim.scm (op-needed-iflds) Handler 'derived-ifield case.
1719 (-sfmt-contents): Add tracing.
1721 From Doug Evans <dje@transmeta.com>:
1722 * sim.scm (<operand> cxmake-get): Result is a <c-expr>, not a string of
1725 2000-08-20 Doug Evans <dje@casey.transmeta.com>
1727 * rtl-c.scm (rtl-c-expr-with-estate): New fn.
1728 (rtl-c-expr-parsed,rtl-c-expr): New fns.
1729 (-rtl-c-get): Rename from rtl-c-get.
1730 (rtl-c-get): New fn for getter logging.
1732 2000-07-28 Ben Elliston <bje@redhat.com>
1736 2000-07-25 Ben Elliston <bje@redhat.com>
1738 * doc/credits.texi (Credits): Add Frank Eigler.
1740 2000-07-24 Dave Brolley <brolley@redhat.com>
1742 * opc-itab.scm (gen-insn-opcode-table): Initialize the first element
1744 * desc.scm (gen-attr-table-defn): Initialize all elements fully.
1745 (<keyword>): Initialize all elements fully.
1746 * desc-cpu.scm (-gen-isa-table-defns): Initialize the last element
1748 (-gen-mach-table-defns): Ditto.
1749 (-gen-ifld-defns): Ditto.
1750 (-gen-operand-table): Ditto.
1751 (-gen-insn-table): Ditto.
1752 (-gen-cpu-open): Nothing to do for the mach table.
1754 2000-07-13 Ben Elliston <bje@redhat.com>
1756 * doc/version.texi (UPDATED): Update.
1758 2000-07-05 Ben Elliston <bje@redhat.com>
1760 * configure.in (AC_PATH_PROG): Remove.
1761 * configure: Regenerate.
1762 * Makefile.am (GUILE): Locate guile dynamically.
1763 * Makefile.in: Regenerate.
1764 * doc/Makefile.in: Likewise.
1766 2000-07-03 Ben Elliston <bje@redhat.com>
1768 * desc-cpu.scm (cgen-desc.c): Include "libiberty.h".
1769 * opc-itab.scm (cgen-opc.c): Likewise.
1771 2000-06-28 Frank Ch. Eigler <fche@redhat.com>
1773 * rtl.scm (-rtx-traverse-locals): Correct call to `symbol?' for
1774 guile 1.4 compatibility.
1775 (rtx-env-dump): Comment out buggy display calls.
1777 2000-06-15 matthew green <mrg@redhat.com>
1779 * opc-itab.scm (-gen-ifmt-table-1): Add extra braces to pacify GCC.
1781 2000-06-14 Frank Ch. Eigler <fche@redhat.com>
1783 * Makefile.in: Regenerated.
1785 * desc-cpu.scm (gen-ifld-decls): Exclude derived ifields.
1786 (gen-ifld-defns): Ditto.
1787 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
1788 * rtl.c (rtl-finish!): Ditto.
1789 * opc-itab.scm (-gen-ifield-decls): Ditto.
1790 * opcodes.scm (gen-switch): Exclude derived operands.
1791 * operand.scm (op-iflds-used): Expand derived operands.
1792 (hw-index-derived): New dummy function to create dummy object.
1793 (-derived-operand-parse): Fix mode arg passed to <derived-operand>
1794 constructor. Set object's hw-name and index fields.
1795 (-anyof-merge-subchoices): Set instance object's index also.
1796 (-anyof-name): New helper function.
1797 (anyof-merge-semantics): Correct replacement of operand names in
1799 (op-ifield): Tolerate derived-operands and their funny indices better.
1800 * ifield.scm (ifld-known-values): Expand derived ifields.
1801 (non-multi-ifields, non-derived-ifields): New utility functions.
1802 (ifld-decode-mode): Tolerate objects with unbound decode field.
1803 * iformat.scm (compute-insn-length): Expand derived ifields.
1804 (compute-insn-base-mask): Ditto.
1805 * insn.scm (insn-base-ifields): Remove.
1806 (<insn>): Add iflds-values entry to cache ifld-base-ifields values.
1807 (insn-value): Call ifld-base-ifields and ifld-constant? instead.
1808 * mach.scm (arch-analyze-insns!): Exclude multi-insns.
1809 * sem-frags.scm (sim-sfrag-analyze-insns!): Ditto.
1810 (-frag-test-data): Ditto.
1811 * sid-cpu.scm (cgen-write.cxx,-gen-sem-switch): Ditto.
1812 (-gen-sem-switch-engine); Ditto.
1813 * sid-model.scm (-gen-model-insn-fns, -gen-model-timing-table): Ditto.
1814 * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
1815 (-gen-record-args): Tolerate unbound op-ifield.
1816 * sid.scm (<derived-operand> cxmake-get): New sketch implementation.
1817 (-gen-arch-model-decls, scache-engine-insns, pbb-engine-insns):
1818 Exclude multi-insns.
1819 * sim-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
1820 * utils-sim.scm (op-extract?): Handle derived operands.
1822 * gas-test.scm (cgen-build.sh): Quote '*' chars printed by objdump.
1823 * semantics.scm (-build-operand!): Handle 'DFLT case during parsing.
1824 * hardware.scm (hardware-for-mode): New function.
1826 * insn.scm (filter-harmlessly-ambiguous-insns): New function for
1827 cleaning up decode tables.
1828 (mask-superset?): Little helper function for above.
1829 * decode.scm (-build-decode-table-entry): Call it.
1830 (-opcode-slots): Add some more tracing.
1831 * arm.cpu: Disable decode-splits construct due to implementation
1832 conflict with `filter-harmlessly-ambiguous-insns'
1834 * decode.scm (-population-top-few): New function for better decode
1835 bit generation. Includes minor helper functions.
1836 (decode-get-best-bits): Call it instead.
1837 (OLDdecode-get-best-bits): Renamed previous version of above.
1840 2000-06-13 Ben Elliston <bje@redhat.com>
1842 * configure.in: Use AC_EXEEXT with Cygnus mode. Remove AC_ARG_WITH
1843 for the Guile library directory.
1844 * configure: Regenerate.
1845 * Makefile.in, doc/Makefile.in: Regenerate.
1847 * Makefile.in, doc/Makefile.in: Regenerate.
1848 * configure.in: Remove unnecessary tests. Move to version 1.0.
1849 * acconfig.h, config.in: Remove.
1850 * configure, aclocal.m4: Regenerate.
1851 * doc/stamp-vti, doc/version.texi: Likewise.
1852 * AUTHORS: New file.
1854 2000-06-07 Ben Elliston <bje@redhat.com>
1856 * fixup.scm (symbol-bound?): Reduce debugging output.
1858 2000-06-02 matthew green <mrg@redhat.com>
1860 * insn.scm (insn-base-ifields): Returns all the instruction fields for
1861 a given instruction, replacing derived fields with their subfields.
1862 (insn-value): Use `insn-base-ifields' to find all constant values.
1863 (multi-insn-instantiate!): Comment some debug messages.
1865 2000-06-01 Ben Elliston <bje@redhat.com>
1867 * doc/rtl.texi (Expressions): Document a hazard with the choice of
1868 symbol names used in a (c-call ..) rtx.
1870 * sim-test.scm (build-test-set): Return (()) for an instruction
1871 with no operands, so it too is included in the generated test set.
1873 2000-05-31 Ben Elliston <bje@redhat.com>
1875 * Makefile.am (gas-test): Ensure $(ISA) is not empty.
1876 (sim-test): Likewise.
1877 * Makefile.in: Regenerate.
1879 2000-05-30 Frank Ch. Eigler <fche@redhat.com>
1881 * read.scm (-cgen): In debugging mode (-b), ask guile for untruncated
1882 stack traceback, in an order that resembles gdb's `bt'.
1884 2000-05-24 Frank Ch. Eigler <fche@redhat.com>
1886 * desc-cpu.scm (-gen-hash-defines): Use ifmt-ifields again.
1887 * opc-itab.scm (-gen-ifmt-table-1): Ditto.
1888 * gas-test.scm (gas-test-analyze!, cgen-build.sh): Filter out
1890 * ifield.scm (multi-ifield): Define workable field-mask and field-value
1892 (ifld-base-ifields): New routine to replace ifmt-expanded-ifields.
1893 * iformat.scm (ifmt-expanded-ifields): Gone.
1894 (ifields-base-ifields): New function. Call ifld-base-ifields for real
1896 (-ifmt-lookup-ifmt!): Use it to expand derived/multi combos in new
1899 * opcodes.scm (multi-ifield gen-extract): Correct spacing in generated
1902 2000-05-23 Frank Ch. Eigler <fche@redhat.com>
1904 * sid.scm (with-any-profile?): New function clone.
1906 2000-05-19 Frank Ch. Eigler <fche@redhat.com>
1908 * utils-gen.scm (gen-multi-ifld-extract): Fix decode hook for sim.
1910 2000-05-18 Frank Ch. Eigler <fche@redhat.com>
1912 * ifield.scm (-multi-ifield-parse): Add encode/decode args.
1913 (-multi-ifield-read): Parse them.
1914 (define-full-multi-ifield): Pass #f/#f as defaults for them.
1915 * opcodes.scm (multi-ifield gen-insert): Add encode hook.
1916 (multi-ifield gen-extract): Add decode hook.
1917 * utils-gen.scm (gen-multi-ifld-extract): Add decode hook for sim.
1919 * insn.scm (syntax-break-out): More correctly handle \-escaped
1921 (syntax-make-elements): Ditto.
1922 * opc-itab.scm (compute-syntax): Ditto.
1924 2000-05-17 Ben Elliston <bje@redhat.com>
1926 * gas-test.scm (cgen-build.sh): Log the correct script filename.
1928 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
1930 * gas-test.scm (build-test-set): Return (()) for an instruction
1931 with no operands, so it too is included in the generated test set.
1933 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
1935 * desc-cpu.scm (-gen-hash-defines): Define CGEN_ACTUAL_MAX values for
1936 IFMT_OPERANDS and SYNTAX_BYTES.
1938 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
1940 * sim.scm (with-any-profile?): New function.
1941 * utils-sim.scm (-sfmt-contents): Use above instead of `with-profile?'
1942 to decide whether or not to include profiling counters.
1944 2000-05-10 Frank Ch. Eigler <fche@redhat.com>
1946 Fuller derived-operand support for opcodes.
1947 * insn.scm (non-multi-insns): New filter to oppose `multi-insns'.
1948 * desc-cpu.scm (-define-hash-defines): Compute CGEN_MAX_SYNTAX_BYTES.
1949 Correctly compute ..._IFMT_OPERANDS. Omit useless ..._INSN_OPERANDS.
1950 (gen-operand-table): Omit derived- and anyof- operands from table.
1951 (gen-insn-table): Omit multi-insns from table.
1952 * iformat.scm (ifmt-expanded-fields): New function to expand
1953 subfields of derived-ifields.
1954 (ifmt-compute!): Ignore remaining multi-insns.
1955 * mach.scm (isa-min-insn-bitsize, isa-max-insn-bitsize): Ignore
1957 * opc-itab.scm (-gen-ifmt-table-1): Use ifmt-expanded-ifields.
1958 (-gen-insn-enum, -gen-insn-opcode-table): Ignore multi-insns.
1959 * opcodes.scm (derived-operand): Define abort()ing gen-insert,
1960 gen-extract, gen-fget, gen-fset, gen-parse, gen-print functions.
1961 (gen-switch): Omit anyof-operands.
1962 * operand.scm (-anyof-syntax): New function.
1963 (-anyof-merge-syntax): Call it.
1964 * utils.scm (collect): New idiomatic function.
1966 2000-05-10 Ben Elliston <bje@redhat.com>
1968 * m68k.cpu: New file (work in progress).
1970 2000-05-05 Frank Ch. Eigler <fche@redhat.com>
1972 * Makefile.am (all-local): New target. Create stamp-cgen.
1973 * Makefile.in: Regenerated.
1974 * doc/Makefile.in: Regenerated.
1976 2000-04-26 Frank Ch. Eigler <fche@redhat.com>
1978 * operand.scm (-operand-g/setter-syntax): Correct off-by-one error.
1979 (-operand-parse-setter): Ditto.
1980 * utils-sim.scm (needed-iflds): Store ifield (index) in argbuf, even
1981 for CACHE-ADDR operands.
1982 * sid-decode.scm (-gen-record-args): Remove newly duplicated extract
1983 trace entries. Widen byte-wide values for printing.
1984 * sid.scm (-op-gen-set-trace): Enhance result trace with op indices.
1985 Widen byte-wide values for printing. Hexify memory addresses.
1987 2000-04-23 matthew green <mrg@redhat.com>
1989 * m32r.cpu: Fix a typo.
1991 Fri Apr 21 22:18:48 2000 Jim Wilson <wilson@cygnus.com>
1993 * ia64.cpu (define-model): Change merced to Itanium.
1994 (f-qp): Change quilifying to qualifying.
1995 (movbr_ph, movbr_pvec): Delete.
1996 (I-I21): Delete uses of movbr_ph and movbr_pvec.
1998 2000-04-07 Ben Elliston <bje@redhat.com>
2000 * doc/porting.texi (Building a simulator test suite): Clarify
2001 where generated test cases are placed.
2003 2000-04-07 Ben Elliston <bje@redhat.com>
2005 * Makefile.am (gas-test): Remove dependency on `cgen'.
2007 * Makefile.in: Regenerate.
2009 2000-04-04 Frank Ch. Eigler <fche@redhat.com>
2011 * hardware.scm (<hw-pc> parse): Allow user to set type for pc register.
2012 * mode.scm (mode-finish!): Add placeholder code for mach-dependent
2013 type reconfiguration.
2014 * utils-sim.scm (-sfmt-contents): Add profile-counters only if
2017 2000-03-30 Ben Elliston <bje@redhat.com>
2019 * doc/rtl.texi (Enumerated constants): Add concept index entries.
2021 2000-03-24 Ben Elliston <bje@redhat.com>
2023 * Makefile.am (stamp-cgen): Reinstate target.
2024 * Makefile.in: Regenerate.
2026 2000-03-22 Ben Elliston <bje@redhat.com>
2028 * slib/ppfile.scm: Remove; unused.
2029 * slib/defmacex.scm: Likewise.
2031 2000-03-21 Ben Elliston <bje@redhat.com>
2033 * doc/internals.texi (Source file overview): Document.
2035 * Makefile.am (GUILEDIR): Remove.
2036 (CGEN): Ditto. Callers use $(GUILE) instead.
2037 (GUILEFLAGS): Ditto.
2039 (APPDESCFILES): Ditto.
2040 (OPCODESFILES): Ditto.
2042 (pkgdata_SCRIPTS): Ditto.
2043 (stamp-cgen): Remove target.
2044 * Makefile.in: Regenerate.
2046 * configure.in: Remove header and library tests.
2047 * configure: Regenerate.
2048 * config.in: Likewise.
2050 2000-03-20 Ben Elliston <bje@redhat.com>
2052 * read.scm: Cease loading "hob-sup.scm".
2053 * utils.scm: Inherit the fastcall family of procedures (for now).
2054 * hob-sup.scm: Remove.
2056 2000-03-20 Ben Elliston <bje@redhat.com>
2058 * configure.in (AC_OUTPUT): Do not emit .gdbinit.
2059 * configure: Regenerate.
2060 * gdbinit.in: Remove.
2062 2000-03-17 Ben Elliston <bje@redhat.com>
2064 * Makefile.am (CGEN): Use guile, not cgen.
2065 (CGENCFLAGS, LIBIBERTY, INCLUDES): Remove.
2066 (bin_PROGRAMS, cgen_SOURCES): Likewise.
2067 (CGENFILES): Fold CGEN_HOB_INPUT_FILES and CGEN_NOHOB_FILES.
2068 (HOBBIT_INPUT_FILES, HOBBIT_OUTPUT_FILE): Remove.
2069 (HOB_OBJS): Likewise.
2070 (CGEN_HOB_SRC, CGEN_HOB_OBJ): Likewise.
2071 (CGENOBJS): Likewise.
2072 (cgen_DEPENDENCIES, cgen_LDFLAGS, cgen_LDADD): Likewise.
2073 (hobbit, hobbit.o, hobbit.c): Remove targets.
2074 (cos.o, cgen.o, cgen-gh.o, hob-sup.o): Likewise.
2075 (CLEANFILES): Update.
2076 * acconfig.h (WITH_HOBBIT): Remove.
2077 * configure.in: Do not test for 3 arg scm_make_vector. Remove
2078 option --with-cgen-hobbit.
2079 * cos.h, cos.c, hob-main.c, hob-sup.c, hob-sup.h, hob.sh: Remove.
2080 * cgen-gh.h, cgen-gh.c, cgen-hob.scm, cgen.c: Likewise.
2081 * hobbit.c, hobbit.h, hobbit.scm: Likewise.
2082 * hobscmif.h, hobslib.scm, scmhob.h: Likewise.
2083 * Makefile.in: Regenerate.
2084 * config.in: Likewise.
2085 * aclocal.m4: Likewise.
2086 * configure: Likewise.
2087 * README (Hobbit support): Remove.
2088 * doc/internals.texi (Conventions): Do not mention Hobbit.
2089 * doc/porting.texi (Supported Guile versions): Likewise.
2091 2000-03-16 Frank Ch. Eigler <fche@redhat.com>
2093 * sid-cpu.scm (-gen-sem-switch-engine): Adjust calling &
2094 callback convention to new sid sidutil::basic_cpu code.
2095 (-gen-sfrag-engine-fn): Ditto.
2096 * sid.scm (-create-virtual-insns!): Ditto.
2097 (-hw-gen-set-quiet-pc): Mark delay slot execution specially in pbb
2099 (cxmake-skip): Implement properly for pbb mode.
2101 2000-03-03 Ben Elliston <bje@redhat.com>
2103 * doc/internals.texi: New file.
2105 2000-02-29 Ben Elliston <bje@redhat.com>
2107 * doc/rtl.texi (Derived operands): Remove unnecessary footnote.
2108 * doc/porting.texi: Formatting tweaks.
2110 2000-02-25 Nick Clifton <nickc@cygnus.com>
2112 * desc-cpu.scm (*_cgen_cpu_open): Initialise signed_overflow_ok_p
2115 Thu Feb 24 14:09:01 2000 Doug Evans <devans@seba.cygnus.com>
2117 * operand.scm (<anyof-operand>,make!): Initialize mode-name, not
2120 2000-02-23 Andrew Haley <aph@cygnus.com>
2122 * m32r.cpu (pcmpbz): Make pcmpbz a special (i.e. hidden)
2125 2000-02-24 Ben Elliston <bje@redhat.com>
2127 * doc/rtl.texi (Derived operands): Add some cindex entries.
2129 2000-02-23 Ben Elliston <bje@redhat.com>
2131 * ia32.cpu (dndo): Move general purpose macro from here ..
2132 * simplify.inc (dndo): .. to here.
2134 2000-02-18 Frank Ch. Eigler <fche@redhat.com>
2136 * arm.cpu (h-tbit): Add c-call setter function.
2139 2000-02-17 Frank Ch. Eigler <fche@redhat.com>
2141 * sem-frags.scm (-frag-hash-compute!): Add appstuff arg for traversal.
2142 (-frag-cost-compute!): Ditto.
2143 * utils.scm (copyright-cygnus): Add Y2K.
2144 * sid-cpu.scm (@prefix@_pbb_run): Add unsigned& argument.
2146 2000-01-25 Nick Clifton <nickc@cygnus.com>
2148 * desc-cpu.scm (@arch@_cgen_cpu_open): Add code to initialise
2149 flags field of the CGEN_CPU_TABLE structure.
2151 Sun Dec 12 14:20:36 1999 Doug Evans <devans@seba.cygnus.com>
2153 * operand.scm (<anyof-instance>): Renamed from <anyof-value>.
2154 All references updated.
2156 Tue Nov 30 11:06:22 1999 Doug Evans <devans@seba.cygnus.com>
2158 * ia32.cpu: Rewrite addressing mode support.
2160 * ifield.scm (<ifield>): New member `follows'.
2161 (ifld-known-values): New proc.
2162 (<ifield>): New method set-word-offset!.
2163 (ifld-set-word-offset!): New proc.
2164 (ifld-new-word-offset): New proc.
2165 (<ifield>): New method next-word.
2166 (<multi-ifield>): New method next-word.
2167 (ifld-next-word): New proc.
2168 (ifld-precedes?): New proc.
2169 (-ifield-parse): New args word-offset,word-length,follows.
2170 All callers updated. Handle CISC-style vs RISC-style ifields.
2171 (-ifield-read): Recognize word-offset,word-length,follows specs.
2172 (-ifld-parse-follows): New proc.
2173 (-multi-ifield-make-default-insert): New proc.
2174 (-multi-ifield-make-default-extract): New proc.
2175 (-multi-ifield-parse): Provide default values for insert,extract
2176 handlers if not specified.
2177 (<derived-ifield>): New class.
2178 (derived-ifield?): New predicate.
2179 (ifld-derived-operand?): New predicate.
2180 (f-anyof): New global.
2181 (ifld-anyof?,ifld-anyof-operand?): New predicates.
2182 (f-derived,ifld-derived?): Delete.
2183 (ifield-builtin!): Delete init of f-derived. Init f-anyof.
2184 * insn.scm (-sub-insn-ifields): New proc.
2185 (-sub-insn-make!): New proc.
2186 (multi-insn-instantiate!): Provide initial implementation.
2187 (-insn-parse): If insn contains "anyof" operands, create a
2188 <multi-insn> object instead of a plain <insn>.
2189 (-parse-insn-format-symbol): Rewrite derived operand handling.
2190 Add anyof operand handling.
2191 (-parse-insn-format-ifield-spec): Rewrite.
2192 (-parse-insn-format-operand-spec): Delete.
2193 (-parse-insn-format-list): Delete support for `(operand value)'.
2194 (anyof-operand-format?): Replaces derived-operand-format?.
2195 * operand.scm (-operand-parse-getter): Improve error messages.
2196 (-operand-parse-setter): Ditto.
2197 (<derived-operand>): New members args,syntax,base-ifield,encoding,
2199 (<anyof-operand>): Change baseclass from <derived-operand> to
2200 <operand>. Delete member values. New members base-ifield,choices.
2201 (anyof-operand?): New predicate.
2202 (-derived-parse-encoding,-derived-parse-ifield-assertion): New procs.
2203 (-derived-operand-parse): Rewrite.
2204 (-derived-operand-read): Rewrite.
2205 (-anyof-parse-choice): New proc.
2206 (-anyof-operand-parse): Rewrite.
2207 (-anyof-operand-read,define-anyof-operand): New procs.
2208 (<anyof-value>): Rewrite.
2209 (-anyof-initial-known): New proc.
2210 (anyof-satisfies-assertions?): New proc.
2211 (-anyof-merge-syntax,-anyof-merge-encoding): New procs.
2212 (-anyof-merge-getter,-anyof-merge-setter): New procs.
2213 (-anyof-merge-semantics,-anyof-merge-ifield-assertion): New procs.
2214 (-anyof-merge-subchoices,-anyof-all-subchoices): New procs.
2215 (-anyof-value-from-derived): New proc.
2216 (-anyof-all-choices-1,anyof-all-choices): New procs.
2217 (operand-init!): Create define-anyof-operand reader command.
2219 * insn (syntax-break-out): Take syntax as argument instead of insn.
2220 All callers updated.
2221 (syntax-make): Move here, from ???.
2223 * types.scm (<bitrange>): Rename accessors from bitrange:foo to
2224 bitrange-foo. All uses updated.
2225 (bitrange-next-word): New proc.
2227 * semantics.scm (-solve-expr-fn,rtx-solve): New procs.
2229 * rtl.scm (rtx-canonicalize): Provide initial implementation.
2230 (rtx-make-const,rtx-make-enum): New procs.
2231 (rtx-arg1,rtx-arg2): Renamed from -rtx-arg[12]. All callers updated.
2232 (rtx-mem-addr,rtx-mem-sel): New procs.
2233 (rtx-change-address): New proc.
2234 (rtx-make-ifield,rtx-make-operand,rtx-make-local): New proc.
2235 (rtx-make-set,rtx-single-set?): New procs.
2236 (rtx-combine): New proc.
2238 * rtl.scm (rtx-traverse): New arg `appstuff'. All callers updated.
2239 (rtx-traverse-with-locals): Ditto.
2240 (-rtx-traverse,-rtx-traverse-*): Ditto.
2242 * rtl.scm (define-subr): New proc.
2243 (rtl-init!): Create reader command `define-subr'.
2245 * cos.c (_object_mi_p): Ensure argument is an object.
2246 (indent): New function.
2247 (_object_print_elms): Add pretty-printing support.
2248 (_object_print): Ditto.
2250 * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall7.
2251 (*floats-s->c-fun-table*): Ditto.
2252 * hobbit.c,hobbit.h: Rebuild.
2253 * hob-sup.c (fastcall7): New proc.
2254 * hob-sup.h (fastcall7): Declare.
2255 * hob-sup.scm (fastcall7): New macro.
2257 * mach.scm (<arch>): New member subr-list.
2258 (current-subr-list,current-subr-add!,current-subr-lookup): New procs.
2259 (arch-finish!): Reverse recorded subr list.
2261 * read.scm (debug-env): New global.
2262 (debug-var-names,debug-var,debug-repl-env): New procs.
2263 (debug-repl): Rewrite. New arg `env-list'. All callers updated.
2264 (debug-quit): Renamed from `continue'.
2266 * simplify.inc (dsmf): New pmacro.
2268 * utils.scm (plus-scan): New proc.
2269 (split-bits): Rewrite.
2270 (split-value): New proc.
2272 1999-10-13 Doug Evans <devans@casey.cygnus.com>
2274 * doc/Makefile.am (DOCFILES): Add notes.texi.
2275 * doc/Makefile.in: Rebuild.
2277 1999-10-11 Doug Evans <devans@casey.cygnus.com>
2279 * ifield.scm (ifld-derived?): New proc.
2280 (f-derived): New global.
2281 (ifield-builtin!): Create ifield f-derived.
2282 (<multi-insn>): New class.
2283 (multi-insn?): New predicate.
2284 (multi-insn-instantiate!): New proc.
2285 (-insn-parse): Create <multi-insn> objects for insns with derived
2287 (-parse-insn-format-symbol): Handle derived ifields.
2288 (-parse-insn-format-ifield-spec): New proc.
2289 (-parse-insn-format-operand-spec): New proc.
2290 (-parse-insn-format-list): Simplify.
2291 (-parse-insn-format): No longer allow (ifield-object value) spec.
2292 (derived-operand-format?): New proc.
2293 (insn-alias?): New proc.
2294 (non-alias-insns): Rewrite.
2295 (insn-real?): Renamed from real-insn?, all callers updated.
2296 (virutal-insns): Rewrite.
2297 (multi-insns): New proc.
2298 * mach.scm (arch-analyze-insns!): Instantiate multi-insns if present.
2299 * operand.scm (op-ifield): Renamed from op:ifield, all callers updated.
2300 Return #f if operand doesn't have an index or if index is not an
2302 (hw-index-anyof): New proc.
2303 (-operand-parse): Allow integer indices.
2304 (<derived-operand>): New class.
2305 (derived-operand?): New predicate.
2306 (<anyof-operand>): New class.
2307 (<anyof-value>): New class.
2308 (-anyof-parse-value,-anyof-operand-parse): New procs.
2309 (-derived-operand-parse,-derived-operand-read): New procs.
2310 (define-derived-operand,define-full-derived-operand): New procs.
2311 (operand-init!): New reader command define-derived-operand.
2313 * utils.scm (list-take): Handle negative amount.
2314 (element?): Rewrite.
2316 1999-10-10 Doug Evans <devans@casey.cygnus.com>
2318 * dev.scm: quick-utils.scm renamed to ~/.cgenrc.
2320 1999-10-04 Richard Henderson <rth@cygnus.com>
2322 * ia64.cpu: Checkpoint.
2324 1999-09-29 Doug Evans <devans@casey.cygnus.com>
2326 * sim-cpu.scm (-gen-semantic-fn-table): Virtual insns are always valid.
2328 * sim.scm (sim-finish!,x-invalid): Always set pc. Set vpc based on
2329 default-insn-bitsize. Pass vpc to sim_engine_invalid_insn.
2331 Wed Sep 29 14:39:39 1999 Dave Brolley <brolley@cygnus.com>
2333 * sim.scm (sim-finish!): Don't call sim_io_error for invalid insn. Use
2334 PC returned by sim_engine_invalid_insn.
2336 1999-09-28 Doug Evans <devans@casey.cygnus.com>
2338 * ia32.cpu: New file.
2340 1999-09-25 Doug Evans <devans@casey.cygnus.com>
2342 * utils.scm (bit-set?): Fix off by one error.
2344 * rtl-c.scm (s-sequence): Fix non-void-mode result output.
2346 * rtl.scm (hw): Check for valid hardware element before trying to
2349 * arm.cpu (arm7f cpu): Renamed from arm. All users updated.
2350 * arm7.cpu (bx): Fix name of target address operand in assembler spec.
2351 (*): arm_compute_operand2_foo renamed to compute_operand2_foo.
2352 * thumb.cpu (*): arm_compute_operand2_foo renamed to
2353 compute_operand2_foo.
2355 * cgen-sid.scm (sim_arguments): Add support for building defs.h.
2356 * sid.scm (-hw-gen-set-quiet-pc): Handle #:delay modifier.
2357 Call delayed_branch/branch methods instead of assigning to `vpc'.
2358 (<hw-pc>,cxmake-skip): Call skip method.
2359 (-gen-hw-selector): Call rtl-c++ instead of rtl-c.
2360 (<pc>,cxmake-skip): Ditto.
2361 (-create-virtual-insns!): Ditto.
2362 (op:read): Call estate-make-for-normal-c++ instead of estate-...-c.
2364 (op:record-profile): Specify #:output-language "c++".
2365 * sid-cpu.scm (-gen-insn-attr-decls): Rename @cpu@_insn_attr to
2367 (cgen-desc.h): Use @arch@ namespace instead of @cpu@.
2369 (-gen-reg-access-defns): Use rtl-c++ instead of rtl-c.
2370 (gen-semantic-code): Ditto.
2371 (-gen-sem-case,-gen-sfrag-code): Ditto.
2372 (-gen-hardware-types): Delete class @cpu@_cpu_base.
2373 (cgen-cpu.h): File is now #included by main cpu class, rather than
2375 (cgen-defs.h): New proc.
2376 (-gen-scache-semantic-fn): Change result type to sem_status.
2377 New local `status'. Call done_cti_insn/done_insn method at end.
2378 (cgen-semantics.cxx): Include @cpu@.h instead of @arch@-main.h,
2380 (cgen-sem-switch.cxx): Ditto.
2381 * sid-decode.scm (-gen-idesc-decls): Update return type of
2383 (cgen-decode.h): Add using namespace @arch@.
2384 (cgen-decode.cxx): Include @cpu@.h instead of @arch@-main.h.
2386 * rtl-c.scm (<rtl-c-eval-state>): New member output-language.
2387 (estate-output-language-c?,estate-output-language-c++?): New procs.
2388 (<rtl-c-eval-state>,vmake!): Handle #:output-language.
2389 (estate-make-for-normal-rtl-c++): New proc.
2390 (rtl-c++-parsed,rtl-c++): New proc.
2391 (s-c-call): Invoke cpu class method if c++.
2392 (join): Use s-c-raw-call.
2394 * rtl-c.scm (subword): Don't pass current_cpu to SUBWORD.
2397 * rtl-c.scm (delay): Mark the sequence as #:delay'd.
2398 * rtl.scm (<eval-state>): New member `modifiers'.
2399 (<eval-state>,vmake!): Handle #:modifiers.
2400 (estate-with-modifiers): New proc.
2402 * rtl.scm (rtx-side-effects?): New proc.
2403 (rtx-canonical-bool): Don't change expr if it has side effects.
2404 * semantics.scm (-simplify-expr-fn): Handle exprs with side-effects
2407 1999-09-23 Doug Evans <devans@casey.cygnus.com>
2409 * sim.scm (gen-scache-type): Fix typo in last patch.
2411 Tue Sep 21 17:12:55 1999 Dave Brolley <brolley@cygnus.com>
2413 * sim.scm (gen-scache-type): Add last_insn_p flag for parallel support.
2415 1999-09-05 Doug Evans <devans@casey.cygnus.com>
2417 * sid.scm (<hw-pc>,cxmake-skip): New method.
2418 (<pc>,cxmake-skip): New method.
2420 * decode.scm (decode-build-table): Delete args startbit,index-list.
2421 All callers updated.
2422 * utils-sim.scm (gen-decoder): Delete args startbit,index-list.
2423 All callers updated.
2424 * sim-decode.scm (-gen-decode-fn): Always pass 0 for startbit
2425 to decode-get-best-bits.
2426 * sid-decode.scm (-gen-decode-fn): Ditto.
2428 * hardware.scm (hw-bits): New proc.
2429 (-hw-parse): New arg layout. All callers updated.
2430 (define-full-hardware): New arg layout. All callers updated.
2431 (-hw-validate-layout): New proc.
2432 (-hw-create-[gs]etter-from-layout): New procs.
2433 (<hw-register>,parse!): Handle layout spec.
2434 * types.scm (type-bits): New proc.
2436 * sem-frags.scm (-frag-cost-compute!): Fix calculation of
2437 UNARY, BINARY, TRINARY rtxs.
2439 * attr.scm (<enum-attribute>,parse-value): Allow strings.
2440 * enum.scm (parse-enum-vals): Use reverse! instead of reverse.
2441 Support '- as "unused spot" indicator.
2443 1999-09-03 Doug Evans <devans@casey.cygnus.com>
2445 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Fix typo.
2447 1999-09-02 Doug Evans <devans@casey.cygnus.com>
2449 * rtx-funcs.scm (subword): Fix mode spec of `value'.
2451 * rtl.scm (-rtx-traverse-operands): Fix debugging message
2453 (tstate-make): New arg `depth'. All callers updated.
2454 (tstate-depth,tstate-set-depth!): New procs.
2455 (tstate-incr-depth!,tstate-decr-depth!): New procs.
2456 (-rtx-traverse-operands): Indent debugging output by traversal depth.
2457 (-rtx-traverse): Ditto. Keep track of traversal depth.
2459 1999-09-01 Doug Evans <devans@casey.cygnus.com>
2461 * sim-decode.scm (-gen-decoder+supporting cast): Move to utils-sim.scm.
2462 * sid-decode.scm (-gen-decoder+supporting cast): Ditto.
2463 * utils-sim.scm: Decoder generator support moved here.
2464 (-decode-equiv-entries?,-decode-sort-entries): New procs.
2465 (-gen-decoder-switch): Sort entries for more fall-throughs.
2467 * Makefile.am (gas-test,sim-test): Specify ISA when invoking cgen.
2468 * Makefile.in: Rebuild.
2469 * sim-test.scm (build-sim-testcase): Add logging message.
2470 * dev.scm (cload): Recognize SIM-TEST application.
2471 (load-stest): Set APPLICATION to SIM-TEST.
2473 * desc-cpu.scm (-gen-hash-defines): Add \n to output.
2475 * ifield.scm (-ifield-parse): Allow bit numbers up to 127.
2476 * mach.scm (-isa-parse): Allow insn bitsizes from 8 to 128.
2477 * mode.scm (mode-make-int,mode-make-uint): Allow values up to 64 bits.
2479 * insn.scm (syntax-break-out): Handle ${foo}.
2481 Sun Aug 29 11:11:15 1999 Doug Evans <devans@canuck.cygnus.com>
2483 * Makefile.am (noinst_PROGRAMS,noinst_LIBRARIES): Delete.
2484 (bin_PROGRAMS): Define.
2485 (CGEN_HOB_INPUT_FILES): Remove $(srcdir)/.
2486 (cgen-hob.c): Prepend $(srcdir)/ here.
2487 (APPDESCFILES,OPCODESFILES,SIMFILES,pkgdata_SCRIPTS): Define.
2488 (libcpu_a_SOURCES): Delete.
2489 (cgen_DEPENDENCIES,cgen_LDADD): Rewrite.
2490 (CGEN_HOB_OBJ,CGENOBJS): New variables.
2491 * configure.in (LIBS): Replace -Wl,-rpath with -R.
2492 Add AC_CHECK_LIB(guile,main).
2493 * Makefile.in: Rebuild.
2494 * doc/Makefile.in: Rebuild.
2495 * aclocal.m4: Rebuild.
2496 * config.in: Rebuild.
2497 * configure: Rebuild.
2499 1999-08-28 Doug Evans <devans@casey.cygnus.com>
2501 Rename rtx functions from name: to name, accept optional leading
2503 VM -> VOID, DM -> DFLT, use DFLT instead of VM for default mode.
2504 * attr.scm (-attr-eval): Update.
2505 * hardware.scm (hw-mode-ok?): Rename arg mode to new-mode-name.
2506 (<hw-register>,mode-ok?): Disallow VOID.
2507 (<hw-immediate>,mode-ok?): Disallow VOID.
2508 (<hw-address>,mode-ok?): Disallow VOID.
2509 * mode.scm (mode-name?): New proc.
2510 (VOID): Renamed from VM.
2511 (DFLT): Renamed from DM.
2512 (mode-builtin!): Update.
2513 * opcodes.scm (<ifield>,gen-insert): Update.
2514 (<ifield>,gen-extract): Update.
2515 (<multi-ifield>,gen-insert,gen-extract): Update.
2516 * operand.scm (op:mode): Update.
2517 (<pc>,make!): Update.
2518 (op:new-mode): Update.
2519 (-operand-read): Update.
2520 * rtl.scm (-rtx-valid-types): Add OPTIONS, EXPLNUMMODE,
2521 NONVOIDMODE, DFLTMODE. Rename VMMODE to VOIDMODE.
2522 (def-rtx-dual-mode,define-rtx-dual-mode): Delete.
2523 (-rtx-lazy-sem-mode): Renamed from -rtx-mode. All callers updated.
2524 (rtx-make): Call -rtx-munge-mode&options.
2525 (rtx accessors): Rewrite.
2526 (rtx-pretty-name): Update.
2527 (-rtx-traverse-*): Update.
2528 (-rtx-traverse-explnummode,-rtx-traverse-nonvoidmode): New procs.
2529 (-rtx-traverse-voidmode,-rtx-traverse-dfltmode): New procs.
2530 (-rtx-make-traverse-table): Update.
2531 (-rtx-traverse-operands): Update.
2532 (-rtx-option?,-rtx-option-list?): New procs.
2533 (-rtx-munge-mode&options): New proc.
2534 (-rtx-traverse-expr): Call -rtx-munge-mode&options.
2535 (-rtx-traverse): Update.
2536 (rtx-traverse,rtx-traverse-with-locals,rtx-compile): Update.
2537 (rtx-compile-time-constant?): Update.
2538 (rtx-true?,rtx-false?,rtx-true,rtx-false): Update.
2539 (rtx-value): Update.
2540 (hw,reg,mem): Renamed from foo:. Update. All callers updated.
2541 * rtx-funcs.scm (*): Update.
2542 * rtl-c.scm (rtl-c-get): Update.
2543 (rtl-c-set-quiet,rtl-c-set-trace): Update.
2544 (s-c-call,s-c-raw-call): Update.
2545 (s-boolifop,s-convop,s-if,s-cond): Update.
2546 (s-case-vm,-gen-non-vm-case-test,s-case): Update.
2547 (-par-replace-set-dests,-par-replace-set-srcs): Update.
2548 (s-parallel,s-sequence): Update.
2549 (rtl-c-build-table): Update.
2550 * sem-frags.scm (-frag-hash-compute!): Update.
2551 (-frag-cost-compute!): Improperly handle unary,binary,trinary ops
2552 for temporary bug compatibility with previous version.
2553 (-frag-expr-locals,-frag-expr-stmts): Update.
2554 (-frag-compute-desired-frags,-frag-pick-best): Update.
2555 * semantics.scm (-simplify-expr-fn): Update.
2556 (rtx-simplify): Update.
2557 (-rtx-ref-type): Update. Account for modifiers.
2558 (-build-operand!,-build-reg-operand!,-build-mem-operand!): Update.
2559 (-build-ifield-operand!): Update.
2560 (-build-known-values): Update.
2561 (semantic-compile): Update.
2562 (-gen-reg-access-defns): Update.
2563 (gen-semantic-code,-gen-sem-case): Update.
2564 (-gen-sfrag-code,-gen-sfrag-case): Update.
2565 * sim-cpu (gen-semantic-code): Update.
2566 * sim.scm (<hw-pc>,gen-write,cxmake-skip): Update.
2567 (<hw-register>,gen-write,gen-set-macro,cxmake-get-raw): Update.
2568 (-hw-cxmake-get): Update.
2569 (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
2570 (<hw-index>,cxmake-get): Update.
2571 (<operand>,gen-type,gen-read,cxmake-get): Update.
2572 (<operand>,gen-set-quiet,gen-set-trace): Update.
2573 (<pc>,cxmake-get): Update.
2574 (sim-finish!): Update.
2575 * utils-gen.scm (-gen-ifld-extract-base): Update.
2576 (-gen-ifld-extract-beyond): Update.
2577 (gen-multi-ifld-extract): Update.
2578 * sid-decode.scm (-decode-expr-ifield-values-used): Update.
2579 * sid.scm (<hw-pc>,gen-write): Update.
2580 (-gen-decode-insn-globals): Update.
2581 (-hw-cxmake-get): Update.
2582 (<hw-register>,cxmake-get-raw): Update.
2583 (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
2584 (<hw-index>,cxmake-get): Update.
2585 (<operand>,gen-type,gen-read,cxmake-get): Update.
2586 (<operand>,gen-set-quiet,gen-set-trace): Update.
2587 (<pc>,cxmake-get): Update.
2588 (-create-virtual-insns!): Update.
2589 (-decode-split-build-assertion): Update.
2591 * simplify.inc: Update.
2593 1999-08-20 Doug Evans <devans@casey.cygnus.com>
2595 * sim.scm (-op-gen-queued-write): Fix memory address calculation.
2596 Prefix queue function name with sim_ instead of @cpu@_.
2598 * sim.scm (-with-parallel-only?): New global.
2599 (option-init!): Initialize it.
2600 (option-set!): Set it.
2601 (with-parallel-only?): New proc.
2602 * sim-decode.scm (-gen-decode-insn-globals): Don't include parallel
2603 and writeback markers if with-parallel-only.
2604 (-gen-idesc-init-fn): Update.
2605 * sim-cpu.scm (cgen-cpu.h): Don't generate struct parexec if
2608 Wed Aug 18 15:04:30 1999 Doug Evans <devans@canuck.cygnus.com>
2610 * sim-cpu.scm (-gen-semantic-fn-table): Handle unsupported insns
2611 with the invalid insn handler.
2613 * utils.scm (list-maybe-ref): New proc.
2615 * mach.scm (-isa-parse): Signal error if isa wasn't specified in
2617 (-mach-parse): Signal error if mach wasn't specified in define-arch.
2619 * i960.cpu (test*-*): Delete `expr' arg.
2620 (test-op,branch-op): Update.
2622 1999-08-09 Doug Evans <devans@casey.cygnus.com>
2624 * sim.scm (gen-reg-getter-fn,gen-reg-setter-fn): New procs.
2625 (gen-reg-access-decl): Replace `name' arg with `hw'. All callers
2627 (gen-reg-access-defn): Ditto.
2628 (-gen-hw-addr): Rewrite.
2629 (-op-gen-queued-write): Rewrite.
2630 * sim-cpu.scm (-gen-cpu-reg-access-decls):
2631 (-gen-scache-semantic-fn): Handle with-generic-write.
2632 (-gen-no-scache-semantic-fn): Ditto.
2634 1999-08-08 Doug Evans <devans@casey.cygnus.com>
2636 * utils-gen.scm (gen-define-ifmt-ifields): Tweak output.
2638 * sim.scm (-with-generic-write?): New global.
2639 (option-init!): Initialize it.
2640 (option-set!): Set it.
2641 (with-generic-write?): New proc.
2642 (-gen-hw-addr): New proc.
2643 (-op-gen-queued-write): New proc.
2644 (-op-gen-set-{quiet,trace}-parallel): Use it if with-generic-write?.
2646 * sim-cpu.scm (-gen-hardware-types): Output code with parallel support
2648 (-gen-sem-switch): Preserve existing with-parallel? value.
2649 (-gen-sem-parallel-switch): Ditto.
2650 (-gen-write-case): Add /indent support.
2651 (cgen-write.c): Rewrite.
2653 * utils.scm (-current-print-state): New global.
2654 (make-print-state): New proc.
2655 (pstate-indent,pstate-set-indent!): New procs.
2656 (pstate-cmd?,pstate-cmd-do): New procs.
2657 (/indent): New global.
2658 (/indent-set,/indent-add): New procs.
2659 (string-write): Set -current-print-state.
2660 (-string-write): New arg pstate, all callers updated.
2661 Handle print-state commands.
2662 (-string-list-flatten): New proc.
2663 (string-list->string): Use it.
2665 * sim-cpu.scm (-gen-sem-fn-name): Move here from sim-decode.scm.
2666 (-gen-sem-fn-table-entry): New proc.
2667 (-gen-semantic-fn-table): New proc.
2668 (-gen-scache-semantic-fn): Make fn static.
2669 (-gen-no-scache-semantic-fn): Ditto.
2670 (cgen-semantics.c): Define macro SEM_FN_NAME.
2671 * sim-decode.scm (-gen-decode-insn-globals): Delete FMT,TYPE,IDX,
2672 FAST,FULL. Update @cpu@_insn_sem contents.
2673 (-gen-semf-fn-name): Delete.
2674 (-gen-sem-fn-decls): Delete.
2675 (-gen-idesc-decls): Output prototypes of @cpu@_sem_init_idesc_table,
2676 @cpu@_semf_init_idesc_table.
2677 (-gen-idesc-init-fn): Update. Don't initialize pointers to semantic
2679 (cgen-decode.h): Print sfmt enum.
2680 * sid-decode.scm (-gen-semf-fn-name): Delete.
2681 * utils-gen.scm (gen-sfmt-enum-decl): New proc.
2683 * iformat.scm (sfmt-build): Rename sformats from fmt-foo to sfmt-foo.
2684 (ifmt-compute!): Ditto.
2685 * sim-decode.scm (-gen-decoder-switch): Ditto.
2686 * sid-decode.scm (-gen-decode-expr-entry): Ditto.
2687 (-gen-decoder-switch): Ditto.
2689 * insn.scm (insn-virtual?): New proc.
2691 * enum.scm (gen-enum-decl): Speed up, build string as list and then
2693 * mach.scm (<arch>): attr-list is now a pair of lists.
2694 (current-attr-list): Rewrite.
2695 (current-attr-add!,current-attr-lookup): Rewrite.
2696 * sim.scm (gen-cpu-insn-enum-decl): Replace append with append!.
2698 1999-08-06 Richard Henderson <rth@cygnus.com>
2700 * ia64.cpu: Initial checkpoint.
2702 1999-08-06 Doug Evans <devans@casey.cygnus.com>
2704 * pmacros.scm (-pmacro-apply): Fix definition, takes only 1 arg.
2705 (pmacros-init!): Update .apply help string.
2707 1999-08-03 Doug Evans <devans@casey.cygnus.com>
2709 * sim.scm (-hw-gen-set-quiet-pc): Update call to SEM_BRANCH_VIA_CACHE.
2710 (<hw-pc>,cxmake-skip): New method.
2711 (<pc>,cxmake-skip): New method.
2712 (-gen-argbuf-fields-union): Add branch_target to `chain' member.
2713 (gen-argbuf-type): New member `skip_count'.
2714 (sim-finish!): Update calls to @cpu@_pbb_cti_chain.
2715 * utils-cgen.scm (atlist-cti?): Don't include SKIP-CTI insns.
2717 * utils-sim.scm: New file.
2718 * dev.scm (load-sim): Load it.
2719 (load-sid): Load it.
2720 * cgen-sid.scm: Load it.
2721 * cgen-sim.scm: Load it.
2722 * iformat.scm (<sformat>): New member sbuf, not initialized by
2724 * rtx-funcs.scm (skip): Rewrite.
2725 * rtl-c.scm (skip): Rewrite.
2726 * m32r.cpu (sc,snc): Update `skip' usage.
2727 * mode.scm (mode-real-mode): New proc.
2728 * sem-frags.scm (-frag-split-by-sbuf): Rename from -frag-split-by-sfmt.
2729 Distinguish fragments by the <sformat-abuf> they use.
2730 * sim.scm (gen-profile-index-type): Delete.
2731 (ifield argbuf support): Move to utils-sim.scm and sim-decode.scm.
2732 (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
2733 (hardware argbuf support): Move to utils-sim.scm and sim-decode.scm.
2734 (operand argbuf support): Move to utils-sim.scm and sim-decode.scm.
2735 (-gen-argbuf-elm): Rewrite.
2736 (-gen-argbuf-hw-elm): Delete.
2737 (-gen-argbuf-fields-union): Generate structs for each sbuf instead
2739 (-sim-sformat-argbuf-list,-sim-insns-analyzed?): New globals.
2740 (sim-init!): Initialize them.
2741 (sim-analyze-insns!): Set them.
2742 (current-sbuf-list): New proc.
2743 * sim-cpu.scm (-gen-no-scache-semantic-fn): Update calls to
2744 gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns.
2745 * sim-model.scm (-gen-model-insn-fn): Ditto.
2746 * sim-decode.scm (-gen-extract-decls): Delete.
2747 (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
2748 (<hardware-base>,gen-extract,gen-trace-extract): Move here from
2750 (<hw-register,gen-extract,gen-trace-extract): Ditto.
2751 (<hw-address,gen-extract,gen-trace-extract): Ditto.
2752 (-gen-op-extract,-gen-op-trace-extract): New procs.
2753 (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
2754 gen-sfmt-argvars-foo and rewrite.
2755 (-gen-record-args): Rewrite.
2756 (-gen-extract-case): Tweak.
2757 * sid.scm (gen-profile-index-type): Delete.
2758 (ifield argbuf support): Move to utils-sim.scm.
2759 (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
2760 (hardware argbuf support): Move to utils-sim.scm and sid-decode.scm.
2761 (operand argbuf support): Move to utils-sim.scm and sid-decode.scm.
2762 (-sim-sformat-argbuf-list): New global.
2763 (sim-init!): Initialize it.
2764 (sim-analyze-insns!): Set it.
2765 (current-sbuf-list): New proc.
2766 * sid-decode.scm (-gen-argbuf-elm): Rewrite.
2767 (-gen-argbuf-hw-elm): Delete.
2768 (-gen-argbuf-fields-union): Generate structs for each sbuf instead
2770 (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
2771 (-gen-extract-decls): Delete.
2772 (<hardware-base>,gen-extract,gen-trace-extract): Move here from
2774 (<hw-register,gen-extract,gen-trace-extract): Ditto.
2775 (<hw-address,gen-extract,gen-trace-extract): Ditto.
2776 (-gen-op-extract,-gen-op-trace-extract): New procs.
2777 (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
2778 gen-sfmt-argvars-foo and rewrite.
2779 (-gen-record-args): Rewrite.
2780 (-gen-extract-case): Tweak.
2782 * cgen-gh.c (gh_putc,gh_puts): New functions.
2783 * cgen-gh.h (gh_putc,gh_puts): Declare them.
2784 * cos.c (_object_print_elms,_object_print): Use them.
2785 * hob-sup.c (fastcall_print): Use them.
2786 * configure.in: Check for scm_gen_puts, scm_puts.
2787 * config.in: Rebuild.
2788 * configure: Rebuild.
2789 * aclocal.m4: Rebuild.
2790 * Makefile.in: Rebuild.
2792 * dev.scm (load-opc): Use load instead of maybe-load.
2793 (load-gtest,load-sim,load-stest): Ditto.
2796 1999-07-23 Doug Evans <devans@casey.cygnus.com>
2798 * sid-cpu.scm (-gen-sem-switch-engine): Move definition of `count'
2799 up to avoid g++ 'goto crosses initialization' warning.
2800 (-gen-sfrag-engine-fn): Delete vpc arg to NEXT_FRAG.
2801 (-gen-sfrag-case): Update use of NEXT_FRAG.
2803 1999-07-22 Doug Evans <devans@casey.cygnus.com>
2805 * cos.c (cos_init): Protect _make_x_symbol from garbage collection.
2807 * read.scm: Load sem-frags.scm.
2808 * sem-frags.scm (*): Lots rewritten.
2809 * sid.scm (-with-sem-frags?): New global
2810 (with-sem-frags?): New proc.
2811 (option-init!): Initialize -with-sem-frags?.
2812 (option-set!): Recognize with-sem-frags.
2813 (sim-init!): Call sim-sfrag-init! if with-sem-frags.
2814 * sid-cpu.scm (cgen-sem-switch.cxx): Generate semantic frag version
2816 (-gen-sfrag-engine-decls): New proc.
2817 (-gen-sfrag-code,-gen-sfrag-case,-gen-sfrag-enum-decl): New procs.
2818 (-gen-sfrag-engine-frag-table,-gen-sfrag-engine-fn): New procs.
2819 (-gen-sfrag-engine): New proc.
2820 (-gen-sem-case): Emit setup-semantics if specified.
2821 (-gen-sem-switch-engine): Update init/use of computed goto label.
2822 * sid-decode.scm (-gen-decode-expr-entry): Fetch ifield values
2824 (-gen-idesc-decls): Replace sem_address with cgoto.
2825 (-gen-scache-decls): Rewrite definition of `execute' member.
2826 * arm.cpu (arm isa): Enable decode-splits.
2827 * arm7.cpu (multiply insns): Rename result to mul-result.
2829 Rename decode-specialize to decode-split.
2830 * decode.scm (*): Update.
2831 * insn.scm (*): Update.
2832 * mach.scm (*): Update.
2833 * sid.scm (*): Update.
2835 1999-07-19 Doug Evans <devans@casey.cygnus.com>
2837 Record objects as a smob.
2838 * cos.c (scm_tc16_object): New static global.
2839 (cos_init): Initialize it.
2840 (OBJECT_P,OBJECT_ELEMENTS,OBJECT_CLASS_DESC): Update macros.
2841 (OBJECT_CLASS,OBJECT_ELEMENT_OFFSET): Update.
2842 (_object_tag): Delete.
2843 (_object_make_smob): New function.
2844 (_object_make_x,_object_make_with_values_x): Rewrite.
2845 (_object_elements,_object_class_desc): Rewrite.
2846 (_object_copy,object_p): Rewrite.
2847 (_object_specialize): Rewrite.
2848 (_object_print_elms,_object_print): New functions.
2849 (object_smob): New static global.
2850 (default_make_x): Use OBJECT_ELEMENT_OFFSET instead of magic number.
2852 * cos.c (_make_x_symbol): New static global.
2853 (object_make): Use it.
2854 (cos_init): Initialize it.
2856 1999-07-15 Doug Evans <devans@casey.cygnus.com>
2858 * rtl-c.scm (ifield): Back out last patch, use estate-ifield-var?
2859 instead to determine whether to use FLD macro.
2860 (<rtl-c-eval-state>): New member ifield-var?.
2861 (<rtl-c-eval-state>,vmake!): Recognize #:ifield-var?.
2862 * utils-gen.scm (-gen-ifld-extract-base): Specify #:ifield-var? #f.
2863 (-gen-ifld-extract-beyond,gen-multi-ifld-extract): Ditto.
2865 * rtl.scm (rtx-sequence-assq-locals): New proc.
2867 * cos.scm (-object-error): Don't crash on non-objects.
2869 * Makefile.am (CLEANFILES): Add hobbit.
2870 * Makefile.in: Rebuild.
2872 * rtl-c.scm (s-c-call): Delete unnecessary code.
2874 1999-07-14 Doug Evans <devans@casey.cygnus.com>
2876 * rtl-c.scm (ifield): Always reference value via `FLD'.
2878 * cos.c (elm_bound_p): Return problem SCM boolean values.
2880 * utils-cgen.scm (display-argv): New proc.
2881 * cgen-opc.scm (cgen): Call it.
2882 * cgen-sim.scm (cgen): Ditto.
2883 * cgen-gas.scm (cgen): Ditto.
2884 * cgen-stest.scm (cgen): Ditto.
2885 * cgen-sid.scm (cgen): Ditto.
2887 1999-07-05 Doug Evans <devans@casey.cygnus.com>
2889 * opc-asmdis.scm (-gen-parse-switch): New local var `junk'.
2890 * opc-ibld.scm (-gen-insert-switch): Initialize result to NULL.
2891 (-gen-extract-switch): Initialize result to 1.
2892 * opcodes.scm (gen-ifield-default-type): New proc.
2893 (gen-ifield-value-decl): Renamed from gen-ifield-type. All callers
2895 (<hw-index>,gen-insert): Handle non-ifield indices.
2896 (<hw-index>,gen-extract): Ditto.
2897 (<hw-asm>,gen-parse): Ditto.
2898 (<hw-asm>,gen-print): Ditto.
2899 (<keyword>,gen-parse): Ditto.
2900 (<keyword>,gen-print): Ditto.
2901 (<operand>,gen-fget): Ditto.
2902 (<operand>,gen-fset): Ditto.
2904 * sim.scm (-gen-hw-index-raw): Handle scalar indices.
2905 (-gen-hw-index): Ditto.
2906 * sid.scm (-gen-hw-index-raw): Handle scalar indices.
2907 (-gen-hw-index): Ditto.
2909 * sem-frags.scm: New file.
2911 * attr.scm (attr-parse): Add better checking of input.
2913 * hardware.scm (-hw-parse-getter): Renamed from -hw-parse-get.
2915 (-hw-parse-setter): Renamed from -hw-parse-set. All uses updated.
2917 * ifield.scm (ifld-nil?): New proc.
2919 * operand.scm (<operand>): New members getter,setter.
2920 (<operand>,make!): New args getter,setter. All uses updated.
2921 (op:getter,op:setter): New procs.
2922 (<hw-index>,field-start): Return 0 for non-ifield indices.
2923 (<hw-index>,field-length): Return 0 for non-ifield indices.
2924 (-operand-parse-getter,-operand-parse-setter): New procs.
2925 (-operand-parse): New args getter,setter. All callers updated.
2926 Always use hw-index-scalar for scalar operands.
2927 (-operand-read): Handle getter,setter.
2928 (define-full-operand): New args getter,setter. All uses updated.
2929 * semantics.scm (-build-ifield-operand!): Update.
2930 (-build-index-of-operand!): Update.
2931 * sim.scm (<operand>,cxmake-get): If operand has getter, use it.
2932 * simplify.inc (define-normal-operand): Update.
2934 * rtl.scm (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
2935 * rtl-c.scm (s-unop): Indirect fp ops through fpu op vector.
2936 (s-binop,s-cmpop,s-convop): Ditto.
2937 (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
2938 * sparc.cpu (insn-fmt2): Add FPOPS1,FPOPS2.
2939 (fcc-tests): New insn-enum.
2940 (fcc-value): Rename from fcc-type.
2941 * sparcfpu.cpu: New file. All fp support moved here.
2943 * rtl.scm (<rtx-func>): New member class.
2944 (rtx-class-*?): New procs.
2945 (def-rtx-node): New arg class. All callers updated.
2946 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-dual-node): Ditto.
2947 * rtx-funcs.scm (*): Specify class.
2949 * utils-cgen.scm (context-make-reader): New proc.
2951 * utils.scm (assert-fail-msg): New variable.
2953 (list-drop,list-tail-drop): New procs.
2955 1999-06-22 Doug Evans <devans@casey.cygnus.com>
2957 * desc-cpu.scm (-gen-hash-defines): Restore generation of
2958 CGEN_MIN_INSN_SIZE deleted on March 22.
2960 * ifield.scm (<ifield>,needed-iflds): New method.
2961 (<multi-ifield>,needed-iflds): New method.
2962 (ifld-needed-iflds): New proc.
2963 (multi-ifield?): New proc.
2964 * iformat.scm (<sfmt>): Delete member ifmt. New members length,iflds.
2965 (-sfmt-search-key): Include insn length in key.
2966 (-sfmt-order-iflds,-sfmt-used-iflds): New procs.
2967 (<fmt-desc>): Delete members ifmt-key,sfmt-key. New member used-iflds.
2968 (-ifmt-lookup-ifmt!): Compute key here.
2969 (-ifmt-lookup-sfmt!): Compute key here. Delete arg ifmt.
2970 All callers updated.
2971 (ifmt-build): Delete arg desc. New args search-key,iflds.
2972 All callers updated.
2973 (sfmt-build): Delete args desc,ifmt. New args search-key,cti?,
2974 in-ops,out-ops,sorted-used-iflds. All callers updated.
2975 * minsn.scm (minsn-make-alias): Use insn-set-ifmt!. Update call
2977 * operand.scm (op-iflds-used): New proc.
2978 * utils-gen.scm (gen-ifld-type): Move here from sim.scm
2980 And from sid.scm,sid-cpu.scm as well.
2981 (gen-ifld-extract-decl,-gen-ifld-extract-base): Ditto.
2982 (-gen-extract-word,-gen-ifld-extract-beyond): Ditto.
2983 (gen-ifld-extract,gen-multi-ifld-extract): Ditto.
2984 (gen-extracted-ifld-value): Ditto.
2985 (-extract-chunk-specs): Ditto.
2986 (gen-define-ifields,gen-define-ifmt-ifields): Ditto.
2987 (-extract-chunk,-gen-extract-beyond-var-list): Ditto.
2988 (gen-extract-ifields,gen-extract-ifmt-ifields): Ditto.
2989 (-extract-insert-subfields): New function.
2990 * sim.scm (gen-record-argbuf-ifld): Renamed from gen-ifld-extract.
2991 (gen-record-argvar-ifld): Renamed from gen-ifld-extract-argvar.
2992 * sim-cpu.scm (-gen-extract-ifmt-macro): Replace calls to
2993 gen-define-ifields with gen-define-ifmt-ifields. Ditto for
2995 (-gen-no-scache-semantic-fn): Ditto.
2996 (-gen-sem-case): Ditto.
2997 (-gen-read-case): Update calls to gen-define-ifields,
2998 gen-extract-ifields.
2999 * sim-decode.scm (-gen-record-args): Update.
3000 (-gen-sfmt-argvars-assigns): Update.
3001 (-gen-extract-case): Update.
3002 * sim-model.scm (-gen-model-insn-fn): Replace calls to
3003 gen-define-ifields with gen-define-ifmt-ifields. Ditto for
3005 * sid.scm (gen-ifld-argbuf-defn): Use gen-ifld-type.
3006 (gen-record-argbuf-ifld): Rename from gen-ifld-extract.
3007 (gen-record-argvar-ifld): Rename from gen-ifld-extract-argvar.
3008 * sid-decode.scm (-gen-decode-expr-entry): Update calls to
3009 gen-define-ifields, gen-extract-ifields.
3010 (-gen-record-args): Update.
3011 (gen-sfmt-argvars-assigns): Update.
3012 (-gen-extract-case): Replace calls to gen-define-ifmt-ifields
3013 with gen-define-ifields. Ditto for gen-extract-foo.
3014 (-gen-decode-fn): Use gen-ifld-extract-decl/gen-ifld-extract
3015 procs rather than method calls.
3017 1999-06-18 Doug Evans <devans@casey.cygnus.com>
3019 * sid.scm (-create-virtual-insns!): New local `context', pass it
3022 * rtl.scm (-rtx-traverse): Output symbol shortcuts in source form,
3023 (operand name) not (operand object), (local name) not (local object).
3024 (rtx-traverse-with-locals): New proc.
3025 (-compile-expr-fn): New proc.
3026 (rtx-compile): Rewrite.
3027 * rtl-c.scm (rtl-c-get): Handle operand/local names for src arg.
3028 (rtl-c-set-quiet): Don't accept operand/local names for dest arg.
3029 (rtl-c-set-trace): Ditto.
3030 (operand define-fn): Recognize operand name argument.
3031 (local define-fn): Recognize sequence temp name argument.
3032 * rtx-funcs.scm (operand): Argument is operand name, not object,
3033 so call current-op-lookup.
3034 (local): Similarily, so call rtx-temp-lookup.
3036 * rtl.scm (rtx-field?): Use rtx-name instead of car.
3037 (rtx-operand?): Ditto.
3038 (rtx-pretty-name): Ditto.
3039 (rtx-local-obj): Flag symbol argument as an error.
3040 (rtx-local-name): New proc.
3041 (rtx-sequence-locals,rtx-sequence-exprs): New procs.
3043 * rtl.scm (-rtx-traverse-operands): Fix debugging output of arg-types.
3045 * read.scm (debug-repl): Renamed from -debug-repl. All callers
3048 * arm7.cpu (do-word/byte-store): Use (trunc: QI rd) rather than
3051 * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall4, fastcall6.
3052 (*floats-s->c-fun-table*): Ditto.
3053 * hobbit.c,hobbit.h: Rebuild.
3054 * rtl.scm (-rtx-traverse-expr): Use fastcall6.
3055 * semantics.scm (rtx-simplify): Use /fastcall-make.
3057 * iformat.scm (-sfmt-search-key): Don't include memory modes.
3059 * insn.scm (<insn>): Delete members condition, compiled-condition.
3060 (<insn>,make!): Update
3061 (<insn> getters,setters): Update.
3062 (-insn-parse,insn-read,define-full-insn): Update.
3063 * minsn.scm (minsn-make-alias): Update.
3064 * iformat.scm (ifmt-analyze): Delete insn-condition reference.
3065 (ifmt-compute!): Ditto.
3066 * sim.scm (sim-finish!): Update.
3067 * simplify.inc: (define-normal-insn): Update.
3068 * sid-cpu.scm (gen-semantic-code): Update.
3070 * iformat.scm (-ifmt-lookup-ifmt!): Use insn-set-ifmt!.
3071 (-ifmt-lookup-sfmt!): Use insn-set-sfmt!.
3072 (ifmt-compute!): Ditto.
3074 1999-06-16 Doug Evans <devans@casey.cygnus.com>
3076 * minsn.scm (minsn-compute-iflds): Print better error message for
3079 1999-06-12 Doug Evans <devans@casey.cygnus.com>
3081 * rtl.scm (tstate->estate): Don't copy over expr-fn.
3083 * Makefile.am (HOBFLAGS): New variable.
3084 (cgen-hob.c): Use it.
3086 (libcpu_a_SOURCES): Add hob-sup.c.
3087 (hob-sup.o): New rule.
3088 * Makefile.in: Rebuild.
3089 * cgen.c: #include hob-sup.h.
3090 (cgen_init_c): Call hobbit_init_support.
3091 * hobbit.scm (*fastcall-make*,*c-symbol*): New variables.
3092 (*special-scm->c-functions*): Add them.
3093 (display-c-expression): Handle *c-symbol*.
3094 (*reckless-s->c-fun-table*): Add *fastcall-make*, fastcall5.
3095 (*floats-s->c-fun-table*): Ditto.
3096 (normalize): Recognize /fastcall-make.
3097 (normalize-fastcall-make): New proc.
3098 * hobbit.c,hobbit.h: Rebuild.
3099 * hob-sup.scm: New file.
3100 * hob-sup.c: New file.
3101 * hob-sup.h: New file.
3102 * read.scm: Load hob-sup.scm.
3103 * rtl.scm (-rtx-name-list): New variable.
3104 (rtx-name-list): New proc.
3105 (rtx-lookup): Try symbol first.
3106 (def-rtx-node): Add name to -rtx-name-list.
3107 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
3108 (-rtx-traverse-anymode): New proc.
3109 (-rtx-traverse-{emode,intmode,floatmode,nummode,vmmode}): New procs.
3110 (-rtx-traverse-{rtx,setrtx,testrtx,condrtx,casertx}): New procs.
3111 (-rtx-traverse-{locals,env,attrs,symbol,string,number}): New procs.
3112 (-rtx-traverse-{symornum,object}): New procs.
3113 (-rtx-make-traverse-table): Rewrite.
3114 (-rtx-traverse-operands): Rewrite arg-types handling.
3115 Handle #f result of traverser.
3116 (-rtx-traverse): Renamed from -rtx-traverse-normal.
3117 Move debug handling here.
3118 (-rtx-traverse-debug): Delete.
3119 (rtl-finish!): Change -rtx-traverse-table into list of handlers
3121 * semantics.scm (semantic-compile:process-expr!): Fix call to
3123 * utils.scm (map1-improper): New proc.
3125 1999-06-08 Doug Evans <devans@casey.cygnus.com>
3127 * arm.sim (h-tbit): Replace FUN-ACCESS with FUN-SET.
3129 * sid.scm (-hw-cxmake-get): s/FUN-ACCESS/FUN-GET/.
3130 (-hw-gen-set-quiet): s/FUN-ACCESS/FUN-SET/.
3131 (<operand>,cxmake-get): Tweak.
3132 (sim-finish!): Delete FUN-ACCESS attribute. Create FUN-GET,FUN_SET.
3134 1999-06-07 Doug Evans <devans@casey.cygnus.com>
3136 * thumb.cpu (dnti): Delete timing spec.
3139 * arm.cpu (arm isa): New fields condition, setup-semantics.
3140 (thumb isa): New field setup-semantics.
3141 (h-gr): Add attribute CACHE-ADDR.
3142 * arm7.cpu (dnai): Delete condition.
3143 (eval-cond): Delete.
3145 * mach.scm (<isa>): New member setup-semantics.
3146 (-isa-parse-setup-semantics): New proc.
3147 (-isa-parse): New arg setup-semantics.
3148 (-isa-read): Recognize setup-semantics.
3150 * sid-cpu.scm (gen-extract-fields): Split into two:
3151 gen-extract-ifields, gen-extract-ifmt-ifields.
3152 (-gen-scache-semantic-fn): Delete `taken_p'. Delete
3153 tracing begin/end messages (done by caller now).
3154 (-gen-sem-case): Delete `taken_p'. Add npc,br_status. Delete
3155 tracing begin/end messages (done by x-before,x-after virtual insns).
3156 (-gen-sem-switch-engine): Redo vpc initialization. Save vpc at
3157 end so don't have to look it up again next time.
3158 * sid-decode.scm (-decode-expr-ifield-values): New proc.
3159 (-decode-expr-ifield-tracking-key): New proc.
3160 (-decode-expr-ifield-tracking): New proc.
3161 (-decode-expr-ifield-values-used): New proc.
3162 (-decode-expr-ifield-mark-used!): New proc.
3163 (-gen-decode-expr-set-itype): New proc.
3164 (-gen-decode-expr-entry): Rewrite.
3165 (-gen-decode-table-entry): New proc.
3166 (-gen-decoder-switch): Use it.
3167 (-gen-virtual-insn-finder): New proc.
3168 (-gen-argbuf-elm): Move here from sid.scm.
3169 (-gen-argbuf-hw-elm): Ditto.
3170 (-gen-argbuf-fields-union): Add entries for chain,before insns.
3171 (-gen-scache-decls): Add `cond' member to @prefix@_scache for
3172 conditional-execution isas.
3173 (-gen-decode-fn): Record conditional-exec ifield.
3174 * sid.scm (-current-pbb-engine?): New global.
3175 (current-pbb-engine?,set-current-pbb-engine?!): New procs.
3176 (<ifield>,gen-ifld-extract): New arg `indent'.
3177 (<multi-ifield>,gen-ifld-extract): Ditto.
3178 (-hw-gen-set-quiet-pc): Add pbb support. Delete `taken_p'.
3179 (-op-gen-set-trace): Don't print tracing messages for pbb engine.
3180 (-gen-arch-model-decls): Only scan real insns.
3181 (scache-engine-insns,pbb-engine-insns): New procs.
3182 (-create-virtual-insns!): New proc.
3183 (sim-finish!): Call it.
3184 (-decode-specialize-insn?): New proc.
3185 (-decode-specialize-build-assertion): New proc.
3186 (-decode-specialize-insn-1): New proc.
3187 (-decode-specialize-insn): New proc.
3188 (-fill-sim-insn-list!): New proc.
3189 (sim-analyze!): Create copies of insns to be specialized.
3190 * utils-cgen.scm (obj-set-name!): New proc.
3192 * attr.scm (-attr-eval): Rewrite calls to rtx-simplify/rtx-compile.
3193 * iformat.scm (ifmt-analyze): Pass `insn' to semantic-compile,
3195 (ifmt-compute!): Delete arg `arch'. Result is list of iformats,
3197 * mach.scm (arch-analyze-insns!): Update call to ifmt-compute!.
3198 * rtl-c.scm (rtl-c-get): Use DM for default mode instead of VM.
3199 Avoid infinite loop when rtx-eval-with-estate leaves expr alone.
3200 (attr): Rewrite test for insn owner.
3201 (member): New rtx function.
3202 * rtl.scm (rtx-* accessors): Define as cxr directly rather than
3203 as separate function.
3204 (rtx-ifield?,rtx-ifield-name): New procs.
3205 (rtx-operand-obj): Rewrite.
3206 (rtx-operand-name): New proc.
3207 (rtx-cmp-op-mode,rtx-cmp-op-arg): New procs.
3208 (rtx-number-list-values,rtx-member-value,rtx-member-set): New procs.
3209 (tstate-make): New args owner, known. All callers updated.
3210 (tstate-known-lookup): New proc.
3211 (rtx-traverse): New arg owner. All callers updated.
3212 (rtx-make-bool): New proc.
3213 (rtl-find-ifields): Rewrite.
3214 (rtx-simplify,rtx-simplify-eq-attr-{insn,mach}): Moved to ...
3215 * semantics.scm: ... here.
3216 (rtx-const-equal,rtx-const-list-equal): New procs.
3217 (-build-known-values): New proc.
3218 (semantic-compile): New arg `insn'. Call rtx-simplify.
3219 (semantic-attrs): Ditto.
3220 * rtx-funcs.scm (member,number-list): New rtx functions.
3222 * attr.scm (attr-remove-meta-attrs-alist): Delete leading '-' in name.
3223 Rewrite. Delete arg `all-attrs'. All callers updated.
3224 (attr-remove-meta-attrs): Delete leading '-' in name. All callers
3226 * utils-cgen.scm (gen-bool-attrs): Remove meta attrs.
3228 * decode.scm (subdtable-add): Handle `expr' entries.
3229 (exprtable-entry-make): Use vector. Record ifields refered to by expr.
3230 (exprtable-entry-*): Update.
3231 (exprtable-entry-iflds): New proc.
3232 (exprentry-cost): New proc.
3233 (exprtable-sort,-gen-exprtable-name): New procs.
3234 (exprtable-make): New arg `name'. All callers updated. use vector.
3235 (exprtable-*): Update.
3236 (-build-decode-table-entry): Don't issue collision warning if all are
3237 specialized insns. Sort exprtable entries before building table.
3239 * read.scm (-reader-process-expanded-1): Move pretty printing of
3240 input to logging level 4.
3242 * utils.scm (string-list->string): New proc.
3244 * insn.scm (<insn>): Define setters for ifield-assertion, condition,
3246 (insn-read): Delete leading '-' in name. All callers updated.
3247 (real-insn?): New proc.
3248 (real-insns): Rewrite.
3249 (insn-has-ifield?): New proc.
3250 (insn-builtin!): Create insn attribute SPECIALIZED.
3252 * mach.scm (<arch>): Delete member app-data.
3253 (current-raw-insn-list): New proc.
3254 (insn-list-car,insn-list-splice!): New procs.
3255 (<decode-specialize>): New class.
3256 (-isa-parse-decode-specialize): New proc.
3257 (-isa-parse-decode-specializes): New proc.
3258 (<isa>): New members `condition', `decode-specializes'.
3259 (-isa-parse-condition): New proc.
3260 (-isa-parse): New args condition, decode-specializes.
3261 (-isa-read): Recognize condition, decode-specializes.
3262 (-isa-add-decode-specialize!): New proc.
3263 (modify-isa): New proc.
3264 (isa-conditional-exec?,state-conditional-exec?): New procs.
3265 (arch-init!): New reader command `modify-isa'.
3267 * mode.scm (mode-class-signed?,mode-class-unsigned?): New procs.
3268 (mode-signed,mode-unsigned?): New procs.
3270 Thu Jun 3 16:00:40 1999 Doug Evans <devans@canuck.cygnus.com>
3272 * types.scm (<array>): New method get-shape.
3273 * hardware.scm (<hardware-base>): Forward get-shape,get-num-elms
3275 (hw-shape,hw-num-elms): New procs.
3276 * sim.scm (<hw-register>,gen-profile-index-type): Use "unsigned short"
3277 if there's more than 255 registers.
3278 * sid.scm (<hw-register>,gen-profile-index-type): Ditto.
3280 * hardware.scm (-hw-parse): Flag as error CACHE-ADDR specified
3283 1999-05-21 Doug Evans <devans@casey.cygnus.com>
3285 * cgen-sid.scm (sim-arguments): Add -X.
3286 * sid-cpu.scm (-gen-hardware-types): Comment out scache vars.
3287 (-gen-all-semantic-fns): Don't include PBB support virtual insns.
3288 (-gen-sem-case): Use CASE/NEXT macros again. Tweak indenting.
3289 Simplify by supporting pbb engine only.
3290 (-gen-sem-switch-init): New proc.
3291 (-gen-sem-switch-engine): Rename from -gen-sem-switch-fn.
3292 (cgen-sem-switch.cxx): New proc.
3293 * sid-decode.scm (-gen-decode-insn-globals): Replace with-sem-switch?
3294 with with-pbb?. Support dual scache/pbb engines.
3295 (-gen-idesc-decls): Replace with-sem-switch? with with-pbb?.
3296 Support dual scache/pbb engines.
3297 (cgen-decode.h): Generate semantic fn decls if with-scache?.
3298 * sid.scm (*) with-pbb? replaces with-sem-switch?.
3299 (sim-finish!): Create pbb support virtual insns if with-pbb?.
3301 1999-05-10 Ben Elliston <bje@cygnus.com>
3303 * arm7.cpu: Remove coprocessor related fields, operands and insn
3304 definitions for now. Take the undefined instruction trap instead.
3305 (ldmda-wb): New instruction.
3306 (ldmib-wb): Likewise.
3307 (ldmdb-wb): Likewise.
3308 (stmdb-wb): Likewise.
3309 (stmib-wb): Likewise.
3310 (stmda-wb): Likewise.
3312 1999-05-08 Doug Evans <devans@casey.cygnus.com>
3314 * sid.scm (<hw-memory>,cxmake-get): Call GETMEM method, not function.
3315 (<hw-memory>,gen-set-quiet): Call SETMEM method, not function.
3317 * utils-cgen.scm (keyword-list->arg-list): Fix call to substring,
3318 hobbit can't handle optional third arg.
3320 1999-05-07 Doug Evans <devans@casey.cygnus.com>
3322 * arm.cpu (h-tbit): Delete set spec.
3323 (h-mbits): Don't call arm_mbits_set in set spec.
3324 * arm.sim: New file.
3325 * hardware.scm (modify-hardware): New proc.
3326 (hardware-init!): Add modify-hardware command.
3327 * sid.scm (-hw-cxmake-get): Use method call if FUN-ACCESS specified.
3328 (-hw-gen-set-quiet): Ditto.
3329 (sim-finish!): Call invalid_insn method. Define FUN-ACCESS builtin
3330 hardware attribute. Load $arch.sim file if present.
3331 * utils-cgen.scm (keyword-list?): New proc.
3332 (keyword-list->arg-list,arg-list-validate-name): New procs.
3333 (arg-list-check-no-args,arg-list-symbol-arg): New procs.
3335 * arm7.cpu (eval-cond): Pass pc to @cpu@_eval_cond handler.
3337 * sid-cpu.scm (-gen-hardware-types): Rename @cpu@_cpu to
3340 * attr.scm (obj-prepend-atlist!): New proc.
3342 * opc-opinst.scm (cgen-opinst.c): Analyze instructions if necessary.
3344 * sid.scm (<operand>,profilable?): Use op:type.
3345 * sim.scm (<operand>,profilable?): Use op:type.
3347 1999-05-04 Doug Evans <devans@casey.cygnus.com>
3349 * utils.scm (find-index,find): Be more stack friendly.
3351 * arm7.cpu (arith-imm-op): Compute pc before setting cpsr.
3354 1999-05-01 Doug Evans <devans@casey.cygnus.com>
3356 * arm.cpu (h-gr-usr): New hardware element.
3357 (h-gr-fiq,h-gr-svc,h-gr-abt,h-gr-irq,h-gr-und): New hardware elements.
3358 (arm-mode): New keyword.
3359 (h-mbits): Add set spec.
3360 (h-spsr): Implement get/set specs.
3362 * read.scm: Load slib/pp.scm, slib/genwrite.scm.
3363 (-reader-process-expanded-1): Pretty print logging output.
3365 * sid-cpu.scm (-gen-reg-access-defns): Make getters `const'.
3366 (cgen-cpu.h): Print enums before hardware elements.
3367 (cgen-semantics.cxx): @arch@-cgen.h renamed to @arch@-main.h.
3368 * sid-decode.scm (cgen-decode.cxx): Ditto.
3369 * sid-model.scm (cgen-model.cxx): Ditto.
3371 * utils-cgen.scm (context-error): Accept variable number of
3374 * rtx-funcs.scm (error:): New rtx function.
3375 * rtl-c.scm (s-case-vm): New proc.
3376 (-gen-non-vm-case-get,s-case-non-vm): New procs.
3377 (s-case): Simplify, handle non-VM result.
3378 (error:): New rtx function.
3380 1999-04-30 Doug Evans <devans@casey.cygnus.com>
3382 * arm.cpu (h-pc): Add set spec to zero bottom bits.
3383 (test-hi,test-ls): Fix cbit handling.
3384 (shift-type,h-operand2-shifttype): Move here ...
3385 * arm7.cpu: ... from here.
3386 (set-cond,set-cond-maybe,dnix): Delete, unused.
3387 (set-zn-flags,set-logical-cc,set-add-flags,set-sub-flags): Move ...
3388 * arm.cpu: ... to here.
3389 * thumb.cpu (cmp,alu-cmp): Use set-sub-flags.
3390 (alu-cmn): Use set-add-flags.
3391 (alu-tst): Use set-zn-flags.
3392 (alu-cmp): Use set-sub-flags.
3393 (lsl,lsr,asr): Set condition codes.
3394 (add,addi,sub,subi,mov,addi8,subi8): Ditto.
3395 (alu-op): Split into three: alu-logical-op,alu-arith-op,
3397 (hireg-op): Split sem-fn into lo-dest-sem-fn,hi-dest-sem-fn.
3398 All callers updated.
3399 (sub-sp): Rename from add-sp-neg.
3400 (f-lbwl-offset): Delete.
3401 (f-lbwl-hi,f-lbwl-lo): New ifields.
3402 (lbwl-hi,lbwl-lo): Update.
3403 (bl-hi): Add 4 to pc.
3404 (push-reg,pop-reg): Simplify.
3405 (push,push-lr): Push registers in correct order.
3406 (pop,pop-pc): Pop registers in correct order.
3407 (save-reg-inc,load-reg-inc): Simplify.
3408 (ldmia): Save registers in correct order.
3410 1999-04-30 Ben Elliston <bje@cygnus.com>
3412 * arm7.cpu (f-op-hdt): Remove; unused.
3413 (f-ror-imm8-value,f-ror-imm-rotate): New fields.
3414 (f-ror-imm8): New multi-ifield.
3415 (f-operand2-bit7): Remove; use the generic `f-bit7' instead. All
3417 (f-uimm12): New field.
3418 (ror-imm8): New operand.
3420 (hdt-offset8): Reinstate operand.
3421 (offset4-hi,offset4-lo): Remove.
3422 (set-cond): Remove macro; unused.
3423 (set-cond-maybe): Likewise.
3424 (load-word/byte): Use uimm12 operand for a true 12-bit immediate.
3425 (store-word/byte): Likewise.
3426 (load-halfword): Use hdt-offset8 multifield operand instead of two
3427 4-bit operands that are explicitly combined by semantic code.
3428 (do-halfword-store): Bug fix. Set address when not preindexing.
3429 (store-halfword): Also use hdt-offset8 operand.
3430 (arith-op): Avoid clobbering source registers when one of them is
3431 the destination register.
3432 (arith-imm-op): Likewise.
3433 (tst-imm): Use ror-imm8 operand. Handle special case of rot 0.
3434 (teq-imm): Likewise.
3435 (ldm-p): Rename to ldmdb.
3436 (stm-pw): Rename to stmdb-wb.
3437 (multi-action): New macro; test reg-list bits and execute a
3438 semantic fn if the bit is set.
3439 (ldmda,ldmib,ldmia,ldmia-wb,ldmdb): New multiple load insns.
3440 (stmdb,stmib,stmia,stmia-wb,stmda,stmdb-wb): Store insns.
3441 (all insns): Use dnai entries for simplicity rather than dni.
3442 (*): Use short-form of (const ..).
3444 1999-04-29 Doug Evans <devans@casey.cygnus.com>
3446 * rtl.scm (<rtx-func>): Rename member type to style. Rename
3447 member eval to evaluator.
3448 (rtx-foo accessors): Rename from rtx:foo. All callers updated.
3449 (tstate-make): Delete arg op-fn. All callers updated.
3450 (tstate-op-fn,tstate-set-op-fn!): Delete.
3451 (rtx-traverse): Delete op-fn arg. All callers updated.
3452 * semantics.scm (-simplify-for-compilation-process-expr): New proc,
3453 split out of -simplify-for-compilation.
3455 * Makefile.am (CGEN_NONHOB_FILES,CGENFILES): New variables.
3456 (cgen_DEPENDENCIES): Add stamp-cgen.
3457 (stamp-cgen): New rule.
3458 * Makefile.in: Rebuild.
3460 * rtl-c.scm (enum:): Define emitter for.
3461 * rtl.scm (rtx-constant?): Rename from rtx-const? and check for
3463 (rtx-constant-value,rtx-enum-value): New procs.
3464 (-rtx-traverse-normal): Expand enum-value to (enum enum-value).
3465 (rtx-compile-time-constant?): Return #t for enums.
3466 (rtx-true?,rtx-false?): Handle enums.
3467 (rtx-simplify-eq-attr-mach): Use rtx-true,rtx-false instead of
3468 building result by hand.
3469 (rtx-simplify-eq-attr-insn): Ditto.
3470 * rtx-funcs.scm (enum:,enum): New rtx functions.
3472 * mach.scm (<arch>): New members insns-analyzed?, semantics-analyzed?,
3474 (arch-analyze-insns!): New proc.
3475 * opcodes.scm (opcodes-analyze!): Call arch-analyze-insns! instead
3476 of calling ifmt-compute! directly.
3477 * sid.scm (-sim-insns-analyzed?): Delete.
3478 (sim-analyze!): Call arch-analyze-insns! instead of calling
3479 ifmt-compute! directly.
3480 * sim.scm (-sim-insns-analyzed?): Delete.
3481 (sim-analyze!): Call arch-analyze-insns! instead of calling
3482 ifmt-compute! directly.
3484 * utils.scm (string-take-with-filler): New proc.
3485 (string-take): Use it.
3487 * pgmr-tools.scm: New file.
3488 * read.scm: Load it.
3489 * insn.scm (pretty-print-insn-format): Move to pgmr.scm.
3491 * insn.scm (insn-base-mask): Renamed from insn:mask.
3492 All callers updated.
3493 (insn-base-mask-length): Renamed from insn:mask-length.
3494 All callers updated.
3495 (insn-foo): Renamed from insn:foo. All callers updated.
3496 * minsn.scm (minsn-foo): Renamed from minsn:foo. All callers updated.
3497 * iformat.scm (compute-insn-base-mask-length): Renamed from
3498 compute-insn-mask-length. All callers updated.
3499 (compute-insn-base-mask): Renamed from compute-insn-mask.
3500 All callers updated.
3502 * enum.scm (-enum-parse-prefix): New proc.
3503 (<enum>,make!): Don't parse enum values here.
3504 (-enum-parse): Do it here. Call -enum-parse-prefix.
3505 (define-full-insn-enum): Ditto.
3506 (enum-vals-upcase): New proc.
3507 * hardware.scm (define-keyword): Make enum prefix uppercase.
3508 * hobscmif.h (CHAR_LOWERP,CHAR_UPPERP,CHAR_WHITEP): New macros.
3510 * ifield.scm (<ifield>,field-mask): Allow container to be #f.
3511 (<ifield>,field-extract): New method.
3512 (<multi-ifield>,field-extract): New method.
3513 (ifld-extract): New proc.
3514 * opcodes.scm (ifld-insert-fn-name): Renamed from ifld-insert.
3515 (ifld-extract-fn-name): Renamed from ifld-extract.
3517 * ifield.scm (ifld-new-value): Renamed from ifield-make.
3518 All callers updated.
3520 * ifield.scm (ifld-lsb0?): New proc.
3521 (sort-ifield-list): New arg up?. All callers updated.
3522 * iformat.scm (compute-insn-mask): Get lsb0? flag from argument,
3523 rather than global state.
3525 1999-04-27 Doug Evans <devans@casey.cygnus.com>
3527 * insn.scm (pretty-print-insn-format): New proc.
3529 * Makefile.in: Rebuild.
3530 * aclocal.m4: Rebuild
3531 * configure: Rebuild.
3533 Mon Apr 26 10:30:18 1999 Doug Evans <devans@canuck.cygnus.com>
3535 * configure.in (AM_INIT_AUTOMAKE): Update version to 0.7.2.
3536 * configure: Rebuild.
3537 * aclocal.m4: Rebuild.
3538 * Makefile.in: Rebuild.
3539 * doc/Makefile.in: Rebuild.
3540 * doc/version.texi: Rebuild.
3542 1999-04-25 Doug Evans <devans@casey.cygnus.com>
3544 * utils.scm (bits->bools): New proc.
3546 1999-04-23 Doug Evans <devans@casey.cygnus.com>
3548 * sid.scm (<multi-ifield>,gen-ifld-extract-decl): Fix call to
3549 subfield's gen-ifld-extract-decl method.
3551 1999-04-23 Ben Elliston <bje@cygnus.com>
3553 * arm7.cpu (ldrsh-pu): Remove.
3554 (do-halfword-load): New pmacro.
3555 (load-halfword): Likewise.
3556 (do-halfword-store): Likewise.
3557 (store-halfword): Likewise.
3558 (strh-*): New instructions.
3559 (ldrsb-*): Likewise.
3561 (ldrsh-*): Likewise.
3563 1999-04-22 Doug Evans <devans@casey.cygnus.com>
3565 * ifield.scm (ifld-constant?): Delete special handling of RESERVED
3568 * arm7.cpu (do-word/byte-store): Fix typo.
3570 1999-04-22 Ben Elliston <bje@cygnus.com>
3572 * arm7.cpu (do-word/byte-load): Handle cases where the destination
3573 register is the program counter (R15).
3575 * arm7.cpu (do-word/byte-store,store-word/byte): New pmacros.
3576 (str-*): Implement using store-word-byte. Remove older versions.
3577 (bic): Use the `inv' rtx for obtaining bitwise complements.
3578 (bic-imm): Likewise.
3580 (mvn-imm): Likewise.
3581 (store-indev-reg): Remove crufty pmacro.
3582 (load-indiv-reg): Likewise.
3583 (ldm-p): Reverse the order of register processing for decrement.
3585 (stbi): Remove; handled by the str-* insns.
3587 1999-04-21 Doug Evans <devans@casey.cygnus.com>
3589 * thumb.cpu (cmp): Fix carry bit computation.
3592 1999-04-20 Doug Evans <devans@casey.cygnus.com>
3594 * arm.cpu (h-tbit): Specify set spec.
3596 * arm7.cpu (bx): Don't call C routine, just set h-tbit.
3597 (set-sub-flags): Interpret "carry bit" as a borrow.
3598 (all sub/cmp insns): Carry bit is actually a borrow bit.
3599 * thumb.cpu (bx-rs,bx-hs): Don't call C routine, just set h-tbit.
3600 (add-carry,sub-carry,thumb-neg,thumb-bic,thumb-inv): Delete. Use
3602 (hireg-add,hireg-cmp,hireg-move): Ditto.
3604 * read.scm (-CGEN-VERSION): Change version to 0.7.2.
3605 (-CGEN-LANG-VERSION): Ditto.
3607 1999-04-18 Doug Evans <devans@casey.cygnus.com>
3609 * pmacros.scm (-pmacro-make): New arg `default-values',
3610 all callers updated.
3611 (-pmacro-default-values): New proc.
3612 (-pmacro-process-keyworded-args): New proc.
3613 (-pmacro-process-args): New proc.
3614 (-pmacro-invoke): Process arguments before expanding macro.
3615 (-pmacro-get-arg-spec,-pmacro-get-default-values): New procs.
3616 (define-pmacro): Handle default values specified in arg list.
3617 * rtl.scm (rtx-alu-op-mode,rtx-alu-op-arg): New procs.
3618 (rtx-boolif-op-arg[01]): New procs.
3619 (rtx-true,rtx-false,rtx-canonical-bool): New procs.
3620 (rtx-simplify): Handle not,orif,andif.
3621 * semantics.scm (-simplify-for-compilation): Simplify not,orif,andif.
3622 * utils.scm (alist-copy): New proc.
3623 * arm7.cpu (do-word/byte-load,load-word/byte): New pmacros.
3625 (swi): Explicitly set pc.
3627 * thumb.cpu (bx-rs,bx-hs): Reverse test for switch to arm mode.
3629 1999-04-17 Ben Elliston <bje@cygnus.com>
3631 * arm7.cpu (ldr-pu): Do not add 8 to R15; the step() method
3632 correctly adjusts the program counter now.
3634 * arm7.cpu (f-halfword?): Rename from `f-hdt-halfword?'.
3635 (f-signed?): Rename from `f-hdt-signed?'.
3636 (f-offset4-hi): Rename from `h-hdt-off4-ms'.
3637 (f-offset4-lo): Rename from `h-hdt-off4-ls'.
3638 (f-hdt-offset8): Use new field names.
3639 (ldr): Use `imm12' field, not `offset12', since we do our own
3641 (str, str-*): Likewise.
3642 (ldu-*): Remove most; better not implemented than broken.
3644 (ldrsh-pu): New insn.
3648 (ldm-p): Likewise; replace (load-indiv-reg) version.
3650 1999-04-15 Doug Evans <devans@casey.cygnus.com>
3652 * arm.cpu (h-pc): Delete VIRTUAL attribute, get/set specs.
3653 * arm7.cpu (*): Fix mode of result of arm_compute_carry_out_*.
3654 (*): Explicitly specify mode in c-call.
3655 (logical-op): Recognize sets of h-gr[15] as sets of pc.
3657 (and-imm,orr-imm,xor-imm,mov-imm,bic-imm,mvn-imm): Ditto.
3658 (arith-imm-op): New pmacro.
3659 (add-imm,adc-imm,sub-imm,sbc-imm,rsb-imm,rsc-imm): Use it.
3660 * thumb.cpu (bx-rs,bx-hs): Rewrite.
3662 1999-04-14 Doug Evans <devans@casey.cygnus.com>
3664 * rtl.scm (rtx-simplify-eq-attr-insn): Fix call to context-error.
3666 * rtl.scm (rtl-find-ifields): Implement.
3668 * utils-gen.scm: New file.
3669 * read.scm: Load it.
3670 * desc.scm: Move generic attribute code to utils-gen.scm.
3671 * Makefile.am (CGEN_HOB_INPUT_FILES): Add it.
3672 * Makefile.in: Rebuild.
3674 * arm7.cpu (R15-OFFSET): New attribute.
3676 (logical-op): Delete arg `result?'. All callers updated. Use dnai.
3677 Delete use of eval-cond (dnai specifies it). Specify R15-OFFSET of 12
3678 for reg-shift version.
3680 (data processing insns): Reorganize. Use dnai.
3682 * attr.scm (attr-kind): New proc.
3683 (attr-list-enum-list): Rewrite.
3684 (-attr-sort): Split result into two lists, bools and non-bools.
3685 (current-attr-list-for): Update.
3687 * cgen-sid.scm (sim-arguments): Add -H -> build desc.h file.
3688 * sid-cpu.scm (-gen-attr-decls): New proc.
3689 (-gen-insn-attr-decls): New proc.
3690 (cgen-desc.h): New proc.
3691 (cgen-cpu.h): Put everything in @cpu@ namespace.
3692 (gen-parallel-exec-type): Change prefix of parexec struct from
3694 (-gen-trace-record-type): Ditto for trace_record struct.
3695 (-gen-write-case): Update.
3696 (-gen-scache-semantic-fn): Change function prefix from @cpu@ to
3697 @prefix@. Update scache struct references.
3698 (-gen-sem-case): Update scache struct references.
3699 (-gen-sem-switch-fn): Update idesc struct reference.
3700 Update insn_type enum reference.
3701 (cgen-write.cxx): Update scache,argbuf references.
3702 (cgen-semantics.cxx): Simplify namespace choice (always @cpu@).
3703 * sid-decode.scm (IDESC-TABLE-VAR): Change prefix of insn_data
3704 from @cpu@ to @prefix@.
3705 (-gen-decode-insn-entry): Use gen-cpu-insn-enum.
3706 (-gen-decode-expr-entry): Ditto. Change prefix of INSN_X_INVALID
3707 from @CPU@ to @PREFIX@.
3708 (-gen-decoder-switch): Change prefix of INSN_X_INVALID
3709 from @CPU@ to @PREFIX@.
3710 (-gen-decode-insn-globals): Generate insn attributes.
3711 (-gen-sem-fn-name): Change function prefix from @cpu@ to @prefix@.
3712 (-gen-sem-fn-decls): Use -gen-sem-fn-name. Add `using' for
3713 semantic fn typedef.
3714 (-gen-idesc-decls): Simplify cpu class name (always @cpu@_cpu).
3715 Change prefix of scache struct from @cpu@ to @prefix@.
3716 Change prefix of semantic fn typedef from @cpu@ to @prefix@.
3717 Change prefix of idesc struct from @cpu@ to @prefix@.
3718 Change prefix of insn_type enum from @cpu@ to @prefix@.
3719 (-gen-argbuf-fields-union): Change prefix of sem_fields union
3720 from @cpu@ to @prefix@.
3721 (-gen-scache-decls): Change prefix of scache struct from
3722 @cpu@ to @prefix@. Update idesc struct name.
3723 Update decode,execute methods.
3724 (-gen-extract-case): Update to type name changes.
3725 (-gen-decode-fn): Ditto.
3726 (cgen-decode.h): Put everything in @cpu@ namespace (except
3727 semantic fn decls). Change prefix of insn_word from @cpu@ to @prefix@.
3728 (cgen-decode.cxx): Add using namespace @cpu@.
3729 * sid-model.scm (-gen-hw-profile-decls): Change prefix of
3730 model_mark_get/set from @cpu@ to @prefix@.
3731 (gen-model-unit-fn-name): Change function prefix from @cpu@ to
3733 (gen-model-fn-decls): Update idesc struct name. Change prefix
3734 of model_insn_before/after from @cpu@ to @prefix@.
3735 (-gen-model-insn-fn): Update scache/idesc/argbuf struct names.
3736 Update insn_word type name.
3737 (-gen-model-timing-table): Update INSN_TIMING struct name.
3738 (-gen-model-init-fn): Update MODEL_DATA struct name.
3739 (-gen-mach-defns): Update name of init_idesc_table fn.
3740 (cgen-model.cxx): Add using namespace @cpu@.
3741 * sid.scm (gen-cpu-class): Delete.
3742 (gen-attr-type): New proc.
3743 (gen-obj-attr-sid-defn): New proc.
3744 (<operand>,gen-profile-code): Update name of model_mark_get/set fn.
3745 (gen-cpu-insn-enum-decl): Change prefix of insn_type enum from
3747 (gen-cpu-insn-enum): Update name of insn enum.
3748 * thumb.cpu (bx-rs): Rename @cpu@_do_bx to @prefix@_do_bx.
3750 (swi): Rename @cpu@_swi to @prefix@_swi.
3752 * decode.scm (-build-decode-table-entry): Remove heuristic for
3753 distinguishing insns, and use insn ifield-assertion specs.
3755 * desc-cpu.scm (gen-A-attr-mask): Simplify.
3756 (gen-ifld-defns): Boolean attributes begin at number 0 now.
3757 (gen-hw-table-defns,gen-operand-table,gen-insn-table): Ditto.
3758 * opc-itab.scm (-gen-macro-insn-table): Ditto.
3759 * utils-cgen.scm (gen-attr-enum-decl): Change type arg to prefix,
3760 all callers updated.
3761 (gen-attr-name): New proc
3762 (gen-attr-mask): Use it. Boolean attributes start at 0 now.
3763 (gen-obj-attr-defn): Delete num_nonbools count.
3765 * iformat.scm (ifmt-analyze): Handle insn-condition.
3766 (ifmt-compute!): Ditto.
3767 * insn.scm (<insn>): Specify default value for condition,
3768 post-cond-trap,compiled-condition,compiled-semantics.
3769 (<insn>,make!): New arg condition.
3770 (<insn>): Add getters for condition,compiled-condition.
3771 (-insn-parse): New arg condition, all callers updated.
3772 (-insn-read): Recognize condition spec.
3773 (define-full-insn): New arg condition.
3774 * minsn.scm (minsn-make-alias): Update call to (make <insn> ...).
3775 * semantics.scm (semantic-compile): Change arg sem-code to
3777 (semantic-attrs): Ditto.
3778 * sim.scm (sim-finish!): Update calls to define-full-insn.
3779 * simplify.inc (define-normal-insn): Update call to define-full-insn.
3780 * sid-cpu.scm (gen-semantic-code): Handle insn-condition.
3781 * sid.scm (sim-finish!): Update call to define-full-insn.
3783 Tue Apr 13 17:04:34 1999 Doug Evans <devans@canuck.cygnus.com>
3785 * Makefile.am (sim-cpu): Allow specification of ISA.
3786 * Makefile.in: Rebuild.
3788 Sun Apr 11 00:37:56 1999 Jim Wilson <wilson@cygnus.com>
3790 * i960.cpu (sll-expr, srl-expr, sra-expr): Handle large shift counts.
3792 1999-04-10 Doug Evans <devans@casey.cygnus.com>
3794 * sparccom.cpu (check-fp-enable): Wrap TRAP32_FP_DIS in c-code.
3796 * arm.cpu (gr-names): Put pc first so it gets prefered in disassembly.
3798 * attr.scm (atlist?): New proc.
3799 (-attr-eval): Rewrite.
3800 (attr-parse): New proc.
3801 (atlist-parse): Use it.
3803 * decode.scm (exprtable-entry-make): New proc.
3804 (exprtable-entry-insn,exprtable-entry-expr): New procs.
3805 (exprtable-make,exprtable-insns): New procs.
3807 * hardware.scm (hw-mode-ok?): Delete argument `set?'.
3809 (hardware-builtin!): Make h-memory a vector.
3811 * iformat.scm (ifmt-ifields): Renamed from ifmt-fields.
3812 All callers updated.
3813 (ifmt-analyze): Use csem-* accessors on result of semantic-compile.
3815 * insn.scm (<insn>). Rename ifld-assertions to ifield-assertion.
3817 (-insn-parse): Set semantics to #f if not specified.
3818 (define-insn,define-full-insn): Take out code that ignores ALIAS's
3820 (-parse-insn-format): Recognize `=' iformat spec.
3822 * mach.scm (isa-min-insn-bitsize): Ignore ALIAS's.
3823 (isa-max-insn-bitsize): Ditto.
3825 * opcodes.scm (<ifield>,gen-insert): Call rtl-c instead of
3827 (<ifield>,gen-extract): Ditto.
3828 (<multi-ifield>,gen-insert,gen-extract): Ditto.
3829 * sid-cpu.scm (-gen-reg-access-defns): Ditto.
3830 (gen-define-ifmt-ifields): New proc.
3831 (gen-semantic-code): Rewrite.
3832 * sid-decode.scm (-gen-decode-expr-entry): New proc.
3833 (-gen-decoder-switch): Handle expression tables.
3834 (-gen-extract-case): Call gen-define-ifmt-ifields instead of
3836 * sid-model.scm (-gen-model-insn-fn): Call gen-define-ifmt-ifields
3837 instead of gen-define-fields.
3838 * sid.scm (<ifield>,gen-ifld-extract-decl): New arg `indent', all
3840 (<multi-ifield,gen-ifld-extract-decl): Ditto.
3841 (-gen-ifld-extract-base): Call rtl-c instead of rtl-c-with-alist.
3842 (-gen-ifld-extract-beyond): Ditto.
3843 (<multi-ifield>,gen-ifld-extract): Ditto.
3844 (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
3845 rtl evaluation code.
3846 (op:read): Build an <eval-state> to pass to gen-read.
3847 (op:write): Build an <eval-state> to pass to gen-write.
3848 (op:record-profile): Build an <eval-state> to pass to
3850 * sim-cpu.scm (gen-semantic-code): Rewrite.
3851 * sim.scm (-gen-ifld-extract-base): Call rtl-c instead of
3853 (-gen-ifld-extract-beyond): Ditto.
3854 (<multi-ifield>,gen-ifld-extract): Ditto.
3855 (<hw-register>,gen-get-macro,gen-set-macro): Ditto.
3856 (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
3857 rtl evaluation code.
3858 (op:read): Build an <eval-state> to pass to gen-read.
3859 (op:write): Build an <eval-state> to pass to gen-write.
3860 (op:record-profile): Build an <eval-state> to pass to
3863 * operand.scm (<operand>): Give `selector' default value of #f.
3864 Give `num' default value of -1. Give `cond?' default value of #f.
3865 (op:new-mode): Delete arg `set?', all uses updated.
3867 * read.scm (reader-error): Handle #f return from port-filename.
3868 (-init-parse-cpu!): Call rtl-c-init!.
3869 (reader-install-builtin!): Call rtl-builtin!.
3871 * rtl-c.scm: New file.
3872 * semantics.scm: New file.
3873 * read.scm: Load them.
3874 * rtl.scm: C generation moved to rtl-c.scm. Semantic analysis moved
3876 (<rtx-func>): Delete members syntax?,macro,c,expr. New members
3878 (rtx-lookup): Renamed from -rtx-func-lookup. All callers updated.
3879 (-rtx-num-text,-rtx-max-num): New globals.
3880 (def-rtx-operand-node,define-rtx-operand-node): New procs.
3881 (-rtx-macro-lookup): New proc.
3882 (rtx-lvalue-mode-name): Renamed from rtx-expr-mode-name.
3883 (rtx-env-stack-empty?,rtx-env-stack-head): New procs.
3884 (rtx-env-var-list,rtx-env-empty-stack,rtx-env-init-stack1): New procs.
3885 (rtx-env-make,rtx-env-empty?,rtx-env-make-locals): New procs.
3886 (rtx-env-push,rtx-temp-lookup,-rtx-closure-make): New procs.
3887 (rtx-make,rtx-kind?,rtx-const?,rtx-const-value,rtx-symbol-name,
3888 rtx-operand?,rtx-operand-obj,rtx-local?,rtx-local-obj, rtx-xop-obj,
3889 rtx-index-of-value,rtx-if-mode,rtx-if-test,rtx-if-then,rtx-if-else,
3890 rtx-eq-attr-owner,rtx-eq-attr-attr,rtx-eq-attr-value): New procs.
3891 (rtx-pretty-name): New proc.
3892 (-rtx-traverser-table,-rtx-make-traverse-table): New procs.
3893 (rtx-traverse-*): Rewrite rtx traversing.
3894 (rtx-eval-*): Rewrite rtx evaluation.
3895 (rtx-compile): New proc.
3896 (rtx-simplify): New proc.
3897 (rtx-simply-eq-attr-mach,rtx-simplify-eq-attr-insn): New procs.
3898 * rtx-funcs.scm: C generation moved to rtl-c.scm.
3899 (ifield,index-of): Rewrite.
3900 (name): Renamed from `operand:'.
3901 (operand,xop,local): New rtx's.
3902 (current-insn): Rewrite.
3903 * Makefile.am (CGEN_HOB_INPUT_FILES): Add rtl-c.scm, semantics.scm.
3904 (cgen-hob.h): Remove rule for.
3905 (cgen-hob.o): Depend on cgen-hob.c only.
3906 * Makefile.in: Rebuild.
3908 * utils-cgen.scm (vmake): New proc.
3909 (<context>): New class.
3910 (context-make-prefix,context-error): New procs.
3912 Fri Apr 9 19:26:28 1999 Jim Wilson <wilson@cygnus.com>
3914 * i960.cpu: Add some ??? comments.
3915 (xnor, ornot): New instructions.
3916 (*): Delete obsolete COND-CTI and UNCOND-CTI attributes.
3918 1999-04-08 Doug Evans <devans@casey.cygnus.com>
3920 * cos.scm (-object-error): Print better error message.
3922 * pmacros.scm (-pmacro-env-make): Renamed from -env-make.
3923 (-pmacro-env-ref): Renamed from -env-ref.
3925 1999-03-31 Doug Evans <devans@casey.cygnus.com>
3927 * hardware.scm (<hw-pc>,parse!): Allow get/set specs.
3929 (hardware-builtin!): Delete h-pc builtin.
3930 * arm.cpu (h-pc): Define.
3931 (h-gr): Delete get,set specs. Make array of 16 regs again.
3932 * arm7.cpu (set-logical-cc-maybe): Delete.
3933 (set-zn-flags,set-add-flags,set-sub-flags): New macros.
3934 (data processing insns): Rewrite.
3935 * m32r.cpu (h-pc): Define.
3936 * fr30.cpu (h-pc): Define.
3937 * i960.cpu (h-pc): Define.
3938 * sparc.cpu (h-pc): Define.
3940 * rtl.scm (-rtx-traverse-operands): Add some error checking to LOCALS.
3941 (s-parallel): Replace do {...} while (0) with {...}.
3942 (s-sequence): Ditto.
3944 * sid-cpu.scm (gen-parallel-exec-type): Make type of `written'
3946 (-gen-write-case,-gen-sem-case): Ditto.
3947 (-gen-sem-case): Only specify `written' if profiling or
3948 parallel-write-back.
3949 (-gen-scache-semantic-fn,-gen-all-semantic-fns): Put procs back in.
3950 (-gen-sem-switch-fn): New proc.
3951 (cgen-semantics.cxx): Emit either semantic fns or semantic switch
3952 based on with-sem-switch option.
3953 * sid-decode.scm (-gen-decode-insn-globals): Only define
3954 idesc_table_initialized_p if with-sem-switch. Record semantic fn
3955 addresses in idesc_table if !with-sem-switch.
3956 (-gen-sem-fn-decls): Rewrite.
3957 (-gen-idesc-decls): Define @cpu@_sem_fn type. Define `execute'
3958 member based on with-sem-switch. Only define
3959 `idesc_table_initialized_p' member if with-sem-switch.
3960 (cgen-decode.h): If !with-sem-switch, declare semantic fns.
3961 * sid.scm (-with-sem-switch?): New variable.
3962 (option-init!): Initialize it.
3963 (option-set!): Set it.
3964 (with-sem-switch?): New proc.
3965 (-op-gen-set-trace): Only emit `written' reference if profiling.
3966 (sim-finish!): Use h_pc_set to set pc.
3968 1999-03-30 Doug Evans <devans@casey.cygnus.com>
3970 * sparccom.cpu (arith-cc-binop): New args s32-set-flags,s64-set-flags.
3971 All callers updated.
3972 (arith-carry-cc-binop): New arg set-flags. All callers updated.
3974 * sid.scm (gen-argbuf-type): Delete.
3975 (-gen-argbuf-fields-union): Move to ...
3976 * sid-decode.scm: ... here.
3978 * read.scm (-reader-process-expanded-1): New proc.
3979 (-reader-process-expanded): Call it to catch nested begin's.
3980 (reader-process): Move `begin' handling to -reader-process-expanded.
3982 * insn.scm (-insn-read): Fix name of `format' spec.
3984 * pmacros.scm (.pmacro): New builtin.
3985 (scan-symbol): If procedure macro, return macro rather than its symbol.
3986 (check-macro): Don't do lookup, instead check if (car expr) is
3988 (scan-list): Handle .pmacro.
3989 (scan): No longer re-examine text for another macro invocation.
3990 (-pmacro-build-lambda): New proc.
3991 (define-pmacro): Rewrite. If defining one pmacro to be an alias of
3992 another, fetch the other's value (rather than doing it during
3995 1999-03-27 Doug Evans <devans@casey.cygnus.com>
3997 * Makefile.am (CGEN_HOB_INPUT_FILES): Add decode.scm.
3998 * Makefile.in: Rebuild.
4000 * decode.scm (decode-get-best-bits): Use memq instead of element?.
4001 (-fill-slot!): Simplify.
4002 (-build-slots): Simplify.
4004 * dev.scm (load-sid): Don't load sid-arch.scm.
4006 * sid-decode.scm: Replace computed goto decoder/extractor with plain
4008 * sim-decode.scm: Replace computed goto decoder/extractor with plain
4011 1999-03-26 Doug Evans <devans@casey.cygnus.com>
4013 * sim-decode.scm: Clean up pass. Move decoder computation into ...
4014 * decode.scm: ... here. New file.
4015 * sid-decode.scm: Use decoder computation code in decode.scm.
4016 * read.scm: Load decode.scm.
4018 * arm.cpu (arm710 model): Add u-exec function unit.
4019 (h-gr): Delete CACHE-ADDR for now. Make array of 15, not 16 regs.
4020 Add get/set specs to redirect reg 15 to h-pc.
4021 (h-*): Indicate for both ARM and THUMB isas.
4022 (cbit,nbit,vbit,zbit): Ditto.
4023 (h-ibit,h-fbit,h-tbit,h-mbits): New hardware elements.
4024 (h-cpsr): Make virtual. Add get/set specs.
4025 (h-spsr-fiq,h-spsr-svc,h-spsr-abt,h-spsr-irq,h-spsr-und): New hw.
4026 (h-spsr): New virtual reg.
4027 * arm7.cpu (shift-type): New explicitly defined keyword.
4028 (h-operand2-shifttype): Use it.
4029 (set-logical-cc-maybe): Delete carry-out arg. New args arg1,arg2.
4030 All callers updated. Don't set cbit.
4031 (logical-op): Add rm to ifield list. Change case to case:. Use
4032 shift-type enum as case choices. Set cbit.
4033 (and,orr,eor,add-imm): Uncomment out.
4034 (undefined): Temporarily comment out.
4035 * thumb.scm (mov,cmp,addi8,subi8,str-sprel,ldr-sprel): s/rd/bit10-rd/.
4036 (lda-pc,lda-sp): Ditto.
4037 (ldr-pc): Rename from ldr.
4038 (cbranch): Mark insns as being thumb insns.
4040 * attr.scm (<bitset-attribute>,parse-value): Recognize strings.
4042 * cgen-sid.scm: Don't load sid-arch.scm.
4043 (sim-arguments): Delete unused entries.
4044 * sid-arch.scm: Delete.
4046 * insn.scm (<insn>,iflds): Renamed from flds. All uses updated.
4047 (<insn>,ifld-assertions): New member.
4048 (<insn>,make!): New arg ifld-assertions, all callers updated.
4049 (<insn> accessors): Change insn:foo to insn-foo. All callers updated.
4050 (insn:fields): Delete.
4051 (-insn-parse): New arg ifld-assertions. All callers updated.
4052 (-insn-read,define-insn): New procs.
4053 (define-full-insn): New arg ifld-assertions. All callers updated.
4054 (insn-init!): New comment define-insn.
4056 * model.scm (-model-parse): Ensure at least one unit specified.
4058 * rtl.scm (-rtx-traverse-operands): Recognize environments.
4059 (<c-expr-temp>,get-name): New method.
4060 (-rtx-make-current-closure,s-closure): New proc.
4061 (hw:): Wrap rtx indices in a closure.
4062 (-gen-case-prefix): New proc.
4064 * rtx-funcs.scm (case:): Fix call to s-case.
4065 (closure): New rtx func.
4067 * hardware.scm (<hardware-base>): New member isas-cache.
4068 (<hardware-base>,get-isas): New method.
4069 (hardware-builtin): Indicate for all isas.
4070 * ifield.scm (-ifield-parse): Only keep if isa+mach are kept.
4071 * mach.scm (current-arch-mach-name-list): Return list of names.
4072 (current-isa-mach-name-list): Ditto.
4073 (define-arch): Install builtin objects here.
4074 * read.scm (keep-atlist?): Only keep if both mach and isa are
4076 (keep-mach-atlist?): New proc.
4077 (keep-isa-multiple?,current-keep-isa-name-list): New proc.
4078 (reader-install-builtin!): Renamed from -install-builtin!.
4079 * sid-cpu.scm (-gen-reg-access-defns): Renamed from
4080 -gen-cpu-reg-access-defns. Rewrite.
4081 (gen-reg-access-defn): Delete.
4082 (-gen-hardware-struct): New proc.
4083 (-gen-hardware-types): Simplify. Add multiple-isa support.
4084 (gen-semantic-fn,-gen-all-semantics): Delete.
4085 (-gen-read-args,-gen-read-case,-gen-read-switch): Delete.
4086 (cgen-cpu.c,cgen-read.c,cgen-sem-switch.c,cgen-mainloop.in): Delete.
4087 (cgen-write.cxx,cgen-semantics.cxx,cgen-decode.cxx): Renamed from *.c.
4088 Call sem-analyze-insns!.
4089 (cgen-semantics.cxx): Add multiple-isa support.
4090 * sid-decode.c (-gen-idesc-decls): Add multiple-isa support.
4091 (-gen-scache-decls,-gen-decode-fn): Ditto.
4092 (cgen-decode.h): Call sem-analyze-insns!.
4093 * sid-model.scm (cgen-model.cxx): Renamed from cgen-model.c.
4094 * sid.scm (-with-multiple-isa?): New variable.
4095 (option-init!): Initialize it.
4096 (option-set!): Set it.
4097 (with-multiple-isa?): New proc.
4098 (gen-cpu-ref): New arg isas. All callers updated.
4099 (gen-cpu-class): New proc.
4100 (*-get-macro,*-set-macro): Delete.
4101 (gen-reg-get-fun-name,gen-reg-set-fun-name): New procs.
4102 (-hw-gen-fun-get): Call gen-reg-get-fun-name.
4103 (-hw-gen-fun-set): Call gen-reg-set-fun-name.
4104 (-gen-hw-index): Call rtx-c instead of rtx-c-with-temps for rtxs.
4105 (-sim-insns-analyzed): New global variable.
4106 (sim-init!): Reset it.
4107 (sim-analyze-insns!): New proc.
4108 (sim-analyze!): Don't do instruction analysis here.
4109 (sim-finish!): Specify isa of x-invalid insn.
4110 * sim.scm (sim-finish!): Specify isa of added x-* virtual insns.
4112 1999-03-22 Doug Evans <devans@casey.cygnus.com>
4114 * thumb.cpu (cpu,mach,model): Delete.
4115 (dntf): New pmacro. Use it for all field definitions.
4116 (dntop): New pmacro. Use it for all operand definitions.
4117 (asr): Correct field list.
4118 (add,addi,sub,subi,add-sp,add-sp-neg): Ditto.
4120 * utils-cgen.scm (define-getters): New macro to simplify
4121 writing class accessors.
4122 (define-setters): Ditto.
4123 (sanitize): Recognize isa elements.
4125 * sid-cpu.scm (*): Replace cpu:parallel-exec? call with
4126 state-parallel-exec?.
4127 * sid-model.scm (*): Ditto.
4128 * sid-decode.scm (*): Ditto. Replace cpu:decode-assist with
4129 state-decode-assist.
4131 * sid-decode.scm (decode-bits): Replace list-reverse! with reverse!.
4132 (-gen-decode-switch): Rewrite to not generate deeply nested lists.
4133 * sim-decode.scm (-gen-decode-switch): Ditto.
4135 * sim-arch.scm (-regs-for-access-fns): Delete.
4136 (-biggest-reg-mode,-gen-arch-reg-access-decls): Delete.
4137 (-gen-arch-reg-access-defns): Delete.
4139 * sim-cpu.scm (*): Replace cpu:liw-insns with state-liw-insns,
4140 cpu:parallel-insns with state-parallel-insns, cpu:parallel-exec?
4141 with state-parallel=exec?.
4142 (cgen-*): Call sim-analyze-insns! here.
4143 * sim-decode.scm (cgen-*): Ditto.
4144 * sim-model.scm (cgen-*): Ditto.
4145 * sim.scm (-sim-insns-analyzed): New global variable.
4146 (sim-init!): Reset it.
4147 (sim-analyze-insns!): Renamed from sim-analyze!. Keep track if we've
4148 already done the analysis.
4150 * sim-model.scm (-gen-mach-defns): Add mach attribute number to
4153 * arm.cpu: Only include arm7.cpu,thumb.cpu if necessary.
4154 (arm arch): Update isa spec.
4155 (arm,thumb isas): Define.
4156 (arm7 cpu): default-insn-bitsize,base-insn-bitsize moved to isas.
4157 (arm7tdmi mach): Add isa spec.
4158 * arm7.cpu (*): Replace subreg: with subword:. Remove unnecessary
4159 `const' on word number.
4160 * fr30.cpu (fr30 arch): Update isa spec.
4162 (fr30bf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
4164 * i960.cpu (i960 arch): Update isa spec.
4166 (i960base cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
4167 liw-insns,parallel-insns moved to isas spec.
4168 * m32r.cpu (m32r arch): Update isas spec.
4170 (m32rbf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
4171 liw-insns,parallel-insns moved to isa spec.
4172 * sparc.cpu (sparc arch): Update isas spec.
4173 (sparc isa): Define.
4174 * sparc32.cpu (sparc32 cpu): default-insn-bitsize,base-insn-bitsize,
4175 decode-assist moved to isa spec.
4176 * sparc64.cpu (sparc64 cpu): Ditto.
4177 * sparccom.cpu (trap insns): Correct mode of result of c-call:.
4178 * desc-cpu.scm (-gen-isa-table-defns): New proc.
4179 (-gen-mach-table-defns): Output mach table.
4180 (-gen-hash-defines): Delete insn size macros, except for
4182 (-cgen-cpu-open): Rewrite cpu_open handling. Take stdarg list of args.
4183 (cgen-desc.h): Define MAX_ISAS.
4184 (cgen-desc.c): Include stdarg.h. Call -gen-isa-table-defns.
4185 * mach.scm (<arch>): Rename arch-data to data. New member isa-list.
4186 (arch-* accessors): Renamed from arch:*. All callers updated.
4187 (current-arch-isa-name-list): New proc.
4188 (-arch-parse-isas): Renamed from -arch-parse-isa.
4189 (def-isa-attr!): Rewrite.
4190 (<iframe>): New class.
4191 (<itype>): New class.
4193 (isa-min-insn-bitsize,isa-max-insn-bitsize): New procs.
4194 (isa-integral-insn?,isa-parallel-exec?): New procs.
4195 (-isa-parse,-isa-read,define-isa): New proc.
4196 (<cpu>): Members default-insn-bitsize,base-insn-bitsize,decode-assist,
4197 liw-insns moved to <isa>.
4198 (cpu-* accessors): Renamed from cpu:*. All callers updated.
4199 (-cpu-parse,-cpu-read): Update.
4200 (state-*): Renamed from state:*. All callers updated.
4201 (state-default-insn-bitsize,state-base-insn-bitsize): Use isa spec,
4203 (state-parallel-insns,state-parallel-exec?,state-liw-insns): New procs.
4204 (state-decode-assist): New proc.
4205 (<derived-arch-data>): Delete min-insn-bitsize,max-insn-bitsize.
4206 (-adata-set-derived!): Rewrite.
4207 (adata-integral-insn?): Renamed from adata:integral-insn?. All
4209 (arch-init!): Add define-isa command.
4210 * read.scm (<reader>): Default keep-isa member to (all).
4211 (reader-* accessors): Renamed from reader:*. All callers updated.
4212 (-keep-isa-set!): Call string->symbol on isa name list.
4213 (keep-isa-validate!): Rewrite.
4214 (current-isa): New proc.
4215 (keep-isa?): Recognize "all".
4216 (-init-parse-cpu!): New arg keep-isa. All callers updated.
4217 Call -keep-isa-set!.
4218 (cmd-if): Recognize keep-isa?.
4219 (cpu-load): New arg keep-isa. All callers updated.
4220 (-opt-spec-update): New proc.
4221 (common-arguments): First arg is string, not symbol.
4222 (-cgen): Call -opt-spec-update. Rewrite argument parsing.
4224 * rtl.scm (rtx-get): Default mode of string arg is INT.
4226 * rtl.scm (s-subword): Renamed from s-subreg. All uses updated.
4228 * rtx-funcs.scm (join:): Pass cpu to handler.
4230 * configure.in (guile_include_dir): Delete.
4231 * configure: Rebuild.
4232 * Makefile.in: Rebuild.
4233 * doc/Makefile.in: Rebuild.
4235 * sid-cpu.scm (-extract-chunk-specs): New proc.
4236 (gen-define-fields): Use it.
4237 (-extract-chunk): New proc.
4238 (-gen-extract-beyond-var-list): Use it.
4239 (gen-extract-fields): Simplify.
4241 1999-03-22 Ben Elliston <bje@cygnus.com>
4243 * arm7.cpu (ldri-p): New instruction.
4244 (swi): Do not vector through 0x8 yet--there is nothing there.
4247 (all): Use (const x) in subreg expressions.
4249 1999-03-19 Ben Elliston <bje@cygnus.com>
4251 * arm7.cpu (smull): Use operand field `rs', not `mul-rn'. Thinko.
4254 1999-03-17 Doug Evans <devans@casey.cygnus.com>
4256 * fr30.cpu (define-arch): Specify "forced" default-alignment.
4257 * mach.scm (-parse-alignment): Recognize "forced" alignment.
4258 * sim-cpu.scm (-extract-chunk-specs): New proc.
4259 (gen-define-fields): Use it.
4260 (-extract-chunk): New proc.
4261 (-gen-extract-beyond-var-list): Use it.
4262 (gen-extract-fields): Simplify.
4264 Port to guile 1.3.1.
4265 * Makefile.am (GUILEINCDIR,GUILELDFLAGS,GUILELDADD): Delete.
4266 (LIBIBERTY): New var.
4267 (HOB_OBJS): Add cgen-gh.o.
4268 (hobbit): Delete $(CFLAGS) from link, add $(LIBS) $(LIBIBERTY).
4269 * Makefile.in: Rebuild.
4270 * acconfig.h: Add HAVE_3_ARG_SCM_MAKE_VECTOR.
4271 * config.in: Rebuild.
4272 * configure.in: Add checks for libdl, libreadline, libnsl, libsocket,
4273 libncurses, libtermcap.
4274 Add checks for needed functions in guile 1.2 not in guile 1.3,
4275 and vice versa. Add test for 3 argument scm_make_vector.
4276 * configure: Rebuild.
4277 * cgen-gh.c (scm_list_length,scm_list_append,scm_list_reverse): Provide
4278 definitions if guile doesn't have them.
4279 (gh_make_vector,gh_length,gh_vector_set_x,gh_vector_ref):
4280 (cgh_vector): Replace gh_vector with gh_make_vector. Replace gh_vset
4281 with gh_vector_set_x.
4282 (cgh_qsort): Replace gh_list_length with gh_length.
4283 * cgen-gh.h: Add decls for added functions.
4284 (cgh_qsort): Don't declare if IN_HOBBIT.
4285 * cos.c: Include config.h. Replace gh_vref with gh_vector_ref,
4286 gh_vset with gh_vector_set_x, gh_list_length with gh_length,
4287 scm_make_vector with gh_make_vector.
4288 * cos.scm: Use vector-length instead of length on vectors.
4289 * dev.scm (cload): Make varargs proc with keyword/value args.
4290 * hobscmif.h: Include config.h, cgen-gh.h. Undef make_vector and
4291 provide version that works with guile 1.2 or 1.3.
4292 Include private copy of scmhob.h.
4293 * scmhob.h: New file. Keep our own copy for now.
4295 Tue Mar 16 13:22:01 1999 Doug Evans <devans@canuck.cygnus.com>
4297 * rtl.scm (-rtx-traverse-error): Ensure expression is output in
4299 (-rtx-traverse-operands): Dump cx temp stack if debugging.
4300 (-cx-temp-dump-stack): Pretty up output.
4302 * arm.cpu: comment out thumb.cpu until isa support ready.
4303 * arm7.cpu (bl): Replace lr with (reg h-gr 14).
4304 (f-imm12,f-offset24,swi,undef): Fix thinko, add `const'.
4305 * thumb.cpu (h-gr-t,h-lr-t,h-sp-t,dnti,h-hiregs): s/MACH/ISA/.
4307 * sid-decode.scm (cgen-decode.c): Call rtl-gen-init!.
4309 1999-03-11 Doug Evans <devans@casey.cygnus.com>
4311 * hardware.scm (<hw-immediate>,mode-ok?): Ensure result is boolean.
4312 (<hw-address>,mode-ok?): unsigned/signed are compatible.
4314 * operand (op:new-mode): Improve error message.
4316 * arm.cpu: Move arm isa into arm7.cpu. Include arm7.cpu, thumb.cpu.
4317 * arm7.cpu: New file.
4319 1999-03-12 Ben Elliston <bje@cygnus.com>
4321 * arm.cpu: Lots of minor fixes after desk checking.
4323 1999-03-11 Doug Evans <devans@casey.cygnus.com>
4325 * thumb.cpu: snapshot of current work
4327 * rtl.scm (rtx-get): Tweak error message.
4329 1999-03-10 Doug Evans <devans@casey.cygnus.com>
4331 * Makefile.am (cos.o,cgen.o,cgen-gh.o): Fix dependencies.
4332 * Makefile.in: Rebuild.
4334 * cos.c (cos_vector_copy): New function.
4335 (_object_copy): Use it.
4337 * mode.scm (mode:eq?): Clean up.
4338 * rtl.scm (cx-new-mode): Copy attributes.
4339 (rtx-get): Don't make copy if <c-expr> with identical mode.
4341 * fr30.cpu (define-arch): Delete default-insn-word-bitsize,
4343 (gr-names): h-gr register names moved here.
4345 (cr-names): h-cr register names moved here.
4347 (dr-names): h-dr register names moved here.
4349 (h-ps): Replace FUN-ACCESS attribute with get/set specs.
4350 (h-sbit,h-ccr,h-scr,h-ilm): Ditto.
4351 * i960.cpu (define-arch): Delete default-insn-word-bitsize,
4353 * m32r.cpu (define-arch): Delete default-insn-word-bitsize,
4355 (gr-names): h-gr register names moved here.
4357 (cr-names): h-cr register names moved here.
4359 (h-accum): Replace FUN-ACCESS attribute with get/set specs.
4360 (h-accums,h-psw): Ditto.
4361 * sparc.cpu (define-arch): Delete default-insn-word-bitsize,
4363 (gr-names): h-gr register names moved here.
4364 (h-gr-indices): Delete.
4365 (sparc32 h-gr): Update. Replace FUN-ACCESS with get/set specs.
4366 (sparc64 h-gr): Ditto.
4367 (h-y): Add get/set specs.
4369 (fp operands): Rewrite.
4370 * sparc32.cpu (h-psr): Replace FUN-ACCESS with get/set specs.
4371 (h-tbr,h-cwp,h-wim): Ditto.
4372 * sparc64.cpu (h-fpsr): Add get/set specs.
4373 * sparccom.cpu (ldd-reg+reg): Load value all at once.
4374 (fp-ld-op): New arg `dest', all callers updated.
4375 (*): Replace `make-di' with `join'.
4377 * sid-cpu.scm (-gen-cpu-reg-access-defns): Use get/set specs if
4379 (gen-semantic-code): Save/restore rtl generator state.
4380 (cgen-cpu.h): Call rtl-gen-init!.
4381 * sid.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
4382 (-gen-ifld-extract-beyond): Ditto.
4383 (<multi-ifield>,gen-ifld-extract): Ditto.
4384 (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
4386 (-hw-gen-set-quiet-pc): Ditto.
4387 (<hw-pc>,gen-write): Ditto.
4388 (-hw-cxmake-get): Ditto. Call getter function if present.
4389 (<hw-register>,cxmake-get-raw): New method.
4390 (<hw-register>,gen-set-quiet-raw): New method.
4391 (-hw-gen-set-quiet): New arg `gstate'.
4392 (hw-fun-access?): Delete.
4393 (gen-reg-access-defn): Output function contents.
4394 (-gen-hw-index-raw): Update call to rtx-c. Update cxmake-get
4396 (-gen-hw-index): Ditto.
4397 (op:read): Update gen-read invocation.
4398 (op:write): Update gen-write invocation.
4399 (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Handle raw-reg
4401 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
4402 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
4403 (<unit>,gen-profile-code): Update to sim.scm version.
4405 * sim-arch.scm (-regs-for-access-fns): New proc.
4406 (-biggest-reg-mode): New proc.
4407 (-gen-arch-reg-access-decls,-gen-arch-reg-access-defns): Rewrite.
4408 * sim-cpu.scm (-gen-hardware-types): Output get/set handlers for
4409 virtual regs separately.
4410 (-gen-cpu-reg-access-defns): Replace fun-access? with new
4412 (gen-semantic-code): Save/restore rtl generator state.
4413 (cgen-cpu.h): Call rtl-gen-init!.
4414 (cgen-cpu.c): Ditto. #include cgen-ops.h.
4415 * sim-model.scm: mach:cpu renamed to mach-cpu. mach:bfd-name
4416 renamed to mach-bfd-name.
4417 * sim.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
4418 (-gen-ifld-extract-beyond): Ditto.
4419 (<multi-ifield>,gen-ifld-extract): Ditto.
4420 (<scalar>,gen-sym-get-macro): Update call to gen-get-macro.
4421 (<scalar>,gen-sym-set-macro): Update call to gen-set-macro.
4422 (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
4424 (hw-fun-access?): Delete.
4425 (-hw-gen-set-quiet-pc): New arg `gstate'.
4426 (<hw-register>,gen-get-macro): Rewrite.
4427 (<hw-register>,gen-set-macro): Rewrite.
4428 (-hw-gen-fun-get,-hw-gen-fun-set): Delete.
4429 (-hw-cxmake-get): New arg `gstate'. Rewrite.
4430 (<hw-register>,cxmake-get-raw): New method.
4431 (-hw-gen-set-quiet): New arg `gstate'. Rewrite.
4432 (<hw-register>,gen-set-quiet-raw): New method.
4433 (-gen-hw-index-raw): Update call to rtx-c. Update cxmake-get
4435 (-gen-hw-index): Ditto.
4436 (<hw-index>): New arg `gstate'.
4437 (-gen-hw-selector): Update call to rtx-c.
4438 (<pc>): New arg `gstate'.
4439 (op:read): Update gen-read invocation.
4440 (op:write): Update gen-write invocation.
4441 (<operand>,cxmake-get): Handle raw-reg.
4442 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
4443 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
4444 (<operand>,gen-set-quiet): Handle raw-reg.
4445 (<operand>,gen-set-trace): Handle raw-reg.
4446 (-gen-mach-data): mach:cpu renamed to mach-cpu.
4448 * desc-cpu.scm (gen-operand-decls): Take nub of operands for
4449 cgen_operand_type enum.
4450 (gen-operand-table): Add operand type enum. Replace pointer to
4451 hardware element with its enum. Null terminate table.
4452 (-gen-cpu-open): Add new `isa' argument to @arch@_cgen_cpu_open.
4453 Build operand table.
4454 * ifield.scm (-ifield-parse): Recognize ISA attribute.
4455 * mach.scm (<arch-data>): New member `isas'.
4456 (adata-isas): New accessor.
4458 (isa-default-insn-word-bitsize): New accessor.
4459 (isa-enum): New proc.
4460 (current-arch-default-insn-word-bitsize): Delete.
4461 (current-isa-list,current-isa-lookup): New procs.
4462 (-arch-parse-isa): New proc.
4463 (-arch-parse): Rewrite.
4464 (-arch-read): Recognize `isas'. Delete `default-insn-word-bitsize'.
4465 (define-arch): Define ISA attribute.
4466 (def-isa-attr!,isa-supports?): New procs.
4467 (<mach>): New member `isas'.
4468 (mach-isas): New accessor.
4469 (-mach-parse): New arg `isas', all callers updated.
4470 (-mach-read): Recognize `isas'.
4471 (arch-finish!): Rewrite.
4472 * opc-ibld.scm (-gen-fget-switch): Add `cd' arg to
4473 @arch@_cgen_get_{int,vma}_operand.
4474 (-gen-fset-switch): Add `cd' arg to @arch@_cgen_set_{int,vma}_operand.
4475 * opc-opinst.scm (-gen-operand-instance): Output operand enum instead
4476 of pointer to table entry.
4477 * opcodes.scm (gen-switch): Handle multiply defined operands.
4478 * operand.scm (op-sort): New proc.
4480 * hardware.scm (<hardware-base>): Rename getters/setters to get/set.
4481 (hw-getter,hw-setter): Renamed from hw-getters,hw-setter.
4482 (hw-enum): Accept symbol argument.
4483 (hardware-builtin!): Delete attribute FUN-ACCESS.
4484 * ifield.scm (ifld-encode-mode,ifld-decode-mode): New procs.
4486 * attr.scm (atlist-source-form): New proc.
4487 (attr-builtin!): New attr `PRIVATE'.
4488 * desc.scm (<keyword>,gen-defn): Make keyword entry table static.
4489 * desc-cpu.scm (-gen-hw-defn): Only output index and value tables
4490 if they have `PRIVATE' attribute.
4491 (gen-hw-table-defns): Output definitions of explicitly defined
4493 * hardware.scm (<keyword>): New member print-name. Rename member
4494 `value' to `values', all uses updated.
4495 (kw-mode,kw-print-name,kw-prefix,kw-values): New procs.
4496 (keyword-parse): Rewrite.
4497 (-keyword-read): New proc.
4498 (define-keyword): New proc.
4499 (-hw-parse-keyword): New proc.
4500 (-hw-parse-indices): Rewrite keyword handling, support new index spec
4502 (-hw-parse-values): Ditto.
4503 (-hw-parse-get,-hw-parse-set): Rewrite.
4504 (hardware-init!): Add new comment define-keyword.
4505 * mach.scm (<arch>): New member `kw-list'.
4506 (arch:kw-list,arch_set-kw-list!): New accessors.
4507 (current-kw-list,current-kw-add!,current-kw-lookup): New procs.
4509 * hardware.scm (<hw-register>,mode-ok?): Rewrite.
4510 * mode.scm (mode-class-integral?): New proc.
4511 (mode-class-float?,mode-class-numeric?): New procs.
4512 (mode-integral?,mode-float?,mode-numeric?): New procs.
4513 (mode-compatible?): New proc.
4514 * opcodes.scm (<ifield>,gen-insert): Update alist arg to
4516 (<ifield>,gen-extract): Ditto.
4517 * rtl.scm (-rtl-simulator?,-rtx-current-obj): Delete.
4518 (<gstate>): New class.
4519 (gstate-simulator?,gstate-set-simulator?!): New accessors.
4520 (gstate-context,gstate-set-context!): New accessors.
4521 (gstate-macro?,gstate-set-macro?!): New accessors.
4522 (gstate-make,gstate-copy): New procs.
4523 (-rtl-current-gstate): New global.
4524 (current-gstate-simulator?): New proc.
4525 (current-gstate-context,current-gstate-macro?): New procs.
4526 (current-gstate,current-gstate-set!): New procs.
4527 (rtl-gen-init!): Rewrite.
4528 (-rtx-valid-types): Add INTMODE, FLOATMODE, NUMMODE.
4529 (tstate-make): New arg `gstate', all callers updated.
4530 (tstate-set-expr-fn!,tstate-set-op-fn!): New accessors.
4531 (tstate-set-cond?!,tstate-set?,tstate-set-set?!): New accessors.
4532 (tstate-gstate,tstate-set-gstate!): New accessors.
4533 (tstate-copy): New proc.
4534 (tstate-new-cond?,tstate-new-set?): Rewrite.
4535 (-rtx-traverse-operands): Handle INTMODE, FLOATMODE, NUMMODE.
4536 (rtx-traverse): New arg `gstate', all callers updated.
4537 (rtx-strdump): New proc.
4538 (-simplify-for-compilation): New arg `gstate', all callers updated.
4539 (semantic-in-out-operands): Ditto.
4540 (semantic-attrs): Ditto.
4541 (rtx-eval): Rewrite. New arg `gstate', all callers updated.
4542 (rtx-eval-with-temps,rtx-eval-with-alist): Ditto.
4543 (rtx-value): Rewrite.
4544 (<c-expr>,gen-name): New method.
4545 (<c-expr>,gen-set-quiet): New arg `gstate', all callers updated.
4546 (<c-expr>,gen-set-trace): New arg `gstate', all callers updated.
4547 (cx-new-mode): New proc.
4548 (-rtx-c-with-tstate): New proc.
4549 (rtx-c,rtx-c-with-temps,rtx-c-with-alist): New arg `gstate', all
4551 (-rtx-mode): Rewrite.
4552 (-rtx-mode-compatible?): New proc.
4553 (<c-expr-temp>): New member `value'.
4554 (cx-temp:value): New accessor.
4555 (<c-expr-temp>,make!): Override default method.
4556 (<c-expr-temp>,cxmake-get): Rewrite.
4557 (<c-expr-temp>,gen-set-quiet): Rewrite.
4558 (<c-expr-temp>,gen-set-trace): Rewrite.
4559 (gen-temp-defs): Use cx-temp:value.
4560 (record-temp!): New arg value, all callers updated.
4561 (cx-temp:cx:make): Delete.
4562 (-cx-temp-dump-stack): New proc.
4563 (rtx-get): New arg `gstate', all callers updated. Do mode
4564 compatibility checks. Ensure result has specified mode.
4565 (rtx-set-quiet): New arg `gstate', all callers updated.
4566 (rtx-set-trace): Ditto.
4567 (s-c-call): New arg `tstate', all callers updated.
4568 (s-c-raw-call): Ditto.
4569 (s-unop,s-binop,s-binop-with-with,s-shop,s-boolifop,s-convop): Ditto.
4570 (s-cmpop,s-if,e-if): Ditto.
4571 (s-subreg): New proc.
4572 (-par-new-temp!): New proc.
4573 (-par-next-temp!): Rewrite.
4574 (-par-replace-set-dests): Use -par-new-temp!.
4575 (s-parallel): Rewrite temp handling. Use -rtx-c-with-state.
4576 (s-sequence): Use -rtx-c-with-state.
4577 * rtx-funcs.scm (*): Update.
4578 (raw-reg:): New rtx function.
4580 (join:,subreg:): New rtx functions.
4582 * insn.scm (<insn>): New members pre-cond-trap, condition,
4583 post-cond-trap, compiled-condition.
4585 * insn.scm (syntax-break-out): Replace eval with current-op-lookup.
4587 * opcodes.scm (<pc>,cxmake-get): New arg `selector'.
4589 * utils-cgen.scm (parse-symbol): New proc.
4590 (parse-string): New proc.
4591 (gen-get-macro,gen-set-macro): New arg `index-args'.
4592 (gen-set-macro2): Ditto. Enclose code in do { } while (0).
4593 Prepend \ to newlines.
4595 * utils.scm (alist-remove-duplicates): Delete.
4597 * sid.scm (sim-init!): Delete private debugging code.
4599 1999-03-10 Frank Ch. Eigler <fche@cygnus.com>
4601 * cgen-sid.scm: New file for C++ simulator application.
4602 * sid-arch.scm: Ditto.
4603 * sid-cpu.scm: Ditto.
4604 * sid-decode.scm: Ditto.
4605 * sid-model.scm: Ditto.
4607 * utils-cgen.scm (gen-mach-sid-name): Remove this accident.
4609 1999-03-05 Ben Elliston <bje@cygnus.com>
4611 * arm.cpu: New file.
4613 1999-03-03 Doug Evans <devans@casey.cygnus.com>
4615 * Makefile.am (CGEN_HOB_INPUT_FILES): Add hardware.scm.
4616 * Makefile.in: Rebuild.
4618 * attr.scm (<integer-attribute>,parse-value-def): Tweak.
4619 (-attr-parse): Validate default value.
4621 * read.scm (-CGEN-VERSION): Change to 0.7.1.
4622 (-CGEN-LANG-VERSION): Ditto.
4623 (-keep-all-machs): Renamed from -keep-all, all uses updated.
4624 (<reader>): New member keep-isa plus accessors.
4625 (-keep-isa-set!,keep-isa-validate!): New procs.
4626 (keep-isa?,keep-isa-atlist?,keep-isa-obj?): New procs.
4627 (common-arguments): New variable.
4628 (cgen-usage,getarg,catch-with-backtrace,option-arg): New procs.
4629 (-debug-repl,continue): New procs.
4630 (-cgen,cgen): New procs.
4631 * cgen-gas.scm: Rewrite.
4632 * cgen-opc.scm: Rewrite.
4633 * cgen-sim.scm: Rewrite.
4634 * cgen-stest.scm: Rewrite.
4636 * gas-test.scm (gas-test-init!): Call opcodes-init!.
4637 (gas-test-finish!): Call opcodes-finish!.
4638 (gas-test-analyze!): Call opcodes-analyze!.
4639 (<hw-asm>): New method test-data.
4640 (<operand>,testdata): Rewrite.
4641 * sim-test.scm (sim-test-init!): Call opcodes-init!.
4642 (sim-test-finish!): Call opcodes-finish!.
4643 (sim-test-analyze!): Call opcodes-analyze!.
4644 (<hw-asm>): New method test-data.
4645 (<operand>,testdata): Rewrite.
4647 1999-03-01 Doug Evans <devans@casey.cygnus.com>
4649 * fixup.scm (reverse!): Define if missing.
4650 * *.scm: Use reverse! instead of list-reverse!.
4652 * utils.scm (leading-id-char?): New proc.
4653 (id-char?): Rewrite.
4654 (chars-until-delimiter): New proc.
4655 * opc-itab.scm (extract-syntax-operands): Rewrite.
4656 (strip-mnemonic): Rewrite.
4657 (compute-syntax): Rewrite.
4659 * pmacros.scm (-pmacro-substr): New proc.
4660 (pmacros-init!): Add builtin .substr.
4662 1999-02-26 Doug Evans <devans@casey.cygnus.com>
4664 * thumb.cpu: New file.
4666 1999-02-24 Doug Evans <devans@casey.cygnus.com>
4668 * Makefile.am (CGENCFLAGS): New variable.
4669 (WITH_HOBBIT): Use automake conditional.
4670 (CGEN_HOB_SRC): New variable.
4671 (libcpu_a_SOURCES): Use $(CGEN_HOB_SRC).
4672 (*.o): Compile with CGENCFLAGS.
4673 (cgen-hob.c): Simplify.
4674 (cgen-nohob.c): New rule.
4675 (hobbit): Renamed from hob.x.
4676 (CLEANFILES): Add cgen-nohob.c.
4677 * Makefile.in: Rebuild.
4678 * doc/Makefile.in: Rebuild.
4679 * configure.in (AM_INIT_AUTOMAKE): Update CGEN version to 0.7.1.
4680 (WITH_HOBBIT): Use AM_CONDITIONAL.
4681 * configure: Rebuild.
4682 * aclocal.m4: Rebuild.
4684 * sim-arch.scm (-gen-arch-reg-access-defns): Replace string-map
4685 with string-write-map.
4687 * sim-cpu.scm (hw-need-storage?): New proc.
4688 (-gen-hardware-types): Use it.
4689 (gen-parallel-exec-elm): Call op-save-index?.
4691 * sim-decode.scm (cgen-decode.c): Call rtl-gen-init!.
4693 * sim.scm (-gen-ifld-extract-base): Use mode:class instead of
4695 (-gen-ifld-extract-beyond): Ditto.
4696 (<integer>): Delete all references.
4697 (<sim-hardware>): Delete.
4698 (hw-profilable?): New proc.
4699 (<hardware-base>): New methods gen-get-macro,gen-set-macro.
4700 (<hw-register>): Rename method get-index-mode to save-index?.
4701 (<hw-register>): New methods gen-get-macro,gen-set-macro.
4702 (<hw-register>,gen-sym-decl): Make virtual.
4703 (<hw-memory>,gen-sym-decl): Make virtual.
4704 (<hw-memory>): Rename method get-index-mode to save-index?.
4705 (<hw-address>,gen-sym-decl): Make virtual.
4706 (<operand>): New method save-index?.
4707 (sim-init!): Delete calls to sim-hw-init!,sim-hw-init-parsers!.
4709 * opc-itab.scm (opc-{parse,insert,extract,print}-handlers): opc-
4710 prefix added. All uses updated.
4712 * opc-opinst.scm (-gen-operand-instance): Output hw enum value
4713 rather than pointer to table entry.
4715 * opcodes.scm: Remove all attribute support, lives in desc.scm.
4716 Remove all hw-asm,op-asm support.
4717 (-gen-parse-number,-gen-parse-address): New procs.
4718 (<keyword>,gen-parse): Redo function name computation.
4719 (<keyword>,gen-print): Ditto.
4720 (<operand>,gen-function-name): Rewrite.
4721 (<operand>,gen-fget,gen-fset,gen-parse,gen-print): Ditto.
4722 (opcodes-init!): Delete call to add-parser!.
4724 * desc-cpu.scm (gen-hw-decls): Rename enum hw_type to cgen_hw_type.
4725 Define enum using hardware semantic name.
4726 (-gen-hw-decl,-gen-hw-defn): New procs.
4727 (gen-hw-table-decls): Use -gen-hw-decl.
4728 (gen-hw-table-defns): Use -gen-hw-defn. Rewrite generation of
4729 CGEN_HW_ENTRY structs.
4730 (gen-operand-table): Output hw's enum, not pointer to table entry.
4731 (-gen-cpu-open): Build table of selected hardware elements.
4733 * desc.scm (-hw-asm-specs,-parse-hw-asm): Delete.
4734 (<hardware> support): Delete.
4735 (<hw-asm>): Delete, moved to hardware.scm.
4736 (normal-hw-asm,hw-asm:parse,hw-asm:print): Delete.
4737 (<hw-asm>,gen-table-entry): New method.
4738 (<hw-asm>,parse!): Delete.
4739 (<keyword>,gen-table-entry): New method.
4740 (<keyword>,parse!): Delete.
4741 (<hw-{register,memory,immediate,address}>): Delete forwarding methods
4742 for gen-decl,gen-defn,gen-ref,gen-init.
4743 (desc-init!): Don't create parser for operand asm specs.
4745 * attr.scm (attr-builtin!): Delete UNSIGNED attribute.
4746 * ifield.scm (<ifield>): New member `mode'.
4747 (<ifield>,make!): New arg `mode'.
4748 (ifld-mode): Rewrite.
4749 (ifld-hw-type): Rewrite.
4750 (<ifield>,min-value): Rewrite.
4751 (<ifield>,max-value): Rewrite.
4752 (-ifield-parse): New arg `mode'.
4753 (-ifield-read): Update.
4754 (define-full-ifield): New arg `mode'.
4755 (define-full-multi-ifield): Ditto.
4756 (-multi-ifield-parse): Ditto.
4757 (-multi-ifield-read): Update.
4758 (define-full-multi-ifield): New arg `mode'.
4759 (ifield-builtin!): Update definition of f-nil.
4760 * simplify.inc (define-normal-ifield): Update call to
4762 (define-normal-multi-ifield): Update call to define-full-multi-ifield.
4763 (define-normal-hardware): Delete arg asm. New args indices, values,
4764 handlers. Update call to define-full-hardware.
4765 (define-simple-hardware,dsh): New pmacros.
4766 (define-normal-operand): Update call to define-full-operand.
4767 * fr30.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
4768 Specify INT/UINT mode instead.
4769 (h-gr,h-cr): Use "indices" instead of "asm".
4770 (h-dr,h-ps): Update keyword syntax.
4771 (h-r13,h-r14,h-r15): Ditto.
4772 (h-nbit,h-zbit,h-vbit,h-cbit): Use dsh instead of dnh.
4773 (h-d0bit,h-d1bit,h-ibit,h-sbit,h-tbit,h-ccr,h-scr,h-ilm): Ditto.
4774 (m4): Fix typo on HASH-PREFIX. Use "handlers" instead of "asm".
4775 (reglist_low_ld,reglist_hi_ld,reglist_low_st,reglist_hi_st): Ditto.
4776 * i960.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
4777 Specify INT/UINT mode instead.
4778 (h-gr): Use "indices" instead of "asm".
4779 (h-cc): Update keyword syntax.
4780 * m32r.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
4781 Specify INT/UINT mode instead.
4782 (h-hi16,h-slo16,h-ulo16): Update.
4783 (h-gr,h-cr): Use "indices" instead of "asm".
4784 (h-accum,h-cond,h-psw,h-bpsw,h-bbpsw,h-lock): Use dsh instead of dnh.
4785 (h-accums): Update keyword syntax.
4786 (hash,hi16,slo16,ulo16): Use "indices" instead of "asm".
4787 * sparc.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
4788 Specify INT/UINT mode instead.
4789 (h-gr-indices): New pmacro.
4790 (h-gr32,h-gr64): Split up from h-gr.
4791 (h-a): Update type spec. Use values instead of asm spec.
4792 (h-icc-[cnvz],h-xcc-[cnvz]): Use dsh instead of dnh.
4793 (h-y,h-annul-p): Ditto.
4794 (h-asr): Update keyword spec.
4795 (h-lo10,h-lo13,h-hi22): Update.
4796 (get-freg-spec,set-freg-spec): New pmacros.
4797 (h-fr32,h-fr64): Split up from h-fr.
4798 (rdd): Comment out get/set specs.
4799 (lo10,lo13,hi22): Use "handlers" instead of "asm".
4800 * sparc32.cpu (h-psr): Use dsh instead of dnh.
4801 (h-s,h-ps,h-pil,h-et,h-tbr,h-cwp,h-ag,h-ec,h-ef,h-fsr): Ditto.
4802 * sparc64.cpu (f-*): Delete UNSIGNED attribute. Default is now
4803 UNSIGNED. Specify INT/UINT mode instead.
4804 (h-*): Use dsh instead of dnh where appropriate.
4805 (h-ixcc): Update type spec. Use "values" instead of "asm".
4806 (h-p,h-membarmask): Ditto.
4807 (membarmask): Use "handlers" instead of "asm".
4809 * hardware.scm (<hardware-base>): New member sem-name,type,indices,
4810 values,handlers,getters,setters plus accessors.
4811 (hw-mode-ok?,hw-default-mode): New procs.
4812 (<hardware-base>): Rename method new-mode to mode-ok?
4813 (<hardware-base>): New method get-index-mode.
4814 (hw-index-mode): New proc.
4815 (pc?): Delete, moved to operand.scm.
4816 (address?): New proc.
4817 (<hardware>): Delete.
4818 (<hw-asm>): Definition moved here from desc.scm.
4819 (keyword-parse): New proc.
4820 (hardware-parsers): Delete.
4821 (-parse-hw-type,-parse-hw-asm,-parse-hw-profile): Delete.
4822 (-hw-parse-indices,-hw-parse-values,-hw-parse-handlers): New procs.
4823 (-hw-parse-get,-hw-parse-set): New procs.
4824 (-hw-parse): Delete args aasm,profile,extra. New args semantic-name,
4825 indices,values,handlers,get,set. Rewrite.
4826 (-hw-read-extra): Delete.
4828 (define-hardware): Don't add object if not selected.
4829 (define-full-hardware): Ditto.
4830 (current-hw-sem-lookup,current-hw-sem-lookup-1): New procs.
4831 (<hw-register>): Member `type' moved to baseclass. Delete member
4833 (<hw-register>,parse!): Rewrite.
4834 (<hw-register>): Delete methods get-rank,get-mode.
4835 (<hw-register>): Method new-mode renamed to mode-ok?
4836 (<hw-register>): New method get-index-mode.
4837 (<hw-pc>,parse!): Rewrite.
4838 (<hw-memory>): Member `type' moved to baseclass. Delete member hw-asm.
4839 (<hw-memory>,parse!): Rewrite.
4840 (<hw-memory>): Delete methods get-rank,get-mode.
4841 (<hw-memory>): Method new-mode renamed to mode-ok?
4842 (<hw-memory>): New method get-index-mode.
4843 (<hw-immediate>): Member `type' moved to baseclass. Delete member
4845 (<hw-immediate>,parse!): Rewrite.
4846 (<hw-immediate>): Delete methods get-rank,get-mode.
4847 (<hw-immediate>): Method new-mode renamed to mode-ok?
4848 (<hw-address>): Delete member hw-asm.
4849 (<hw-address>,parse!): Rewrite.
4850 (<hw-address>): Delete methods get-rank,get-mode.
4851 (<hw-address>): Method new-mode renamed to mode-ok?
4852 (hw-profilable?): Delete.
4853 (hardware-init!): Delete hardware-parsers reference.
4854 Update argument specs of command define-full-hardware.
4855 (hardware-builtin!): Update definitions of hardware builtins.
4856 * operand.scm (<operand>): New members hw-name,mode-name.
4857 Delete member op-asm. New member handlers.
4858 (<operand>,make!): Update.
4859 (op:hw-name,op:mode-name,op:handlers): New procs.
4862 (<operand>): New method get-index-mode.
4863 (<pc>,make!): Update.
4864 (op:new-mode): Rewrite.
4865 (operand-parsers): Delete.
4866 (-operand-parse): Rewrite. Return #f if insn not selected.
4867 (-op-read-extra): Delete.
4868 (-operand-read): Update.
4869 (define-operand,define-full-operand): Update.
4870 (operand-init!): Delete operand-parsers reference.
4871 Update syntax of define-full-operand command.
4873 * insn.scm (-insn-parse): Rewrite. Return #f if insn not selected.
4874 (define-full-insn): Update.
4875 * minsn.scm (-minsn-parse): Rewrite. Return #f if insn not selected.
4876 (define-full-minsn): Update.
4878 * mode.scm (<mode>): New member class.
4879 (mode:class): New proc.
4881 (-mode-parse): New arg class.
4882 (define-full-mode): Update.
4883 (mode-find): Rewrite.
4884 (mode-make-int,mode-make-uint): New procs.
4885 (mode-init!): Update syntax of define-full-mode command.
4886 (mode-builtin!): Update definitions of builtin modes.
4888 * model.scm (<profile>): Delete.
4890 * read.scm (keep-atlist?): New proc.
4891 (keep-multiple?): New proc.
4892 (<parser-list>): Delete.
4893 (add-parser!,parse-spec!): Delete.
4895 * rtl.scm (def-rtx-node): Prepend arg *tstate* to all handlers.
4896 (def-rtx-syntax-node): Ditto.
4897 (-rtx-traverse-debug?): New variable.
4898 (tstate-make): New proc.
4899 (tstate-expr-fn,tstate-op-fn,tstate-cond?,tstate-set?): New procs.
4900 (tstate-new-cond?,tstate-new-set?): New procs.
4901 (-rtx-traverse-normal): Delete args cond?,expr-fn,op-fn. New arg
4902 tstate. All callers updated.
4903 (-rtx-traverse-expr,-rtx-traverse-debug): Ditto.
4904 (-rtx-traverse-list,-rtx-traverse-operands): Ditto.
4905 (-build-operand!): Replace arg cond? with tstate.
4906 (-build-reg-operand!,-build-mem-operand!): Ditto.
4907 (-build-index-of-operand!): Update making of <operand> object.
4908 (s-ifield): New arg tstate. All callers updated.
4909 (hw:): New arg tstate. All callers updated. Replace call to
4910 current-hw-lookup with current-hw-sem-lookup-1.
4911 (s-index-of): New arg tstate. All callers updated.
4913 (-rtx-use-sem-fn?): New proc.
4914 (s-unop,s-binop,s-shop): Use it. Only use semantic mode when using
4916 (s-convop): Only use semantic mode when using semantic cover fns.
4917 (s-cmpop): Call -rtx-use-sem-fn?.
4918 (s-cond,s-case): New arg tstate. All callers updated.
4919 (s-parallel,s-sequence): Ditto.
4921 * rtx-funcs.scm (set,set-quiet:): Use SETRTX to mark the set dest.
4923 * types.scm (<scalar>): Rewrite implementation.
4924 (<integer>): Delete.
4925 (parse-type): Rewrite.
4927 * utils-cgen.scm (parse-handlers): New proc.
4929 * utils.scm (!=): New proc.
4931 Tue Feb 23 12:10:29 1999 Doug Evans <devans@canuck.cygnus.com>
4933 * pmacros.scm (-pmacro-expand): Fix typo.
4935 1999-02-12 Doug Evans <devans@casey.cygnus.com>
4937 * pmacros.scm (-pmacro-hex,-pmacro-upcase,-pmacro-downcase): New procs.
4938 (pmacros-init!): Install builtins .hex, .upcase, .downcase.
4939 * i960.cpu (build-hex2): New pmacro.
4940 (insn-opcode): Simplify.
4941 (insn-opcode2): Ditto.
4943 * cgen-sim.scm (catch-with-backtrace): Comment out debugging printf.
4944 * cgen-stest.scm (catch-with-backtrace): Ditto.
4946 1999-02-11 Doug Evans <devans@casey.cygnus.com>
4948 * pmacros.scm (-pmacro-lookup): Renamed from -pmacro-ref.
4949 All callers updated.
4950 (-pmacro-invoke): New proc.
4951 (-pmacro-sym,-pmacro-str): New procs.
4952 (-pmacro-iota,-pmacro-map,-pmacro-apply): New procs.
4953 (pmacros-init!): Install builtins .iota, .map, .apply.
4954 * sparc.cpu (cc-tests): Add CC_NZ,CC_Z,CC_GEU,CC_LU aliases.
4955 (h-fr): Simplify register name spec.
4956 * sparc64.cpu (cond-move-1): New arg mnemonic. All callers updated.
4957 * utils.scm (num-args-ok?): New proc.
4959 1999-02-10 Doug Evans <devans@casey.cygnus.com>
4961 * pmacros.scm (-pmacro-error): New proc.
4962 (-pmacro-expand): Use it.
4963 (-pmacro-splice): New proc.
4964 (pmacros-init!): Install new builtin .splice.
4966 * sparc.cpu: Include sparc64.cpu when appropriate.
4967 (f-mmask,f-simm11): Moved to sparc64.cpu.
4968 (insn-fmt2): Add FLUSH,FLUSHW,IMPDEP1,IMPDEP2,MEMBAR,MOVCC.
4969 (ANNUL attribute): Delete.
4970 (test-* pmacros): New arg cc, all callers updated.
4971 (uncond-br-sem,cond-br-sem): New arg cc, all callers updated.
4972 * sparc32.cpu (atom-op): Moved to sparccom.cpu and renamed to
4974 (ldstub,swap): Moved to sparccom.cpu.
4975 * sparc64.cpu: Add more insns.
4977 1999-02-09 Doug Evans <devans@casey.cygnus.com>
4979 * sim-cpu.scm (cgen-semantics.c): Replace CGEN_INSN_ATTR with
4981 (cgen-sem-switch.c): Ditto.
4982 * sim-decode.scm (-gen-idesc-decls): struct idesc definition
4983 moved to cgen-engine.h.
4984 (-gen-insn-sem-type): Delete, struct insn_sem mvoed to cgen-engine.h.
4985 (-gen-idesc-init-fn,init_idesc): Lookup insn table via descriptor, not
4986 global. Cache attributes and insn length in IDESC.
4987 * sim-model.scm (-gen-cpu-defns): Generate new func @cpu@_prepare_run.
4988 @cpu@_opcode renamed to @cpu@_get_idata.
4989 (-gen-mach-defns,@mach@_init_cpu): Don't initialize IDESC table here,
4990 done later underneath sim_resume.
4991 (@mach@_mach): Record @cpu@_prepare_run.
4992 * sim.scm (<hardware-base>,cxmake-get): New arg selector, all callers
4994 (-hw-gen-set-quiet-pc): Ditto.
4995 (-hw-cxmake-get,-hw-gen-set-quiet): Ditto.
4996 (<hw-memory>,cxmake-get,gen-set-quiet): Ditto.
4997 (<hw-addr>,cxmake-get): Ditto.
4998 (<hw-iaddr>,cxmake-get): Ditto.
4999 (<pc>,cxmake-get): Ditto.
5000 (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Ditto.
5001 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): Ditto.
5002 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
5003 (<hw-pc>,gen-write): Use hw-selector-default.
5004 (<hw-register>,gen-write): Ditto.
5005 (<hw-memory>,gen-write): Ditto.
5006 (-gen-hw-index-raw,-gen-hw-index): Handle selector.
5007 (-gen-hw-selector): New proc.
5009 * desc.scm: New file.
5010 * desc-cpu.scm: New file.
5011 * opcodes.scm: Split up into several smaller files.
5012 * opc-asmdis.scm: New file.
5013 * opc-ibld.scm: New file.
5014 * opc-itab.scm: New file.
5015 * opc-opinst.scm: New file.
5016 * Makefile.am (desc): New target.
5017 (opcodes): Update args to cgen-opc.scm.
5018 * Makefile.in: Rebuild.
5019 * aclocal.m4: Rebuild.
5020 * config.in: Rebuild.
5021 * configure.in: Update arg to AC_INIT.
5022 Update version number to 0.7.0. Change AM_EXEEXT to AC_EXEEXT.
5023 Update AC_PREREG arg to 2.13. Change AM_PROG_INSTALL to
5025 * configure: Rebuild.
5026 * cgen-gas.scm: Update files to load.
5027 * cgen-opc.scm: Ditto. Reorganize option letters.
5028 * cgen-sim.scm: Update files to load.
5029 * cgen-stest.scm: Ditto.
5030 * dev.scm (cload): New app "DESC".
5031 (load-opc): Update files to load.
5032 (load-gtest,load-sim,load-stest): Ditto.
5034 * attr.scm (bool-attr?): New proc.
5035 (attr-list-enum-list): New proc.
5036 (-attr-sort): Rewrite.
5037 (attr-builtin!): Give ALIAS attribute a fixed index.
5038 * utils-cgen.scm (gen-attr-enum-decl): Call attr-list-enum-list to
5039 calculate attribute enum list.
5040 (gen-attr-mask): Subtract CGEN_ATTR_BOOL_OFFSET from attribute's enum.
5042 * insn.scm (-insn-parse): Renamed from parse-insn.
5044 * hardware.scm (-hw-parse): New arg errtxt, all callers updated.
5047 * mode.scm (-mode-parse): Renamed from parse-mode.
5049 * operand.scm (<operand>): New member `selector'.
5050 (<operand>,make!): Use default selector.
5051 (hw-selector-default): New variable.
5052 (hw-selector-default?): New proc.
5054 * pmacros.scm (pmacros-init!): New proc.
5055 (-pmacro-{make,name,arg-spec,transformer,comment}): New procs.
5056 (-env-set!): Delete.
5057 (-pmacro-expand): New proc apply-macro.
5058 Use it in scan-list,scan. Scan list first, then see if macro
5060 (define-pmacro): Rewrite.
5061 * read.scm (-init-parse-cpu!): Call utils-init!,parse-init!.
5063 * rtl.scm (-simplify-for-compilation): Ensure at least one mach
5064 selected if (current-mach) seen.
5065 (rtx?): Renamed from rtx-uneval?, all callers updated.
5066 (<c-expr>,gen-set-quiet,gen-set-trace): New arg selector, all callers
5068 (<c-expr-temp>,cxmake-get,gen-set-quiet,gen-set-trace): New arg
5069 selector, all callers updated.
5070 (hw:): New arg selector, all callers updated. Delete old comments
5072 (reg:,mem:): Handle selectors
5073 * rtx-funcs.scm (reg:): Handle selectors.
5075 * read.scm: Renamed from cpu.scm.
5076 (<command>): New class.
5077 (<reader>): New member commands.
5078 (reader-add-command!): New proc.
5079 (reader-lookup-command): New proc.
5080 (reader-error,-reader-process-expanded,reader-process): New procs.
5081 (reader-read-file!): New proc.
5082 (include): Call reader-read-file!.
5084 (cpu-load): Call reader-read-file!.
5085 * utils.scm (num-args): New proc.
5086 * simplify.inc: New file.
5087 * *.scm: Delete def-foo procs. Rewrite define-foo/define-full-foo
5088 procs. Move define-normal-foo procs (and abbreviated forms) to
5089 simplify.inc. Install define-foo/define-full-foo commands in foo-init!
5091 * fr30.cpu: Include simplify.inc.
5092 * fr30.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
5093 * i960.cpu: Include simplify.inc.
5094 * m32r.cpu: Include simplify.inc.
5095 * m32r.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
5096 (CGEN_PRINT_NORMAL): Use CGEN_BOOL_ATTR.
5097 * sparc.cpu: Include simplify.inc.
5098 * sparc.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
5099 * utils-cgen.scm (parse-error): Moved to read.scm.
5100 (sanitize): Rewrite.
5101 (utils-init!): New proc.
5103 1999-02-02 Doug Evans <devans@casey.cygnus.com>
5105 * sparc.cpu: New file.
5106 * sparc32.cpu: New file.
5107 * sparc64.cpu: New file.
5108 * sparccom.cpu: New file.
5109 * sparc.opc: New file.
5111 1999-01-27 Frank Eigler <fche@cygnus.com>
5113 * utils.scm (gen-copyright): New proc.
5115 1999-01-27 Doug Evans <devans@casey.cygnus.com>
5117 Parameterize rtl parsing, rather than having lots of little handlers.
5118 * rtl.scm (<rtx-func>): New members arg-types,arg-modes.
5119 Delete member traverse.
5120 (rtx:set-traverse!): Delete.
5121 (-rtx-valid-types,-rtx-valid-matches): New variables.
5122 (-rtx-func-lookup): Take symbol or <rtx-func> object as argument
5123 instead of expression. All callers updated.
5124 (def-rtx-node): New args arg-types,arg-modes.
5125 (def-rtx-syntax-node): Ditto.
5126 (def-rtx-dual-mode): Ditto.
5127 (-rtx-macro-expand-list): Renamed from -rtx-macro-maybe-expand-list.
5128 All callers updated.
5129 (-rtx-macro-expand): Renamed from -rtx-macro-maybe-expand.
5130 All callers updated.
5131 (rtx-macro-expand): New proc.
5132 (-rtx-traverse-check-args): Delete.
5133 (-rtx-traverse-normal): Call -rtx-traverse-expr rather than calling
5134 an rtx specific traverser.
5135 (-rtx-any-mode?,-rtx-symornum?): New procs.
5136 (-rtx-traverse-rtx-list,-rtx-traverse-error): New proc.
5137 (-rtx-traverse-no-mode): Delete.
5138 (-rtx-traverse-syntax-expr,-rtx-traverse-syntax-no-mode): Delete.
5139 (-rtx-traverse-operands): Rewrite.
5140 (-rtx-traverse-expr): Rewrite.
5141 (rtx-traverse): Don't expand macros here, leave for caller to do.
5142 (rtx-simplify): Delete.
5143 (rtx-compile-time-constant?): Rewrite. Handle FALSE/TRUE for boolean
5145 (rtx-true?,rtx-false?): Ditto.
5146 (-rtx-ref-type): Set dest is operand 1 now.
5147 (-simplify-for-compilation): New proc.
5148 (semantic-in-out-operands): Recognize regno as an alias for index-of.
5149 Expand macros before calling rtx-traverse. Sort operands by name
5150 to avoid unnecessary semantic formats.
5151 (semantic-attrs): New proc.
5152 (rtx-uneval?): Handle (<rtx-func> ...).
5153 (s-boolifop): Delete arg mode. All callers updated.
5154 * rtx-funcs.scm (all non-macros): Add arg-type and arg-mode specs.
5155 (eq-attr): New arg obj.
5157 * m32r.cpu (rach): Update calls to andif.
5159 * minsn.scm (-minsn-parse-expansion): Renamed from
5160 parse-minsn-expansion.
5161 (-minsn-parse): Renamed from parse-minsn.
5162 (-minsn-read): Renamed from read-minsn.
5163 (def-minsn): Don't check APPLICATION here.
5164 (def-full-minsn): New proc.
5165 (define-macro-insn): Check APPLICATION here. Expand macros.
5166 (define-normal-macro-insn): Ditto.
5168 * utils.scm (word-value): New arg start-lsb?.
5169 (word-mask,word-extract): Ditto.
5170 (split-bits,powers-of-2): Use integer-expt instead of expt.
5171 (bit-set?): Handle 32 bit values (which are bignums).
5172 (cg-logand,cg-logxor): New functions.
5173 * ifield.scm (<ifield>,field-mask): Update call to word-mask.
5174 (<ifield>,field-value): Update call to word-value.
5175 (<ifield>,min-value): Use integer-expt instead of expt.
5176 (<ifield>,max-value): Ditto.
5178 * hardware.scm (<hw-register>,new-mode): Rename local mode to cur-mode.
5180 * insn.scm (def-full-insn): Discard ALIAS insns if simulator.
5182 Compute raw instruction format in addition to semantic based format.
5183 * iformat.scm: Delete members cti?,sem-in-ops,sem-out-ops.
5184 (<iformat> accessors): Rename accessors to ifmt-*.
5185 (<sformat>): New class.
5186 (fmt-enum): Renamed from fmt:enum.
5187 (-ifmt-search-key): Rewrite.
5188 (-sfmt-search-key): New proc.
5189 (ifmt-analyze): Rename arg include-sem-operands? to compute-sformat?
5190 Compute iformat and sformat search keys.
5191 (ifmt-build): Update.
5192 (sfmt-build): New proc.
5193 (-ifmt-lookup-ifmt!,-ifmt-lookup-sfmt!): New procs.
5194 (ifmt-compute!): Compute instruction format <iformat> based on
5195 instruction fields alone. Compute new semantic format <sformat>
5196 based on instruction fields and semantic information.
5197 (ifmt:lookup): Delete.
5198 * mach.scm (<arch>): New member sfmt-list, plus accessors.
5199 (current-sfmt-list): New proc.
5200 * insn.scm (<insn>): Rename member fmt-tmp to tmp.
5201 Rename member fmt to ifmt. New members fmt-desc, sfmt.
5202 (insn-length,insn-length-bytes): Update.
5203 (insn:mask-length,insn:mask): Update.
5204 (insn-lookup-op): Update.
5205 * gas-test.scm (gas-test-analyze!): Update.
5206 (gen-gas-test): Ditto.
5207 * sim-test.scm (sim-test-analyze!): Update.
5208 (gen-sim-test): Ditto.
5209 * opcodes.scm (gen-operand-instance-table): Update.
5210 (gen-operand-instance-ref): Ditto.
5211 (max-operand-instances): Use heuristic if semantics not parsed.
5212 (ifmt-opcode-operands): Renamed from fmt-opcode-operands.
5213 (opcodes-analyze!): Only scan semantics of building operand instance
5215 * sim-cpu.scm (*) Update calls to <iformat>/<sformat> accessors.
5216 (-gen-extract-ifmt-macro): Renamed from -gen-extract-fmt-macro.
5217 * sim-decode.scm (*) Update calls to <iformat>/<sformat> accessors.
5218 (gen-sfmt-argvars-defns): Renamed from gen-ifmt-argvars-defns.
5219 (gen-sfmt-argvars-assigns): Renamed from gen-ifmt-argvars-assigns.
5220 * sim-model.scm (*) Update calls to <iformat>/<sformat> accessors.
5221 * sim.scm (*) Update calls to <iformat>/<sformat> accessors.
5223 * sim-decode.scm (usable-decode-bit?): Rename from decode-bit?
5224 New arg lsb0? All callers updated.
5225 (decode-bits): New arg lsb0?. All callers updated.
5226 (opcode-slots): Update call to bit-set?. Call integer-expt instead
5228 (-gen-decode-bits): New arg lsb0?. All callers updated.
5229 (build-slots): Call integer-expt instead of expt.
5230 (build-decode-table-entry): Handle crossing word boundaries better.
5231 (-gen-decode-switch): New arg lsb0?. All callers updated.
5232 (-gen-extract-decls): Rename decode format entry from ifmt to sfmt.
5234 * enum.scm (define-enum): Rewrite.
5235 (define-normal-enum): Ditto.
5236 (def-full-insn-enum): New proc.
5237 (define-normal-insn-enum): Rewrite.
5239 * attr.scm (<bitset-attribute>,gen-value-for-defn): Ensure result is
5241 (<{integer,enum}-attribute>,gen-value-for-defn): Ditto.
5243 * dev.scm: Add sid support.
5245 * Makefile.am (opcodes,sim-arch,sim-cpu): New targets.
5246 (CLEANFILES): Add tmp-*.
5247 * Makefile.in: Rebuild.
5249 * doc/Makefile.am: New file.
5250 * doc/Makefile.in: New file.
5251 * doc/cgen.texi: New file.
5252 * Makefile.am (SUBDIRS): Define.
5253 * Makefile.in: Rebuild.
5254 * configure.in: Create doc/Makefile.
5255 * configure: Rebuild.
5257 1999-01-18 Doug Evans <devans@casey.cygnus.com>
5259 * insn.scm (insn:syn): Delete.
5261 1999-01-15 Doug Evans <devans@casey.cygnus.com>
5263 * fr30.cpu (model fr30-1): Add state variables load-regs,
5264 load-regs-pending. Delete h-gr. Clean up operand names of all units.
5265 * m32r.cpu (model m32r/d): Clean up operand names of u-exec.
5266 (model m32rx): Ditto.
5267 (addi): Simplify function unit usage spec.
5268 (ld-plus): Rewrite operand names in function unit usage spec.
5269 (mvtachi,mvtachi-a,mvtaclo,mvtaclo-a,st-plus,st-minus): Ditto.
5270 * sim.scm (<unit>,gen-profile-code): Redo how operand names are
5271 overridden. Allow operand to appear in input and output spec.
5272 (<insn>,gen-profile-code): string-append -> string-list.
5274 * ifield.scm (define-ifield): Call pmacro-expand.
5275 (define-full-ifield,define-normal-ifield): Ditto.
5276 (define-multi-ifield,define-normal-multi-ifield): Ditto.
5278 * sim.scm (gen-argbuf-type): Keep leading part of ARGBUF same for
5279 with-scache and without-scache cases.
5281 1999-01-14 Doug Evans <devans@casey.cygnus.com>
5283 * fr30.cpu (fr30-1): Add state variable h-gr.
5284 Add units u-cti, u-load, u-store, u-ldm, u-stm.
5285 (all insns): First pass at providing cycle counts.
5286 * sim.scm (<unit>,gen-profile-code): Only check for output operands
5287 when initializing unit output operands, ditto for input operands.
5289 * insn.scm (insn-length,insn-length-bytes): New procs.
5290 * mach.scm (-adata-set-derived!): Use them.
5291 * sim-cpu.scm (-gen-sem-case): Ditto.
5293 * sim-cpu.scm (-gen-trace-record-type): PCADDR->IADDR.
5294 (-gen-write-case): Ditto.
5295 (gen-semantic-fn): Ditto. Split into two:
5296 -gen-scache-semantic-fn and -gen-no-scache-semantic-fn. Fix bitrot
5298 (-gen-all-semantic-fns): Renamed from -gen-all-semantics. Handle
5299 scache/no-scache appropriately. All callers updated.
5300 (-gen-sem-case): PCADDR->IADDR.
5301 * sim.scm (gen-argbuf-type): PCADDR->IADDR.
5303 * sim-decode.scm (*): Replace string-append,string-map with
5304 string-list,string-list-map where the result is sufficiently large.
5305 (-gen-decode-insn-table): Go back to simple version for non-scache
5306 case: just record IDESC in decoder tables and leave field extraction
5308 (-gen-decode-switch): Ditto.
5309 (-gen-decode-fn): Ditto.
5310 (-gen-extract-decls): Only emit format enum if with-scache?.
5311 * sim-model.scm (-gen-model-insn-fn): Extract ifields here in
5313 (-gen-model-insn-fns): Don't emit model fns for virtual insns.
5314 (-gen-insn-timing): Ditto.
5315 * sim.scm (gen-argbuf-type): Only output sem_fields union in
5318 * sim.scm (-hw-gen-fun-get): Use GET_<H-NAME> macro.
5319 (-hw-gen-fun-set): Use SET_<H-NAME> macro.
5321 1999-01-12 Doug Evans <devans@casey.cygnus.com>
5323 * cpu.scm (keep-mach-validate!): New proc.
5324 (include): New proc.
5326 * mach.scm (current-arch-mach-name-list): New proc.
5327 (-parse-arch-machs): Always return canonical form.
5328 (def-arch): Validate user specified machs to be kept.
5329 (def-mach-attr!): Simplify.
5331 * opcodes.scm (-opcodes-build-operand-instance-table?): New global.
5332 (option-init!): Initialize it.
5333 (option-set!): Set it.
5334 (gen-insn-table-entry): Emit 0 for operand instance ref if not
5335 output operand instance tables.
5336 (cgen-opc.in): Only output operand instance tables if asked to.
5338 * sim.scm (option-init!,option-set!): Clarify returned value.
5340 * sim.scm (gen-mach-bfd-name): Move from here.
5341 * utils-cgen.scm: To here.
5343 1999-01-11 Doug Evans <devans@casey.cygnus.com>
5345 * fr30.cpu (ilm): Fix comment field.
5346 (cond-branch): Remove explicit setting of COND-CTI, let cgen
5349 * rtl.scm (rtx-simplify,rtx-compile-time-constant?): New procs.
5350 (rtx-true?, rtx-false?): New procs.
5351 * rtx-funcs.scm (annul): Rename vpc to pc.
5352 (-rtx-traverse-if): Improve determination of whether then/else parts
5353 are conditionally executed.
5355 * sim.scm (-gen-argbuf-fields-union): Move definition of union to
5357 (gen-argbuf-type): Simplify generated definition (big sem_fields
5358 union moved outside).
5360 1999-01-11 Ben Elliston <bje@cygnus.com>
5362 * doc/porting.texi: New file.
5364 * doc/intro.texi: New file.
5365 (Layout): Use @example to insert preformatted ASCII text (such as
5366 diagrams). @code is inappropriate here.
5368 1999-01-06 Doug Evans <devans@casey.cygnus.com>
5370 * ifield.scm (-multi-ifield-read): Fix handling of insert/extract.
5372 * m32r.opc (print_hash): Cast dis_info.
5374 * sim-cpu.scm (-gen-hardware-types): Sanitize get/set macros.
5375 * sim.scm (<sim-hardware>,make!): Emit a comment for user-written
5378 1999-01-05 Doug Evans <devans@casey.cygnus.com>
5380 * i960.cpu (f-br-disp): Remove RELOC attribute.
5381 (f-ctrl-disp): Ditto.
5382 (callx-disp): set-quiet -> set for (reg h-gr 2).
5383 (callx-indirect,callx-indirect-offset): Ditto.
5385 * Makefile.am (gas-test): Fix dependencies.
5386 * Makefile.in: Rebuild.
5387 * cgen-gas.asm: File creation args are -<uppercase-letter>.
5388 * gas-test.scm (break-out-syntax,make-file-name): Delete.
5389 (gas-test-analyze!): Use syntax-break-out.
5390 * sim-test.scm (break-out-syntax,make-file-name): Delete.
5391 (sim-test-analyze!): Use syntax-break-out.
5392 (cgen-build.sh): Use gen-file-name.
5393 (cgen-allinsn.exp): Compute and pass all machs to run_sim_test.
5394 * insn.scm (syntax-break-out): New proc.
5395 * utils.scm (gen-file-name): New proc.
5397 * fixup.scm (nil,<?,<=?,>?): Delete.
5399 * utils.scm (count-true): Rewrite.
5401 * slib/sort.scm: Move sort.scm to slib directory.
5404 * iformat.scm (ifmt-compute!): Record empty format.
5406 * rtl.scm (semantic-in-out-operands): Simplify by moving several
5407 internal procs outside. Handle expression register numbers.
5410 * rtx-funcs.scm (annul): Rename new_pc to vpc.
5412 * sim-cpu.scm (-gen-cpu-reg-access-defns): Define access fns for
5414 (-gen-write-case): Pass vpc to SEM_BRANCH_FINI.
5415 (gen-semantic-fn,-gen-sem-case): Ditto.
5416 (cgen-cpu.c): Define WANT_CPU to @cpu@.
5417 (cgen-semantics.c): Ditto.
5418 * sim-decode.scm (-gen-extract-decls): Handle non-with-scache case.
5419 (gen-ifmt-argvars-defns): New proc.
5420 (gen-ifmt-argvars-assigns): New proc.
5421 (-gen-all-extractors): Delete FMT_EMPTY case, now handled like others.
5422 (-gen-decode-fn): Handle non-with-scache case.
5423 (cgen-decode.c): Define WANT_CPU to @cpu@.
5424 * sim-models.scm (-gen-mach-defns): Emit bfd name.
5425 (cgen-model.c): Define WANT_CPU to @cpu@.
5426 * sim.scm (gen-ifld-extract-argvar): New proc.
5427 (<sim-hardware>,make!): Don't emit [GS]ET_H_FOO macros for elements
5428 with FUN-ACCESS specified.
5429 (hw-fun-access?): New proc, as <hardware-base>:fun-access? method.
5430 (<hw-register>,gen-extract): New arg local?.
5431 (<hw-address>,gen-extract): Ditto.
5432 (-hw-cxmake-get): Handle non-with-scache case.
5433 (-hw-gen-set-quiet): Ditto.
5434 (<hw-address>,cxmake-get): Handle non-with-scache case.
5435 (gen-op-extract-argvar): New proc.
5436 (<operand>,gen-record-profile): Rewrite.
5437 (<operand>,gen-profile-code): Rewrite.
5438 (<unit>,gen-profile-code): Use -gen-argfld-ref.
5439 (gen-argbuf-fields-union): New proc.
5440 (gen-argbuf-type): Use it. Handle non-scache case.
5442 * *.scm: class:foo procs renamed to class-foo.
5443 * attr.scm (<attribute>): New member `for'.
5444 (-attr-parse): New first value in list for default if
5446 (non-bool-attr-list,attr:add!): Delete.
5447 (def-attr): Use current-attr-add!.
5448 (atlist-attr-value-no-default): New proc.
5449 (attr-lookup-default): Handle boolean attributes.
5450 (gen-attr-enum): New proc.
5451 (-attr-remove-meta-attrs-alist): New proc.
5452 (attr-nub): New proc.
5453 (current-attr-list-for): New proc.
5454 (current-{ifld,hw,op,insn}-attr-list): New procs.
5455 (attr-builtin!): New proc.
5456 * cpu.scm (keep-obj?): Rewrite.
5457 (-init-parse-cpu!): Call arch-init!.
5458 (-install-builtin!): Call {attr,mode,ifield,insn}-builtin!.
5459 (-finish-parse-cpu!): Call arch-finish!.
5460 * enum.scm (enum-list,enum:add,enum:lookup): Delete.
5461 (def-enum,def-full-enum): Use current-enum-add!.
5462 (gen-obj-list-enums): New proc.
5463 * hardware.scm (hw:add!,hw:lookup): Delete.
5464 (def-hardware,def-hardware-ext): Use current-hw-add!.
5465 (hw:std-attrs,hw:attr-list): Delete.
5466 (hardware-builtin!): Define builtin hardware attributes.
5467 * ifield.scm (ifld:add!,ifld:lookup): Delete.
5468 (def-ifield,def-full-ifield): Use current-ifld-add!.
5469 (ifld:std-attrs,ifld:attr-list): Delete.
5470 (ifield-builtin!): New proc.
5471 * insn.scm (insn:add!,insn:lookup): Delete.
5472 (def-full-insn): Use current-insn-add!.
5473 (insn:std-attrs): Delete.
5474 (insn-builtin!): New proc.
5475 * mach.scm (<arch>): New members attr-list,enum-list,op-list,
5477 (<arch-data>): New member machs.
5478 (current-attr-list,current-enum-list): New procs.
5479 (current-op-list,current-minsn-list): New procs.
5480 (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-add!): Ditto.
5481 (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-lookup):
5483 (-parse-arch-machs): New proc.
5484 (-arch-parse): New arg machs, all callers updated.
5485 (-arch-read): Handle machs spec.
5486 (def-arch): Define MACH attribute here.
5487 (mach-init!,mach-finish!): Not here.
5488 (cpu:add!,cpu:lookup): Delete.
5489 (def-cpu): Use current-cpu-add!.
5490 (<mach>): New member bfd-name.
5491 (-mach-parse): New arg bfd-name, all callers updated.
5492 (-mach-read): Handle bfd-name spec.
5493 (mach:add!,mach:lookup): Delete.
5494 (def-mach): Use current-mach-add!.
5495 (def-mach-attr!): New proc.
5496 (arch-init!): New proc.
5497 (arch-finish!): New proc. Reverse all object lists here.
5498 * minsn.scm (minsn-list,minsn-add!,minsn:lookup): Delete.
5499 (def-minsn): Use current-minsn-add!. Ignore minsn if mach not kept.
5500 (define-normal-macro-insn): Ignore minsn if mach not kept.
5501 * mode.scm (mode-builtin!): New proc.
5502 * model.scm (model:add!,model:lookup): Delete.
5503 (def-model): Use current-model-add!.
5504 * opcodes.scm (insn:attr-list): Delete.
5505 (attr-bool-gen-decl,attr-bool-gen-defn): New procs.
5506 (gen-attr-table-defn): Emit value for default.
5507 (gen-attr-table-defns): Emit bool_attr. Emit ifield attr table.
5508 (op:attr-list): Delete.
5509 (gen-operand-decls,gen-insn-decls): New proc.
5510 (compute-insn-attr-list): Delete.
5511 (cgen-opc.h): Reorganize and simplify.
5512 * operand.scm (-operand-list,operand-list,op:add,op:lookup): Delete.
5513 (def-operand,def-full-operand): Use current-op-add!.
5514 (op:std-attrs): Delete.
5515 (operand-enum): Delete.
5516 (operand-builtin!): Define builtin operand attrs.
5517 * utils-cgen.scm (sanitize): Update calls to lookup procs.
5518 (gen-attr-enum-decl): Use gen-obj-list-enums.
5519 (gen-obj-attr-defn): Renamed from gen-attr-defn, all callers updated.
5521 * fr30.cpu (define-arch): Add machs spec.
5522 (f-i4): SIGNED attribute -> !UNSIGNED.
5523 (f-disp8,f-disp9,f-disp10,f-s10,f-rel9,f-rel12): Ditto.
5524 (HASH-PREFIX): Define operand attribute.
5525 (NOT-IN-DELAY-SLOT): Define insn attribute.
5526 * i960.cpu (define-arch): Add machs spec.
5527 * m32r.cpu (define-arch): Add machs spec.
5528 (h-hi16): Remove UNSIGNED,SIGN-OPT attributes.
5529 (HASH-PREFIX): Define operand attribute.
5530 (FILL-SLOT): Define insn attribute.
5532 Thu Dec 17 17:15:06 1998 Dave Brolley <brolley@cygnus.com>
5534 * fr30.cpu (stilm): Correct mask for and operation.
5536 1998-12-17 Doug Evans <devans@casey.cygnus.com>
5538 * sim-test.scm (cgen-build.sh): Use `mach' to specify machs, not `cpu'.
5539 Replace START/EXIT with start/pass.
5540 (gen-sim-test): Delete ".text".
5542 Wed Dec 16 16:16:39 1998 Dave Brolley <brolley@cygnus.com>
5544 * fr30.cpu (cond-branch): Conditional branches not allowed in delay slots.
5546 Tue Dec 15 17:30:01 1998 Dave Brolley <brolley@cygnus.com>
5548 * fr30.cpu: Add NOT-IN-DELAY-SLOT as appropriate.
5549 (h-sbit): Make it FUN-ACCESS.
5550 (h-gr): Reorder so that general regs are always printed by number.
5552 1998-12-14 James E Wilson <wilson@wilson-pc.cygnus.com>
5554 * i960.cpu (flushreg): Use nop.
5556 1998-12-14 Doug Evans <devans@casey.cygnus.com>
5558 * m32r.cpu (default-alignment): Specify.
5559 * mach.scm (<arch-data>): New member default-alignment.
5560 (adata:default-alignment): New proc.
5561 (current-arch-default-alignment): New proc.
5562 (-arch-parse): New arg default-alignment.
5563 (parse-alignment): New proc.
5564 (-arch-read): Handle default-alignment spec.
5566 * rtx-funcs.scm (attr:): Pass attr-name through gen-c-symbol.
5568 * insn.scm (f-%): Delete.
5569 * sim-cpu.scm (gen-define-fields): Delete support for f-%. Can
5570 be readded if proved useful.
5571 (gen-extract-fields): Ditto. Use gen-ifetch.
5572 * sim.scm (<hw-memory>,cxmake-get): Pass pc to GETMEM*.
5573 (<hw-memory>,gen-set-quiet): Pass pc to SETMEM*.
5575 Mon Dec 14 16:20:59 1998 Dave Brolley <brolley@cygnus.com>
5577 * fr30.cpu (div2): Set zbit properly when remainder not zero.
5579 1998-12-14 Dave Brolley <brolley@cygnus.com>
5581 * fr30.cpu: Remove stub macros.
5582 (div1): Shift bits from mdl into mdh. Don't use addc/subc.
5583 (div2): Don't use addc/subc.
5585 1998-12-11 Doug Evans <devans@casey.cygnus.com>
5587 * utils-cgen.scm (gen-obj-sanitize): Only catch spelling errors
5590 Thu Dec 10 18:37:34 1998 Dave Brolley <brolley@cygnus.com>
5592 * fr30.cpu (div0s,div0u,div1,div2,div3,div4s): Implemented.
5594 Thu Dec 10 12:28:53 1998 Doug Evans <devans@canuck.cygnus.com>
5596 * cpu.scm (keep-all?): New proc.
5597 (assert-keep-all): Use it.
5598 * opcodes.scm (gen-ifmt-table-1): Use gen-obj-sanitize.
5599 * utils-cgen.scm (gen-obj-sanitize): Handle macro-insns.
5600 Check for spelling errors.
5602 1998-12-09 Doug Evans <devans@casey.cygnus.com>
5604 * rtl.scm (s-convop): Call -rtx-sem-mode.
5606 Tue Dec 8 10:58:38 1998 Doug Evans <devans@canuck.cygnus.com>
5608 * hardware.scm (-parse-hw-type): parse! no longer returns a result.
5609 (-parse-hw-profile): Ditto.
5610 (<hw-register>, parse!): Return `void' result.
5611 (<hw-pc>, parse!): Ditto.
5612 (<hw-memory>, parse!): Ditto.
5613 (<hw-immediate>, parse!): Ditto.
5614 (<hw-address>, parse!): Ditto.
5616 * ifield.scm (-ifield-parse): Validate encode/decode fields.
5617 (-ifld-parse-encode-decode): New proc.
5618 (-ifld-parse-encode,-ifld-parse-decode): New proc.
5619 (-multi-ifield-parse): Set encode/decode to #f.
5620 (ifld:decode-mode): New proc.
5621 * utils.scm (nub): Rewrite.
5622 * operand.scm (op-nub): Rewrite.
5623 * sim.scm (<ifield>, gen-type): Rewrite.
5624 (-gen-ifld-argbuf-defn): New proc.
5625 (gen-ifld-extract,gen-ifld-trace-extract): New procs.
5626 (<sim-hardware>): Forward gen-trace-extract onto `type'.
5627 Ditto for needed-iflds. gen-argbuf-defn renamed from gen-argbuf-elm.
5628 (<hardware-base>): New method needed-iflds. gen-argbuf-defn
5629 renamed from gen-argbuf-elm, return "". Rewrite gen-extract.
5630 New method gen-trace-extract.
5631 (<hw-register>): New method needed-iflds. gen-argbuf-defn renamed
5632 from gen-argbuf-elm, return "" if not caching register address.
5633 Rewrite gen-extract. New method gen-trace-extract.
5634 (<hw-address>): New methods needed-iflds, gen-argbuf-defn,
5635 gen-extract, gen-trace-extract, cxmake-get.
5636 (<hw-iaddress>): New method cxmake-get.
5637 (op-needed-iflds): New proc.
5638 (<operand>): Delete methods gen-argbuf-elm, gen-extract.
5639 (-gen-op-argbuf-defn): New proc.
5640 (gen-op-extract): Renamed from op:extract.
5641 (gen-op-trace-extract): Renamed from op:trace-extract.
5642 (fmt-extractable-operands): Renamed from fmt-semantic-operands
5644 (gen-argbuf-elm): Rewrite.
5645 * sim-decode.scm (-gen-record-args): Update.
5647 * sim.scm (c-cpu-macro): Renamed from cpu-deref. All uses changed.
5649 * pmacros.scm (-pmacro-expand): Handle procedural macros in
5650 argument position. Flag symbolic macros in function position as
5652 (define-pmacro): Handle quoting in definition of symbolic macros.
5653 (pmacro-trace): Call -pmacro-expand, not -pmacro-ref.
5655 Tue Dec 8 13:06:44 1998 Dave Brolley <brolley@cygnus.com>
5657 * fr30.opc (parse_register_list): Account for reverse masks
5659 (print_register_list): Ditto.
5660 (parse_low_register_list_ld): New function.
5661 (parse_hi_register_list_ld): New function.
5662 (parse_low_register_list_st): New function.
5663 (parse_hi_register_list_st): New function.
5664 (print_hi_register_list_ld): New function.
5665 (print_hi_register_list_st): New function.
5666 (print_low_register_list_ld): New function.
5667 (print_low_register_list_st): New function.
5668 * fr30.cpu (ldr15dr): Implement workaround.
5669 (ldm0,ldm1,stm0,stm1): Implemented.
5671 1998-12-08 Doug Evans <devans@casey.cygnus.com>
5673 * configure.in: Rename --with-hobbit to --with-cgen-hobbit.
5674 * configure: Regenerate.
5675 * Makefile.am (WITH_HOBBIT): Update.
5676 (cgen-hob.c): Remove Makefile dependency.
5677 (cgen.o): Depend on cgen-gh.h, config.h.
5678 * Makefile.in: Regenerate.
5679 * aclocal.m4: Regenerate.
5681 1998-12-07 James E Wilson <wilson@wilson-pc.cygnus.com>
5683 * i960.cpu, i960.opc: New files.
5685 Mon Dec 7 14:30:24 1998 Dave Brolley <brolley@cygnus.com>
5687 * fr30.opc (parse_register_number): New function.
5688 (parse_register_list): New function.
5689 (parse_low_register_list): Use parse_register_list.
5690 (parse_hi_register_list): Use parse_register_list.
5691 * fr30.cpu (sth): Fix assembler syntax. Implement more
5694 Fri Dec 4 16:07:13 1998 Doug Evans <devans@canuck.cygnus.com>
5696 * sim-cpu.scm (cgen-sem-switch.c): Update definition of TRACE_RESULT.
5697 * sim-decode.scm (-gen-record-args): Update call to TRACE_EXTRACT.
5698 * sim.scm (-op-gen-set-trace): Update call to TRACE_RESULT.
5699 (-op-gen-set-trace-parallel): Ditto.
5700 (gen-argbuf-type): New ARGBUF members trace_p,profile_p;
5702 * fr30.cpu (call,calld): Fix setting of pc.
5703 (f-op5): Fix start bit number.
5705 Fri Dec 4 17:06:28 1998 Dave Brolley <brolley@cygnus.com>
5707 * fr30.cpu (st): Fix operand ordering. Implement more
5710 Thu Dec 3 23:59:40 1998 Doug Evans <devans@canuck.cygnus.com>
5712 * ifield.scm (ifld:mode,ifld:hw-type): New procs.
5713 * iformat.scm (fmt-opcode-operands): Move to opcodes.scm.
5714 (fmt-semantic-operands): Move to sim.scm.
5715 * opcodes.scm (fmt-opcode-operands): Moved here from iformat.scm.
5716 * operand.scm (<hw-index>): New member `name'. All builders updated.
5717 (<hw-index>): New method get-name.
5718 (op-profilable?): Moved to sim.scm.
5720 * sim.scm (fmt-semantic-operands): Moved here from iformat.scm.
5721 (op-profilable?): Moved here from operand.scm.
5722 (gen-extract-type): Delete.
5723 (c-argfld-macro): Renamed from c-ifield-macro. All uses updated.
5724 (-gen-argfld-ref): New proc.
5725 (-gen-ifld-argfld-name): New proc.
5726 (gen-ifld-argfld-ref): Renamed from -gen-ifld-ref. All uses updated.
5727 (-gen-ifld-decoded-val): Renamed from -gen-ifld-raw-val.
5728 (-gen-hw-index-argfld-name,-gen-hw-index-argfld-ref): New procs.
5729 (<hardware-base>): Delete method gen-extract-type. New method
5731 (<hw-register): Ditto. Update method gen-extract.
5732 (<operand>, method gen-argbuf-elm): Rewrite.
5733 * rtl.scm (semantic-in-out-operands): Handle (ifield f-name).
5734 (s-cmpop): Fix handling of eq,ne for unsigned modes.
5735 * rtx-funcs.scm (eq,ne,lt,le,gt,ge,ltu,leu,gtu,geu): Update.
5737 * sim-decode.scm (-gen-record-args): Tweak.
5739 * sim.scm (gen-argbuf-elm): Handle case of all constant opcode fields.
5741 Thu Dec 3 14:23:27 1998 Dave Brolley <brolley@cygnus.com>
5743 * doc/porting: Fix typo: gas->sim.
5744 * fr30.opc (print_m4): New function.
5745 * fr30.cpu: Implemented many insns.
5747 Thu Dec 3 00:03:16 1998 Doug Evans <devans@canuck.cygnus.com>
5749 * rtl.scm (build-reg-operand!): Remove redundant setting of hw-name.
5751 * fr30.cpu (f-rel9): Delete RELOC attribute.
5752 (f-rel12): Add PCREL-ADDR attribute.
5753 (label9): Make an h-iaddr, not h-uint. Delete asm print spec.
5754 (label12): Delete PCREL-ADDR attribute. Make an h-iaddr, not h-sint.
5755 * fr30.opc (print_label9): Delete.
5757 * iformat.scm (ifmt-analyze): Check attributes derived from semantic
5758 code for CTI indicators.
5759 * insn.scm (insn-cti?): Simplify.
5760 * utils-cgen.scm (atlist:cti?): New proc.
5762 1998-11-30 Doug Evans <devans@casey.cygnus.com>
5764 * fr30.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
5765 (f-i20-4,f-i20-16,f-i20): New fields.
5771 * fr30.opc (CGEN_DIS_HASH_SIZE,CGEN_DIS_HASH): Define in opc.h.
5772 * m32r.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
5773 * mach.scm (arch-data): Ditto.
5774 (current-arch-default-insn-word-bitsize): Renamed from
5775 current-arch-default-insn-bitsize [ya, that's a pretty long name].
5776 (-arch-read): Update.
5778 * hardware.scm (hw:attr-list): Move here ...
5779 * opcodes.scm: ... from here.
5781 * ifield.scm (fld:bitrange): Delete.
5782 (fld:word-offset,fld:word-length): New procs.
5783 (ifield?): Use class-instance.
5784 (<ifield>, method field-start): Rewrite.
5785 (ifld:enum): New proc.
5786 (<ifield>, methods field-mask,field-value): Rewrite.
5787 (-ifield-parse): Rewrite.
5788 (<multi-ifield> support): Rewrite.
5789 (ifld-beyond-base?): Rewrite.
5790 (ifld:std-attrs): New variable.
5791 (ifld:attr-list): New proc.
5792 * iformat.scm (-compute-insn-mask): Rewrite.
5793 * insn.scm (-parse-insn-format): New arg errtxt, all callers updated.
5795 (-parse-insn-format-symbol,-parse-insn-format-list): New procs.
5796 * opcodes.scm (<hardware>): No longer forward gen-insert,gen-extract
5798 (<operand>): Ditto. Forward onto index instead.
5799 (gen-ifld-decls,gen-ifld-defns): New procs.
5800 (ifld:insert,ifld:extract): New procs.
5801 (<ifield>): New methods gen-insert, gen-extract.
5802 (<multi-ifield>): Ditto.
5803 (<hw-index>): Forward gen-insert,gen-extract onto value.
5804 (<hw-asm>): Delete insert/extract support.
5805 (<hw-register,hw-memory,hw-immediate>): Ditto.
5806 (gen-hash-defines): Use string-list.
5807 Define CGEN_MAX_IFMT_OPERANDS.
5808 (gen-switch): Use string-list,string-list-map.
5809 (gen-fget-switch,gen-fset-switch): Use string-list.
5810 (gen-parse-switch,gen-insert-switch): Ditto.
5811 (gen-extract-switch,gen-print-switch): Ditto.
5812 (gen-insert-switch,gen-extract-switch): New local `total_length'.
5813 (gen-ifmt-table-1,gen-ifmt-table): New procs.
5814 (gen-ifmt-entry): Renamed from gen-iformat-entry, rewrite.
5815 (gen-ivalue-entry): New proc.
5816 (gen-insn-table-entry): Use string-list. Update iformat,ivalue
5817 computation. Use 0 for operand ref table if ALIAS insn.
5818 (gen-minsn-table-entry): Use string-list.
5819 (gen-macro-insn-table): Temporarily emit format tables for ALIAS insns.
5820 (gen-opcode-open): Record address of ifield table.
5821 (cgen-opc.h): Call gen-ifld-decls.
5822 (cgen-opc.in): Call gen-ifld-defns, gen-ifmt-table.
5823 * types.scm (<bitrange>): New members word-offset,word-length.
5824 Delete member total-length. Delete methods start,mask,value.
5825 (bitrange:word-offset,bitrange:word-length): New procs.
5826 * sim-cpu.scm (gen-define-fields): Simplify.
5827 (gen-extract-fields): Simplify.
5828 * sim.scm (<ifield>, gen-ifld-extract): Rewrite.
5829 (<ifield>): New methods gen-ifld-extract-decl.
5830 Delete method gen-ifld-extract-beyond.
5831 (<multi-ifield>): New methods gen-ifld-extract-decl.
5832 (<multi-ifield>, method gen-ifld-extract): Implement.
5833 (-gen-ifld-extract-base,-gen-ifld-extract-beyond): New procs.
5834 (gen-ifld-exttact,gen-ifld-extract-beyond): Delete.
5836 * rtl.scm (-rtx-traverse-no-mode): Process operands.
5837 (-rtx-traverse-syntax-no-mode): New proc.
5838 (semantic-in-out-operands): Watch for `delay' and add DELAY-SLOT attr.
5839 (s-ifield): New proc.
5840 (s-shop): Don't prepend `unsigned' for unsigned modes.
5841 * rtx-funcs.scm (ifield): New rtx function.
5842 (ref,symbol): Use standard -rtx-traverse-syntax-no-mode.
5843 (delay): New rtx function.
5844 * insn.scm (insn:std-attrs): Add DELAY-SLOT.
5846 * cos.scm (-elm-make-method-getter): Fix typo.
5848 * utils.scm (backslash): Handle lists of strings.
5850 Thu Nov 26 11:47:29 1998 Dave Brolley <brolley@cygnus.com>
5852 * fr30.cpu (f-rel9): Correct for pc+2.
5853 (label9): Use print_label9.
5854 * fr30.opc (print_label9): New function.
5856 Tue Nov 24 11:19:35 1998 Dave Brolley <brolley@cygnus.com>
5858 * fr30.cpu: Change $r13,$r14,$r15 to uppercase.
5859 * fr30.opc (parse_low_register_list): Renamed.
5860 (parse_hi_register_list): Renamed.
5861 (print_hi_register_list): Renamed.
5862 (print_low_register_list): Renamed.
5864 Mon Nov 23 18:26:36 1998 Dave Brolley <brolley@cygnus.com>
5866 * fr30.cpu (f-rel9): Now a pc relative offset.
5868 1998-11-23 Doug Evans <devans@casey.cygnus.com>
5870 * opcodes.scm (op-asm): Move to here, from operands.scm.
5871 (<op-asm>, method parse!): Validate arguments.
5872 (<operand>, method gen-function-name): Fix thinko.
5873 * operand.scm (<operand>, method make!): Don't set op-asm here.
5874 * utils.scm (list-elements-ok?): New proc.
5876 * opcodes.scm: Clean up pass.
5878 1998-11-20 Doug Evans <devans@tobor.to.cygnus.com>
5880 * fr30.cpu (int): Defer saving of ps,pc and setting ibit,sbit to
5881 the fr30_int function.
5882 (h-cr): Remove PROFILE,CACHE-ADDR attributes.
5883 (h-dr): Add FUN-ACCESS attribute.
5885 1998-11-20 James E Wilson <wilson@wilson-pc.cygnus.com>
5887 * sim-model.scm (-gen-mach-defns): Use gen-sym instead of obj:name
5888 for C symbol for models array.
5890 Thu Nov 19 15:57:45 1998 Dave Brolley <brolley@cygnus.com>
5892 * fr30.opc (parse_reglist_low): New function.
5893 (parse_reglist_hi): New function.
5894 (print_reglist_low): New function.
5895 (print_reglist_hi): New function.
5896 * fr30.cpu: Finish remaining insn stubs.
5898 1998-11-19 Doug Evans <devans@tobor.to.cygnus.com>
5900 * sim.scm (-gen-extract-word): Handle fields shorter than entire word.
5902 * fr30.cpu (ldi32m): Don't use for disassembly.
5904 Wed Nov 18 21:34:41 1998 Dave Brolley <brolley@cygnus.com>
5906 * fr30.cpu (int): Implement it.
5908 1998-11-18 Doug Evans <devans@casey.cygnus.com>
5910 * rtx-funcs.scm (nop): Fix C code.
5912 * rtl.scm (semantic-in-out-operands): Fix setting of sem-attrs.
5914 * fr30.cpu (f-i32): New ifield.
5917 (ldi32m): New macro insn.
5918 (inte): Provide simple version for now.
5920 * sim-arch.scm: New file.
5921 * sim.scm: Move architecture support generation to sim-arch.scm.
5922 * cgen-sim.scm: Load sim-arch.scm.
5925 * hardware.scm (pc?) New proc.
5926 (class <hardware-base>): Rewrite method 'pc?.
5927 (class <hardware>): Forward 'pc? to the hardware type.
5928 (class <hw-pc>): New method 'pc?.
5930 Add support for variable length ISAs.
5931 * ifield.scm (ifld-beyond-base?): New proc.
5932 * m32r.cpu: Remove integral-insn? spec.
5933 * mach.scm (arch:derived,arch:set-derived!): New procs.
5934 (arch:app-data,arch:set-app-data!): New procs.
5935 (class <arch>): New members derived, app-data.
5936 (class <cpu>): Delete member integral-insn?.
5937 (cpu:integral-insn?): Delete.
5938 (-cpu-parse): Delete arg integral-insn?. All callers updated.
5939 (-cpu-read): Delete integral-insn? support.
5940 (state:decode-assist): Delete.
5941 (state:int-insn?): Delete.
5942 (<derived-arch-data>): New class.
5943 (-adata-set-derived!): New proc.
5944 (mach-finish!): Call it.
5945 * opcodes.scm (<hw-asm>, method gen-extract): Pass pc to C handler.
5946 (gen-operand-instance): Add COND_REF support.
5947 (gen-operand-instance-table): Ditto.
5948 (gen-hash-defines): Update.
5949 (gen-extract-switch): Update type of `insn_value' arg.
5950 (gen-opcode-open): Update type of `value' arg of dis_hash_insn.
5951 * rtl.scm (-rtx-ref-type): Renamed from -rtx-set?. All callers
5953 (semantic-in-out-operands): Compute UNCOND-CTI,COND-CTI from rtl.
5954 * sim-cpu.scm (gen-define-fields): Create vars to hold insn value
5955 beyond the base insn (for large insns).
5956 (-gen-extract-beyond-var-list): New proc.
5957 (gen-extract-fields): Handle large insns.
5958 (-gen-write-case): Update sem_arg computation.
5959 Update initial vpc computation.
5960 (gen-semantic-fn): Ditto. Update type of `insn'.
5961 (-gen-sem-case): Update sem_arg computation.
5962 Update initial vpc computation.
5963 * sim.scm (<ifield>, gen-ifld-extract): Renamed from `extract'.
5964 (-gen-extract-word): New proc.
5965 (<ifield>): New method gen-ifld-extract-beyond.
5966 (gen-ifld-extract-beyond): New proc.
5967 * types.scm (bitrange-overlap?): New proc.
5969 * utils.scm (bits->bytes): New proc.
5970 (bytes->bits): New proc.
5972 Move extraction support into decoder.
5973 * sim-cpu.scm (-gen-record-args,-gen-record-profile-args,
5974 -gen-extractor,-gen-all-extractors,cgen-extract.c): Move extraction
5975 support to sim-decode.scm.
5976 * sim-decode.scm (-gen-decode-insn-table): Change decoder data to
5977 be array of IDESC,FMT entries. Make the array const.
5978 (-gen-gcc-label-table): Make array const.
5979 (-gen-decode-switch): Branch to extraction code after insn has been
5981 (-gen-decode-insn-globals): Delete extract handler from
5983 (gen-decode-fn): Add extraction support.
5984 (-gen-sem-fn-decls): Delete extraction fn decls.
5985 (-gen-idesc-decls): Update @cpu@_decode decl.
5986 (-gen-idesc-init-fn): Delete extraction support.
5987 (-gen-extract-decls): New proc.
5989 * sim-cpu.scm (cgen-sem-switch.c): Update switch test.
5990 (sim-finish!): Surround pbb only code with #if WITH_SCACHE_PBB.
5992 * sim-decode.scm (build-decode-table-entry): New arg invalid insn.
5993 All callers updated.
5994 (table-entry:make): Record insn value as insn object, not name.
5997 * hobbit.scm (path_basename): Renamed from `basename' to avoid
5998 collision with C function.
5999 (path_dirname): Similarily.
6000 * hobbit.c,hobbit.h: Rebuild.
6002 Wed Nov 18 11:26:17 1998 Dave Brolley <brolley@cygnus.com>
6004 * fr30.cpu (dir2r15-predec-stub): Reference to R15 must be indirect.
6006 Mon Nov 16 19:19:50 1998 Dave Brolley <brolley@cygnus.com>
6008 * fr30.cpu: Implement more instruction stubs.
6010 Thu Nov 12 19:20:28 1998 Dave Brolley <brolley@cygnus.com>
6012 * fr30.cpu: Implement more instruction stubs.
6014 Tue Nov 10 10:53:55 1998 Doug Evans <devans@canuck.cygnus.com>
6016 * rtl.scm (-rtx-expr-mode-name): Handle sequence locals.
6018 * rtx-funcs.scm (zflag:,zflag,nflag:,nflag): New rtx fns.
6020 * operand.scm (<pc>, method make!): FAKE renamed to SEM-ONLY.
6021 (op:std-attrs): Ditto.
6022 * opcodes.scm (gen-operand-instance): Ditto.
6023 (gen-switch): Ditto.
6024 * m32r.cpu (condbit,accum): Update.
6025 * fr30.cpu (nbit,vbit,zbit,cbit): Update.
6027 Mon Nov 9 14:30:51 1998 Doug Evans <devans@seba.cygnus.com>
6029 * enum.scm (-enum-read): Fix typo.
6031 * iformat.scm (-ifmt-search-key): Simplify a little.
6033 Mon Nov 9 12:07:56 1998 Dave Brolley <brolley@cygnus.com>
6035 * doc/porting: semantics.c -> sem.c.
6036 * Makefile.in: Regenerate.
6037 * fr30.cpu (add): Change ADD to add. Add more registers and set
6038 status bits on 'add' instruction.
6040 Fri Nov 6 18:15:05 1998 James E Wilson <wilson@wilson-pc.cygnus.com>
6042 * sim.scm (-gen-arch-model-decls): Default MAX_UNITS to 1 instead
6045 Fri Nov 6 17:43:16 1998 Doug Evans <devans@seba.cygnus.com>
6047 * minsn.scm (minsn:enum): Update, call current-arch-name.
6049 * pmacros.scm (-pmacro-expand): Make `cep' a variable.
6051 * Makefile.am (CGEN_HOB_INPUT_FILES): Add pmacros.scm,enum.scm,
6052 mach.scm,model.scm,types.scm,ifield.scm,minsn.scm.
6053 (ARCH,CGEN,CGENFLAGS): New variables.
6054 (gas-test,sim-test): New rules.
6055 * Makefile.in: Rebuild.
6056 * configure.in (arch): Define.
6057 * configure: Rebuild.
6059 * cgen-hob.scm (*UNSPECIFIED*): Renamed from UNSPECIFIED.
6060 * All .scm files: Ditto.
6062 * dev.scm: Fix gas-test call to cpu-load.
6063 * gas-test.scm: Clean up pass to remove bit-rot.
6064 * sim-test.scm: Ditto.
6066 * enum.scm (read-enum): Fix typo in `vals' handling.
6068 * hardware.scm (-parse-hw-type): Fix typo.
6069 (parse-hardware): Rename `asm' to `aasm' to avoid GCC reserved word.
6070 (def-hardware,define-normal-hardware): Ditto.
6072 * hobbit.scm (*case-sensitive-flag*): New configuration variable.
6073 (display-var): Use it.
6074 * hobbit.c: Rebuild.
6075 * hobbit.h: Rebuild.
6077 * ifield.scm (-ifield-read): Rename local `length' to `length-' to
6078 avoid hobbit problem.
6079 * mach.scm (-cpu-read): Rename local `parallel-insns' to
6080 `parallel-insns-' to avoid hobbit problem.
6082 Fri Nov 6 17:19:12 1998 Doug Evans <devans@canuck.cygnus.com>
6084 * m32r.opc (parse_hi16): Fix call to cgen_parse_address.
6085 (parse_slo16,parse_ulo16): Ditto.
6086 * opcodes.scm (<hw-address>, method gen-parse): Ditto.
6088 Thu Nov 5 13:04:53 1998 Doug Evans <devans@canuck.cygnus.com>
6090 * Makefile.am (GUILELDFLAGS,GUILELDADD): New variables.
6091 (cgen_LDFLAGS,cgen_LDADD,hob.x): Use them.
6092 * Makefile.in: Rebuild.
6093 * insn.scm (define-normal-insn): Expand pmacros.
6094 * mode.scm (<mode>): New member `host?'. All uses updated.
6095 (mode:host?): New proc.
6096 * rtl.scm (define-rtx-node): Make a syntax proc, not a macro.
6097 (define-rtx-syntax-node,define-rtx-macro-node): Ditto.
6098 (define-rtx-dual-mode): Ditto.
6099 (s-index-of): New proc.
6100 (s-unop): Use plain C for host mode operations.
6101 (s-binop,s-shop,s-boolifop,s-cmpop): Ditto.
6102 * rtx-funcs.scm (index-of): New rtx function.
6103 * sim.scm (<hw-index>): New method cxmake-get.
6105 Wed Nov 4 23:58:08 1998 Doug Evans <devans@seba.cygnus.com>
6107 * sim-cpu.scm (-gen-engine-decls): Delete.
6109 Wed Nov 4 18:40:47 1998 Dave Brolley <brolley@cygnus.com>
6111 * doc/rtl (Example): Correct Typo.
6112 * doc/porting: Add 'make dep' step to opcodes port instructions.
6113 * fr30.opc: New file.
6114 * fr30.cpu: New file.
6116 Wed Oct 28 13:36:15 1998 Doug Evans <devans@canuck.cygnus.com>
6118 * configure.in: Handle guile $exec_prefix = $prefix/foo.
6119 * Makefile.am (GUILEINCDIR): New variable.
6121 * configure: Regenerate.
6122 * Makefile.in: Ditto.
6123 * aclocal.m4: Ditto.
6125 Mon Oct 19 13:19:34 1998 Doug Evans <devans@seba.cygnus.com>
6127 * sim-cpu.scm (cgen-extract.c): Delete #include cpu-sim.h
6128 (cgen-semantics.c): Ditto.
6129 * sim-decode.scm (cgen-decode.c): Delete #include cpu-sim.h,cpu-opc.h.
6130 * sim-model.scm (cgen-model.c): Ditto.
6131 * sim.scm (cgen-arch.h): Delete #include @arch@-opc.h.
6132 (cgen-arch.c): Delete #include cpu-sim.h,cpu-opc.h.
6134 * opcodes.scm (read-cpu.opc): Handle empty file.
6136 * cos.scm (-elm-make-method-setter): Fix typo.
6138 * cpu.scm (-init-parse-cpu!): Call types-init!.
6139 (-finish-parse-cpu!): Call types-finish!.
6140 * ifield.scm (<ifield>): Delete members start,length.
6141 New member bitrange.
6142 (<ifield>, methods field-start,field-length): Update.
6143 (fld:start): New arg insn-len. All callers updated.
6144 (<ifield>, methods field-mask,field-value): Update.
6145 (-ifield-parse): Update.
6146 (ifield-init!): Update.
6147 * iformat.scm (compute-insn-length): Simplify.
6148 (compute-insn-mask): Update.
6149 * insn.scm (insn:value): Update.
6150 * mach.scm (<arch-data>): New members default-insn-bitsize,insn-lsb0?.
6151 (current-arch-default-insn-bitsize): New proc.
6152 (current-arch-insn-lsb0?): New proc.
6153 (-arch-parse,-arch-read): Update.
6154 (<cpu>): New member file-transform.
6155 (-cpu-parse,-cpu-read): Update.
6156 * opcodes.scm (<hw-asm>, method gen-extract): Pass ex_info to handler.
6157 (gen-hash-defines): Define CGEN_INSN_LSB0_P.
6158 (CGEN_INT_INSN_P): Renamed from CGEN_INT_INSN.
6159 (gen-insert-switch): Update args of @arch@_cgen_insert_operand.
6160 (gen-extract-switch): Update args of @arch@_cgen_extract_operand.
6161 (gen-opcode-open): Set CGEN_OPCODE_INSN_ENDIAN.
6162 * operand.scm (op:start): Update call to field-start method.
6163 * sim-decode.scm (opcode-slots): New arg lsb0?.
6164 (fill-slot!,build-slots): Ditto.
6165 (build-decode-table-entry,build-decode-table-guts): Ditto.
6166 (gen-decoder-table,gen-decoder-switch,gen-decoder): Ditto.
6167 (gen-decode-fn): Ditto.
6168 (cgen-decode.c): Update call to gen-decode-fn.
6169 * sim.scm (gen-argbuf-type): Move `semantic' to cpu specific part.
6170 (-gen-cpu-header,-gen-cpuall-includes): New procs.
6171 (cgen-cpuall.h): Call -gen-cpuall-includes.
6172 * types.scm (<bitrange>): New class.
6173 (types-init!,types-finish!): New procs.
6174 * utils-cgen.scm (parse-number): New proc.
6175 (parse-boolean): New proc.
6176 * utils.scm (word-value): Renamed from shift-bits, rewrite.
6177 (word-mask): Rewrite.
6178 * m32r.cpu (define-arch): New fields default-insn-bitsize,insn-lsb0?.
6179 (m32rxf): New field `file-transform'.
6180 * m32r.opc (my_print_insn): print_int_insn -> print_insn.
6182 * hobbit.h: Fix include file name.
6184 Fri Oct 9 16:58:10 1998 Doug Evans <devans@seba.cygnus.com>
6186 * slib: New directory of slib files used by cgen/hobbit.
6187 * hobbit.scm: New file.
6188 * hobbit.c: New file.
6189 * hobbit.h: New file.
6190 * hobscmif.h: New file.
6191 * hob-main.c: New file.
6192 * hobslib.scm: New file.
6194 * Makefile.am: Add support for compiling hobbit, and using compiled
6195 version of hobbit to compile cgen.
6196 * Makefile.in: Regenerate.
6197 * configure.in: Support --with-hobbit.
6198 * configure: Regenerate.
6199 * acconfig.h (WITH_HOBBIT): Add.
6200 * config.in: Regenerate.
6202 * rtl.scm: New file, was cdl-c.scm.
6203 Definition of rtx funcs moved to rtx-funcs.scm.
6204 (semantic-in-out-operands): Rewrite to compute object form of
6206 * rtx-funcs.scm: New file.
6208 * cgen-gh.c: #include "config.h".
6209 (gh_cadddr,gh_cddddr): New fns.
6210 (cgh_vector_to_list): New fn.
6211 (cgh_map1,cgh_map2,cgh_map1_fn2): Rewrite.
6212 (cgh_init): Prefix qsort procs with "cgh-".
6213 * cgen-gh.h (gh_cadddr,gh_cddddr,cgh_vector_to_list): Declare.
6214 * cgen.c: #include "config.h".
6216 * attr.scm (bitset-attr?): New proc.
6217 (<bitset-attribute>, method parse-value): Value syntax changed from
6218 (val1 val2 ...) to val1,val2,....
6219 (<bitset-attribute>): New method gen-value.
6220 (<integer-attribute>): New method gen-value.
6221 (<enum-attribute>): New method gen-value.
6222 * cpu.scm: Disable debugging evaluator if (not (defined? 'DEBUG-EVAL)).
6223 (<reader>): New class.
6224 (CURRENT-ARCH,CURRENT-READER): New globals.
6225 (keep-mach?): Move here from mach.scm.
6226 * mach.scm (arch,arch-comment,arch-default-mach): Delete.
6227 (<arch>): New class.
6228 (<arch-data>): New class.
6229 (<cpu>): Make subclass of <ident>.
6230 (*ENDIAN* variables): Delete.
6231 (process-state-vars): Delete.
6232 (mach-finish!): Add `base' value to MACH attribute.
6233 * hardware.scm (<hardware>): Make subclass of <ident>.
6234 (hw:std-attrs): New global.
6235 (hw-profilable?): New proc.
6236 * ifield.scm (<ifield>): Make subclass of <ident>.
6237 (sort-ifield-list): Move here from iformat.scm.
6238 * iformat.scm (<iformat>): Renamed from <insn-format>.
6239 Make subclass of <ident>.
6240 (-ifmt-search-key): Include cti? in categorization of formats.
6241 (ifmt-analyze): Compile semantics (turn to object form).
6242 * insn.scm (<insn>): Make subclass of <ident>.
6243 New member compiled-semantics.
6244 (insn:std-attrs): Add SKIP-CTI, VIRTUAL.
6245 * mode.scm (<mode>): Make subclass of <ident>.
6247 * model.scm (<unit>): Make subclass of <ident>.
6248 New members inputs,outputs.
6249 (<model>): Make subclass of <ident>. New member state.
6250 (-unit-parse): Parse inputs,outputs.
6251 (<iunit>): New class.
6252 (-insn-timing-parse-model): New proc.
6253 (parse-insn-timing): Function unit spec rewritten.
6254 * operand.scm (<operand>): Make subclass of <ident>.
6255 New members sem-name,num,cond? New method gen-pretty-name.
6256 (hw-index-scalar): New global.
6257 (op-nub-hw): Move here from rtl.scm.
6258 (op:lookup-sem-name,op-profilable?): New procs.
6259 * pmacros.scm: Rewrite to pass through hobbit.
6260 * utils-cgen.scm (gen-attr-defn): Simplify using new gen-value method.
6261 * utils.scm (logit): Make a macro.
6262 (bit-set?): Rewrite.
6263 (high-part): Rewrite.
6265 * m32r.cpu (define-arch): Move to top of file.
6266 (cpu family m32rbf): Renamed from m32rb.
6267 (model m32r/d): Function unit spec rewritten.
6268 (all insns): Ditto. Replace UBI with BI.
6270 * opcodes.scm (gen-attr-table-decls): Declare
6271 @arch@_cgen_hw_attr_table.
6272 (gen-attr-table-defns): Generate hw attribute table.
6274 * sim-cpu.scm (-gen-engine-decls): New proc.
6275 (-gen-model-decls): New proc.
6276 (gen-parallel-exec-type): Add new member `written' to struct parexec.
6277 (-gen-record-args): Add SEM_BRANCH_INIT_EXTRACT if cti insn.
6278 (-gen-record-profile-args): Simplify.
6279 (-gen-parallel-sem-case): Delete.
6280 (gen-semantic-fn): Emit SEM_BRANCH_{INIT,FINI} if cti insn.
6281 New local `written'. Delete profiling code.
6282 (-gen-sem-case): Ditto.
6283 (-uncond-written-mask,-any-cond-written?): New procs.
6284 (cgen-sem-switch.c): Include duplicates of insns that can be executed
6285 parallelly or serially, and write-back handlers for all parallel insns.
6286 * sim-decode.scm (-gen-decode-insn-globals): Add parallel write-back
6287 support to initialization of struct insn_sem.
6288 (-gen-idesc-decls): Add parallel write-back support to struct idesc.
6289 (-gen-insn-sem-type): Add parallel write-back support to struct
6291 (-gen-idesc-init-fn): Add support for virtual insns.
6292 Add parallel write-back support.
6293 * sim-model.scm (gen-model-profile-fn): Delete
6294 (-gen-model-fn-decls): New proc.
6295 (-gen-model-insn-fn,-gen-model-insn-fns): New procs.
6296 (-gen-model-init-fn): New proc.
6297 (-gen-mach-defns): Initialize insn-name lookup and fast/full engine_fn
6298 members in @mach@_init_cpu.
6299 (cgen-model.c): Generate model handlers for each insn.
6300 * sim.scm (gen-define-field-macro): Cti insns handled differently.
6301 (<hw-pc>): New method gen-write.
6302 (<hw-register>, method gen-write): New arg `mode'.
6303 (<hw-register>): Delete method gen-record-profile!.
6304 New method gen-profile-index-type.
6305 (<hw-memory>, method gen-write): New arg `mode'.
6306 (<hw-address>, method gen-extract): Delete.
6307 (<hw-address>, method gen-write): New arg `mode'.
6308 (<hw-index>, method get-write-index): Rewrite.
6309 (<pc>, method cxmake-get-direct): Delete.
6310 (<pc>): New method cxmake-get. Comment out methods
6311 gen-set-quiet,gen-set-trace.
6312 (<operand>): New methods gen-argbuf-elm,gen-profile-argbuf-elm,
6313 gen-profile-index-type,gen-profile-code.
6314 Delete method gen-pretty-name. Rewrite method gen-write.
6315 Delete method cxmake-get-direct.
6316 (-op-gen-set-trace): Update `written'.
6317 (-op-gen-set-trace-parallel): Ditto.
6318 (-gen-hw-index-raw,-gen-hw-index): Handle strings.
6319 (gen-cpu-insn-enum-decl): Add extra entries for parallel
6320 insns and their write-back handlers.
6321 (insn-op-lookup): New proc.
6322 (<unit>): New method gen-profile-code.
6323 (<iunit>): New method gen-profile-code.
6324 (gen-argbuf-elm): Add profiling elements.
6325 (gen-argbuf-type): Define cti insns separately in their own struct.
6326 Add member `addr_cache' to this struct. Add entries for pbb virtual
6327 insns. Move semantic entries here from struct scache.
6328 Delete everything from struct scache except argbuf.
6329 (<insn>, method gen-profile-locals): Rewrite.
6330 (<insn>, method gen-profile-code): Rewrite.
6331 (sim-finish!): Create virtual pbb insns.
6333 Tue Sep 15 15:22:02 1998 Doug Evans <devans@canuck.cygnus.com>
6335 * m32r.cpu (h-cr): Add bbpc,bbpsw.
6336 (h-sm,h-bsm,h-ie,h-bie,h-bcond,h-bpc): Delete.
6337 (h-psw,h-bpsw,h-bbpsw): Define.
6338 (rte,trap): Handle bbpc,bbpsw.
6339 * opcodes.scm (max-operand-instances): Fix typo.
6340 * sim.scm (<hardware-base>, method 'fun-access?): Don't force virtual
6341 hardware elements to be fun-access.
6342 (-hw-gen-fun-get,-hw-gen-fun-set): Fix handling of scalars.
6344 Wed Sep 9 15:28:55 1998 Doug Evans <devans@canuck.cygnus.com>
6346 * m32r.cpu (trap): Pass `pc' to m32r_trap.
6348 Mon Aug 10 14:29:33 1998 Doug Evans <devans@canuck.cygnus.com>
6350 * opcodes.scm (gen-insn-table-entry): Comment out generation of cdx.
6352 Mon Aug 3 11:51:04 1998 Doug Evans <devans@seba.cygnus.com>
6354 * m32r.cpu (cpu m32rb): Renamed from m32r to distinguish from
6356 (mach m32r): Update.
6358 * mach.scm (mach:supports?): New proc.
6359 * sim-cpu.scm (gen-cpu-reg-access-{decls,defns}): Renamed from
6360 gen-reg-access-{decls,defns}.
6361 * sim.scm (gen-reg-access-{decl,defn}): New procs.
6362 (gen-mach-bfd-name): New proc.
6363 (gen-arch-reg-access-{decls,defns}): New procs.
6364 (cgen-arch.[ch]): Output register access cover fns.
6366 * hardware.scm (hardware-builtin!): Set print handlers for
6368 * m32r.opc (parse_hash,parse_hi16,parse_slo16,parse_ulo16): New arg
6370 (CGEN_PRINT_NORMAL,print_hash): Ditto.
6371 (my_print_insn): Ditto. Delete args buf, buflen.
6372 * opcodes.scm: Pass `od' (opcode-descriptor) to all C handlers.
6373 (-hw-asm-specs): Add `handlers' spec.
6374 (-parse-hw-asm): Lookup class at runtime. If no asm-spec, use
6376 (<hw-asm>): Renamed from <opval>. New elements parse,insert,extract,
6378 (<hw-asm>, gen-insert,gen-extract,gen-print): Use them.
6379 (<hw-asm>, parse!): New method.
6380 (gen-insn-table-entry): Print semantics.
6381 (gen-opcode-open): Renamed from gen-opcode-table.
6383 * utils.scm (string-write): No longer a macro.
6384 (-string-write): Handle procedure args.
6385 * opcodes.scm: Update all calls to string-write.
6386 * sim-cpu.scm: Ditto.
6387 * sim-decode.scm: Ditto.
6388 * sim-model.scm: Ditto.
6391 Fri Jul 31 14:40:38 1998 Doug Evans <devans@seba.cygnus.com>
6393 * opcodes.scm (cgen-ibd.h,gen-extra-ibd.h): New procs.
6394 (-gen-insn-builders,-gen-insn-builder): New procs.
6396 Fri Jul 24 11:38:59 1998 Doug Evans <devans@canuck.cygnus.com>
6398 * opcodes.scm (gen-syntax-entry): Fix bracketing for -Wall.
6399 (gen-opcode-table): Properly terminate comment.
6401 Tue Jul 21 10:51:42 1998 Doug Evans <devans@seba.cygnus.com>
6404 Clean up pass over everything, so starting fresh.