1 2005-06-07 Zack Weinberg <zack@codesourcery.com>
3 * doc/porting.texi: Change all mention of md_apply_fix3 and
4 gas_cgen_md_apply_fix3 to md_apply_fix and gas_cgen_md_apply_fix
7 2005-05-18 Dave Brolley <brolley@redhat.com>
9 * utils-sim.scm (-gen-decode-default-entry): New function.
10 (-gen-decode-insn-entry): Now takes 'invalid-insn' argument. Generate
11 code to check that all opcodes bits match.
12 (-gen-decoder-switch): Use -gen-decode-default-entry.
14 2005-05-16 Jim Blandy <jimb@redhat.com>
16 * sid.scm (gen-ifetch): Require BITSIZE to be exactly the size
17 fetched by one of our GETIMEM* methods.
18 * utils-gen.scm (-extract-chunk-specs): Always fetch full
19 base-insn-sized chunks.
21 2005-05-10 Nick Clifton <nickc@redhat.com>
23 * Update the address and phone number of the FSF organization in
24 the GPL notices in the following files:
25 COPYING.CGEN, utils.scm, cpu/iq2000m.cpu, cpu/openrisc.cpu,
26 cpu/powerpc.cpu, slib/random.scm
28 2005-05-06 Jim Blandy <jimb@redhat.com>
30 * pprint.scm, cos-pprint.scm: Add documentation.
32 * pprint.scm (pprint): Don't wipe out elide-table after each call.
34 * pprint.scm, cos-pprint.scm: New files.
36 2005-04-04 Nick Clifton <nickc@redhat.com>
38 * opcodes.scm (-gen-parse-address): Initialise value to zero to
39 avoid a compile time warning.
41 2005-03-18 Nick Clifton <nickc@redhat.com>
43 * cpu/ip2k.opc (parse_lit8): Change wording of error message to
44 "percent-operand" from "%operand" as the latter confuses xgettext
45 into thinking that it is a C printf formating directive, which
46 prevents proper translation.
48 2005-02-23 Nick Clifton <nickc@redhat.com>
50 * opcodes.scm (gen-parse-number): Add a cast to the desired
51 pointer signed'ness in order to prevent compile time warnings.
52 * cpu/ip2k.opc: Fixed compile time warnings about differing
53 signed'ness of pointers passed to functions.
54 * cpu/iq2000.opc: Likewise.
55 * cpu/m32r.opc: Likewise.
56 * cpu/openrisc.opc: Likewise.
57 * cpu/xstormy16.opc: Likewise.
59 2005-02-22 Alan Modra <amodra@bigpond.net.au>
61 * desc-cpu.scm (gen-ifld-decls): Move cgen_ifld_table from here..
62 (cgen-desc.h): ..to here, after opcode/cgen.h include.
64 2005-02-16 Dave Brolley <brolley@redhat.com>
66 * utils.scm: Update copyright years.
67 * utils-gen.scm (gen-ifld-extract): Pass base-length to -gen-ifld-extract-base.
68 * sid.scm (gen-ifetch): Handle the case where bitsize == 24.
69 * operand.scm (-derived-operand-parse): Move logit message from level 1
72 2005-02-15 Nick Clifton <nickc@redhat.com>
74 * opc-itab.scm (-gen-ifmt-table-1): Add an ATTRIBUTE_UNUSED to
75 prevent compile time warning messages.
76 * opc-opinst.scm (-gen-operand-instance-table): Likewise.
77 * utils-gen.scm (attr-int-gen-defn): Likewise.
78 (attr-gen-defn): Likewise.
79 * cpu/ip2k.opc (parse_addr16_p): Remove unused function.
80 (print_dollarhex16): Remove unused function.
82 2005-02-15 Jim Blandy <jimb@redhat.com>
84 * guile.scm (cgen-call-with-debugging): Doc fix.
86 Make backtraces work more reliably.
87 * guile.scm: Set up debugging parameters, and enable debugging and
88 source positions while loading.
89 (cgen-call-with-debugging, cgen-debugging-stack-start): New
91 * read.scm: Don't set debugging parameters here.
92 (catch-with-backtrace): Function deleted.
93 (-cgen): Simply note the presence or absence of the -b option.
94 Pass the flag to cgen-call-with-debugging, so debugging is turned
95 off here if the user didn't request it, for faster computation.
96 (cgen): Call cgen-debugging-stack-start here, instead of
99 * Makefile.am (GUILE): Explicitly load guile.scm here, and leave a
101 (desc, html, opcodes, sim-arch, sim-cpu, gas-test, sim-test):
102 Don't write out the trailing -s here.
103 * Makefile.in: Regenerated.
104 * cgen-doc.scm, cgen-gas.scm, cgen-stest.scm): Don't load
105 fixup.scm here; let the caller decide which Scheme's customization
107 * dev.scm: Load guile.scm, not fixup.scm.
108 * fixup.scm: Deleted; contents have all moved to guile.scm.
111 * guile.scm (debug-write): New function.
113 2005-02-14 Jim Blandy <jimb@redhat.com>
115 * pmacros.scm (pmacros-init!): For .eval macros, use eval1 as the
116 transformer procedure, not eval. Transformer procedures take one
119 2005-02-11 Nick Clifton <nickc@redhat.com>
121 * cpu/iq2000.opc (parse_jtargq10): Change type of valuep argument
122 to 'bfd_vma *' in order avoid compile time warning message.
124 2005-02-09 Jim Blandy <jimb@redhat.com>
126 * cgen-sim.scm (load-files): Don't load fixup.scm. (See
127 corresponding change in the sim/common directory.)
129 2005-02-07 Jim Blandy <jimb@redhat.com>
131 * cgen-opc.scm: Don't load fixup.scm here. (See corresponding
132 changes in the opcodes directory.)
134 * guile.scm: New file, containing Guile-specific definitions and
135 adaptations. This is loaded by the app-specific shell scripts.
136 Initially identical to fixup.scm.
137 * cgen-sid.scm: Don't load fixup.scm here.
139 * cos.scm: Profile elm-xset! when requested, not elm-set!; the
142 2005-01-27 Jim Blandy <jimb@redhat.com>
144 * utils.scm (string/symbol->append): Renamed from 'concat'.
145 * opcodes.scm (gen-switch): Use new name.
146 * insn.scm (-sub-insn-make!): Same.
147 * rtl.scm (rtx-dump): Same.
148 * semantics.scm (semantic-compile): Same.
150 2005-01-20 Jim Blandy <jimb@redhat.com>
152 * opcodes.scm (gen-switch): Use concat instead of string-map.
154 * utils.scm (concat): New function.
155 * insn.scm (-sub-insn-make!): Use concat instead of string-map.
156 * rtl.scm (rtx-dump): Same.
157 * semantics.scm (semantic-compile): Same.
159 2004-12-16 Jim Blandy <jimb@redhat.com>
161 * utils-cgen.scm (parse-name): Don't assume that string-map can be
162 applied to symbols. Process everything as strings, and then
163 convert to a symbol at the end.
165 * read.scm (debug-repl): Temporarily redirect input and output to
166 /dev/tty while we debug, so we don't interfere with whatever CGEN
167 is reading or writing.
168 * utils.scm (setter-getter-fluid-let, with-input-and-output-to):
171 2004-11-15 Michael K. Lechner <mike.lechner@gmail.com>
173 * cpu/iq2000.cpu: Added quotes around macro arguments so that they
174 will work with newer versions of guile.
176 2004-10-27 Nick Clifton <nickc@redhat.com>
178 * cpu/iq2000m.cpu: Import latest version from cpu/ directory.
179 * cpu/iq2000.cpu: Likewise.
181 2004-07-21 DJ Delorie <dj@redhat.com>
183 * cpu/xstormy16.cpu (movhmemgr): Use hmem8, not lmem8.
185 2003-03-14 Frank Ch. Eigler <fche@redhat.com>
187 * cpu/iq2000.opc (parse_jtargq10): Add ATTRIBUTE_UNUSED on unused args.
188 (parse_jtargq10, iq2000_cgen_isa_register, parse_mlo16): Declare.
190 2004-03-30 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
192 * cpu/m32r.opc (parse_hi16): Fixed shigh(0xffff8000) bug.
194 2004-03-22 Dave Brolley <brolley@redhat.com>
196 * utils.scm (copyright-fsf): Update copyright years.
197 (copyright-red-hat): Ditto.
198 * sid.scm (-op-gen-set-trace): Generate trace code before semantic
200 (-op-gen-set-trace-parallel): Ditto.
202 2004-02-10 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.dot.com>
204 * cpu/m32r.opc (my_print_insn): Fixed incorrect output when
205 disassembling codes for 0x*2 addresses.
207 2004-01-29 Dave Brolley <brolley@redhat.com>
209 * decode.scm (-opcode-slots): For short insns, generate 'opcode' with
210 zeroes in the extra bit positions and generate 'opcode-mask' with ones
211 in the extra bit positions.
213 2003-12-15 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
215 * cpu/m32r.cpu: Add PIPE_O attribute to "pop" instruction.
217 2003-12-04 Alan Modra <amodra@bigpond.net.au>
219 * cpu/openrisc.opc (openrisc_sign_extend_16bit): Don't rely on
220 "short" being 16 bit.
221 (parse_hi16): Likewise. Fix type-punned pointer warnings too, and
222 internationalize error message.
223 (parse_lo16): Likewise. Remove useless code.
225 2003-12-03 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
227 * cpu/m32r.cpu : Add new model m32r2.
228 Add new instructions.
229 Replace occurrances of 'Mitsubishi' with 'Renesas'.
230 Changed PIPE attr of push from O to OS.
231 Care for Little-endian of M32R.
232 * cpu/m32r.opc (CGEN_DIS_HASH, my_print_insn):
233 Care for Little-endian of M32R.
234 (parse_slo16): signed extension for value.
236 2003-10-26 Dave Brolley <brolley@redhat.com>
238 * sid-decode.scm (-gen-record-profile-args): Test trace_counter_p
239 and final_insn_count_p. Don't test WITH_PROFILE_MODEL_P.
240 (-gen-extract-fn): Call -gen-record-profile-args.
242 2003-10-21 Dave Brolley <brolley@redhat.com>
244 * sid-model.scm (-gen-model-class-decls): Generate MAX_UNITS as
246 * decode.scm (-opcode-slots): Correct typo in logit call.
248 2003-10-09 Jim Blandy <jimb@redhat.com>
250 * desc-cpu.scm (gen-hw-table-decls): Emit an 'extern' declaration
251 for @arch@_cgen_hw_table. GDB needs to be able to find this.
253 * mach.scm (def-isa-attr!): hardware can have ISA attributes, too.
255 2003-10-06 Dave Brolley <brolley@redhat.com>
257 * gen-all-doc: Add fr550.
259 2003-09-11 Doug Evans <dje@sebabeach.org>
261 * Makefile.am (ARCHFILE): New var.
262 (desc): Pass $(ARCHFILE) for -a parm, not $(ARCH).
263 (html,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Ditto.
264 * Makefile.in: Regenerate.
266 2003-09-08 Dave Brolley <brolley@redhat.com>
268 On behalf of Doug Evans <dje@sebabeach.org>
269 Pass in paths to input files, instead of assuming they live in
270 $srcdir/cpu. Plus misc. option processing cleanup.
271 * cgen-doc.scm (doc-arguments): Make options strings not symbols.
272 Add pre-process pass to all options.
273 * cgen-gas.scm (gas-arguments): Ditto.
274 * cgen-sid.scm (sim-arguments): Ditto.
275 * cgen-sim.scm (sim-arguments): Ditto.
276 * cgen-stest.scm (stest-arguments): Ditto.
277 * cgen-opc.scm (opc-arguments): Ditto. New argument -OPC.
278 (-opc-file-path): New global.
279 (opc-file-path): New fn.
280 * opcodes.scm (read-cpu.opc): Replace srcdir,cpu args with opc-file.
282 (gen-extra-cpu.h,gen-extra-cpu.c,gen-extra-opc.h,gen-extra-opc.c,
283 gen-extra-asm.c,gen-extra-dis.c,gen-extra-ibld.h,gen-extra-ibld.c):
284 Replace srcdir arg with opc-file. All callers updated.
285 * read.scm (-opt-spec-update): Delete.
286 (opt-get-first-pass,opt-get-second-pass): New fns.
287 (-cgen): Process application-specific arguments in two passes.
289 2003-08-29 Dave Brolley <brolley@redhat.com>
291 * cpu/frv.cpu: Removed.
292 * cpu/frv.opc: Removed.
294 2003-08-21 Nick Clifton <nickc@redhat.com>
296 * cpu/frv.cpu (mbtoh): Replace input parameter to
297 u-media-dual-expand and u-media-dual-btoh with output parameter.
298 (cmbtoh): Add profiling hack.
300 2003-08-19 Michael Snyder <msnyder@redhat.com>
302 * cpu/frv.cpu: Fix typo, Frintkeven -> FRintkeven
304 2003-08-07 Michael Meissner <gnu@the-meissners.org>
306 * opc-opinst.scm (-gen-operand-instance-table): Initialize all of
307 the elements for the END record of CGEN_OPINST, silencing warnings.
309 2003-07-15 Doug Evans <dje@sebabeach.org>
311 Add guile 1.6.4 support.
312 - empty list must be quoted
313 - string functions have stricter type checking
314 - eval now takes a second argument
315 - symbol-bound? is deprecated
316 * attr.scm (-attr-parse): Use stringsym-append to build errtxt.
317 (bitset-attr->list): Ensure arg to string-cut is a string.
318 (attr-parse): Ensure args to string-ref and string-drop1 are strings.
319 (<enum-attribute>,gen-value-for-defn): Fetch string name of self.
320 * cos.scm (-class-list): Must quote empty list.
321 (-class-parent-classes,-class-compute-class-desc): Ditto.
322 (class-make,make,object-reset!): Ditto.
323 (method-make-make!): Call eval1 instead of eval.
324 (method-make-forward!,method-make-virtual-forward!): Ditto.
325 * decode.scm (subdtable-add): Use stringsym-append instead of
327 (-gen-exprtable-name): Fetch string name of exprtable-entry-insn.
328 (-build-decode-table-entry): Fetch string name of insn.
329 * desc-cpu.scm (-gen-isa-table-defns): Fetch string name of isa.
330 (-gen-mach-table-defns): Ditto for mach.
331 (gen-ifld-defns): Ditto for ifld.
332 (gen-hw-table-defns): Ditto for hw.
333 (gen-operand-table): Ditto for op.
334 (gen-insn-table-entry): Ditto for insn.
335 * desc.scm (gen-attr-table-defn): Ditto for attr.
336 (<keyword>,gen-defn): Don't pass symbols to string-append.
337 * enum.scm (parse-enum-vals): Use symbolstr-append instead of
339 (enum-vals-upcase): Use symbol-upcase to build result.
340 (-enum-parse): Use stringsym-append to build errtxt.
341 * fixup.scm (*guile-major-version*,*guile-minor-version*): New globals.
342 (eval1): New function.
343 (symbol-bound?): Provide own version if >= guile 1.6.
344 * hardware.scm (define-keyword): Use string-append instead of
346 * html.scm (gen-html-header,gen-table-of-contents,gen-arch-intro,
347 cgen.html,cgen-insn.html): Convert current-arch-name to a string
349 (gen-list-entry): Handle either symbol or string `name' arg.
350 (gen-obj-doc-header): Fetch string name of `o' arg.
351 (define-cpu-intro): Ditto for cpu.
352 (gen-mach-intro): Ditto for mach.
353 (gen-model-intro): Ditto for model.
354 (gen-isa-intro): Ditto for isa.
355 (gen-machine-doc-1): Ditto for isa.
356 (gen-reg-doc-1): Convert mach to string first.
357 (gen-insn-doc-1): Ditto. Convert model/unit names to strings first.
358 (gen-insn-doc-list): Fetch string name of mach. Convert insn name
360 (gen-insn-categories): Fetch string name of mach. Convert
361 enum-val-name to string first.
362 (gen-insn-docs): Fetch string name of mach.
363 * ifield.scm (ifld-ilk): Result is a string.
364 * iformat.scm (-ifmt-search-key): Convert attr value to string first.
365 Fetch string name of ifld.
366 (-sfmt-search-key): Similarily for ifld and op.
367 * insn.scm (syntax-make): Fetch string name of syntax element.
368 * mach.scm (-cpu-parse): Use stringsym-append to build errtxt.
369 * minsn.scm (minsn-make-alias): Fetch string name of minsn.
370 * mode.scm (mode:c-type): Result is a string.
371 (mode:enum): Fetch string name of mode.
372 (-mode-parse): Use stringsym-append to build errtxt.
373 * model.scm (model:enum): Fetch string name of model.
374 (-model-parse): Use stringsym-append to build errtxt.
375 (parse-insn-timing): Must quote empty list.
376 * opc-itab.scm (-gen-minsn-table-entry): Fetch string name of minsn.
377 (-gen-minsn-opcode-entry): Ditto.
378 * opcodes.scm (<operand>,gen-function-name): `what' arg is a symbol,
380 (read-cpu.opc): Convert current-arch-name to a string before using.
381 * operand.scm (<operand>,gen-pretty-name): Ensure `name' is a string.
382 (<derived-operand>): Must quote empty list.
383 (op-sort): Simplify, call alpha-sort-obj-list to do sort.
384 * pgmr-tools.scm (pgmr-pretty-print-insn-value): Fetch string name
386 * pmacros.scm (-pmacro-build-lambda): Use eval1 instead of eval.
387 (-pmacro-sym): Must convert symbols to strings before passing to
389 (-pmacro-str): Ditto.
390 (pmacros-init!): Use eval1 instead of eval.
391 * read.scm (keep-mach-atlist?): Simplify, use bitset-attr->list.
392 (keep-isa-atlist?): Ditto.
393 (cmd-if): Use eval1 instead of eval.
394 * rtl-c.scm (<c-expr>,get-name): Fetch string name of self.
395 (-rtl-c-get): Fetch string name of src.
396 (s-unop): Ditto for mode.
397 (s-binop,s-binop-with-bit,s-shop,s-convop,s-cmpop): Ditto.
398 (-gen-par-temp-defns,subword): Ditto.
399 (join): Use stringsym-append instead of string-append.
400 * rtl-traverse.scm (rtx-option?): Convert option to string first.
401 (rtx-traverse-debug): Fetch string name of rtx-obj.
402 * rtl.scm (def-rtx-node): Use eval1 instead of eval.
403 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
404 (rtx-pretty-name): Result is a string.
405 (-rtx-hw-name): Use symbolstr-append instead of symbol-append.
406 * semantics.scm (semantic-compile): Simplify, use alpha-sort-obj-list.
407 * sid-cpu.scm (cgen-write.cxx): Convert current-arch-name to a string
409 (-gen-sfrag-case): Fetch string name of user.
410 * sid-model.scm (unit:enum): Fetch string name of unit.
411 * sid.scm (<hw-memory>,cxmake-get): Fetch string name of mode.
412 (<hw-memory>,gen-set-quiet): Ditto.
413 (gen-mode-defs): Ditto.
414 (sim-finish!): Convert current-arch-name to a string before using.
415 * sim-cpu.scm (-gen-scache-semantic-fn): Fetch string name of insn.
416 (-gen-no-scache-semantic-fn): Ditto.
417 (cgen-defs.h): Fetch string name of isa.
418 (cgen-read.c): Convert current-arch-name to a string before using.
419 (cgen-write.c): Ditto.
420 * sim-model.scm (unit:enum): Fetch string name of unit.
421 (gen-model-fn-decls): Use stringsym-append instead of string-append.
422 (-gen-model-timing-table): Fetch string name of model.
423 (-gen-mach-model-table): Ditto.
424 (-gen-mach-defns): Fetch string name of mach.
425 * sim.scm (gen-reg-access-defn): Fetch string name of hw.
426 (<hw-memory>,cxmake-get): Fetch string name of mode.
427 (<hw-memory>,gen-set-quiet): Ditto.
428 (gen-mode-defs): Ditto.
429 (sim-finish!): Must quote empty list.
430 * utils-cgen.scm (<ident>): Must quote empty list.
431 (obj:str-name): New fn.
432 (parse-comment): Result is a string.
433 (parse-symbol): Result is a symbol.
434 (parse-string): Result is a string.
435 (keyword-list?): Convert arg to string before calling string-ref.
436 (keyword-list->arg-list): Ditto.
437 (gen-attr-name): Convert attr-name to string first.
438 (alpha-sort-obj-list): Use symbol<? instead of string<?.
439 * utils-gen.scm (attr-gen-decl): Fetch string name of attr.
440 (gen-define-ifmt-ifields): Ditto for fld.
441 * utils.scm (gen-c-symbol): Ensure str is a string before calling
443 (gen-file-name): Ditto.
444 (symbol-downcase,symbol-upcase,symbol<?): New fns.
445 (stringsym-append,symbolstr-append,->string,->symbol): New fns.
446 (reduce): Call eval1 instead of eval.
447 * cpu/m32r.cpu (addi): Don't use `#.'.
449 * gen-all-sim: Fix some typos.
451 2003-07-08 Doug Evans <dje@sebabeach.org>
453 * gen-all-doc: Ensure run from cgen src dir.
454 * gen-all-opcodes: Build in ./tmp-opcodes. Don't delete dir when done.
455 * gen-all-sid: Similarily, in ./tmp-sid.
456 * gen-all-sim: Similarily, in ./tmp-sim.
458 2003-06-20 Doug Evans <dje@sebabeach.org>
460 * gen-all-sim: Add fr30,sh64 support. Only generate m32r by default.
462 2003-06-19 Doug Evans <dje@sebabeach.org>
464 * mach.scm (-ifld-already-defined?): New proc.
465 (current-ifld-add!): Use it.
466 (-op-already-defined?): New proc.
467 (current-op-add!): Use it.
468 (-insn-already-defined?): New proc.
469 (current-insn-add!): Use it.
470 (-minsn-already-defined?): New proc.
471 (current-minsn-add!): Use it.
472 (obj-isa-list): New proc.
473 (isa-supports?): Use it.
475 2003-06-10 Doug Evans <dje@sebabeach.org>
477 * insn.scm (insn-builtin!): RELAX renamed to RELAXABLE.
478 * cpu/m32r.cpu (all insns): Ditto.
480 * mach.scm (current-*-add!): Disallow redefinition. Make result
483 * gen-all-doc: Split arm and frv docs up a bit.
485 * cpu/arm.cpu: Add IDOC attribute.
486 * cpu/frv.cpu: Ditto.
487 * cpu/i960.cpu: Ditto.
488 * cpu/openrisc.cpu: Ditto.
489 * cpu/xstormy16.cpu: Ditto.
490 * cpu/m32r.cpu: Ditto.
491 (all insns): Explicitly specify IDOC attribute.
493 * Makefile.am (MACH,ISAS,INSN_FILE_NAME): New vars.
494 (desc,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Use MACH,ISAS.
495 (html): Use MACH,ISAS,INSN_FILE_NAME. Generate insn.html separately.
496 * Makefile.in: Regenerate.
497 * attr.scm (<integer-attribute>:parse-value-def): Implement.
498 (-attr-read): Defer computing default value until we know the type.
499 (attr-has-attr?): Delete, move contents to <attr-list>:has-attr?.
500 (<attr-list>:attr-present?): New method.
501 (atlist-attr-present?,obj-attr-present?): New fns.
502 (obj-has-attr-value?,obj-has-attr-value-no-default?): New fns.
503 (attr-builtin!): New insn attr IDOC.
504 * cgen-doc.scm (doc-arguments): New args -I,-N.
505 * enum.scm (parse-enum-vals): New arg errtxt, all callers updated.
506 Support comment as fourth element of enum value.
507 (enum-val-name,enum-val-value,enum-val-attrs,enum-val-comment): New fns.
508 * html.scm (gen-html-header): New arg kind, all callers updated.
509 (gen-table-of-contents): New arg insn-file, all callers updated.
510 (gen-list-entry,gen-doc-header): New fn.
511 (get-operands): Delete.
512 (gen-iformat-table): Rewrite.
513 (gen-insn-doc-1): Print constant-folded and trimmed semantics.
514 (gen-insn-doc-list): New args name, comment, insns. All callers updated.
515 (get-insn-properties,guess-insn-idoc-attr!): New fn.
516 (insn-sets-pc?,insn-refs-mem?,insn-uses-fpu?): New fns.
517 (get-insns-for-category,gen-categories-insn-lists): New fns.
518 (gen-insn-docs): Simplify each insn's semantics first.
519 Print insn tables sorted by IDOC categories.
520 (*insn-html-file-name*): New global.
521 (cgen-insn.html): New fn.
523 * insn.scm (<insn>): Create a setter for the `tmp' member.
524 * semantics.scm (insn-build-known-values): Renamed from
525 -build-known-values. All callers updated.
527 * rtl.scm: Move traveral/evaluation support to ...
528 * rtl-traverse.scm: New file.
529 * read.scm: Maybe-load rtl-traverse.scm.
531 * rtl.scm (-rtx-valid-types): Add SETRTX.
533 * rtx-funcs.scm (nop,parallel): Fix mode.
535 * utils.scm (eqv-lookup-index): New fn.
536 (assq-lookup-index): Renamed from lookup-index. All callers updated.
538 * dev.scm (load-doc): Set APPLICATION.
540 2003-06-10 Dave Brolley <brolley@redhat.com>
542 * sid-cpu.scm: Generate #include of config.h into @prefix@-sem.cxx.
543 * sid-decode.scm: Generate #include of config.h into
545 * sid-model.scm: Generate #include of config.h into @prefix@-model.cxx.
547 2003-06-07 Doug Evans <dje@sebabeach.org>
549 * gen-all-sid: New file.
550 * gen-all-opcodes: New file.
552 2003-06-05 Nick Clifton <nickc@redhat.com>
554 * cpu/frv.cpu (FRintieven): New operand. An even-numbered only
555 version of the FRinti operand.
556 (FRintjeven): Likewise for FRintj.
557 (FRintkeven): Likewise for FRintk.
558 (mdcutssi, media-dual-word-rotate-r-r, mqsaths,
559 media-quad-arith-sat-semantics, media-quad-arith-sat,
560 conditional-media-quad-arith-sat, mdunpackh,
561 media-quad-multiply-semantics, media-quad-multiply,
562 conditional-media-quad-multiply, media-quad-complex-i,
563 media-quad-multiply-acc-semantics, media-quad-multiply-acc,
564 conditional-media-quad-multiply-acc, munpackh,
565 media-quad-multiply-cross-acc-semantics, mdpackh,
566 media-quad-multiply-cross-acc, mbtoh-semantics,
567 media-quad-cross-multiply-cross-acc-semantics,
568 media-quad-cross-multiply-cross-acc, mbtoh, mhtob-semantics,
569 media-quad-cross-multiply-acc-semantics, cmbtoh,
570 media-quad-cross-multiply-acc, media-quad-complex, mhtob,
571 media-expand-halfword-to-double-semantics, mexpdhd, cmexpdhd,
572 cmhtob): Use new operands.
573 * cpu/frv.opc (CGEN_VERBOSE_ASSEMBLER_ERRORS): Define.
574 (parse_even_register): New function.
576 2003-06-04 Doug Evans <dje@sebabeach.org>
578 Better handling of 64 bit and mixed 32/64 bit architectures.
579 * hardware.scm (hw-update-word-modes!): New fn.
580 * mach.scm (define-cpu)): Call mode-set-word-modes!,
581 hw-update-word-modes!.
582 (state-word-bitsize): Replace FIXME with requested check.
583 (arch-analyze-insns!): Call mode-ensure-word-sizes-defined.
584 * mode.scm (mode-find): Ignore INT,UINT.
585 (-mode-word-sizes-kind): New global.
586 (mode-set-word-modes!,mode-set-identical-word-bitsizes!,
587 mode-set-biggest-word-bitsizes!,mode-ensure-word-sizes-defined): New fns.
588 (mode-init!): Initialize -mode-word-sizes-kind. Move initialization
590 (mode-builtin!): ... here. Initialize WI/UWI/AI/IAI to something
591 unusable, correct values set later.
592 (mode-finish!): Remove cruft.
593 * html.scm (doc-init!): Call mode-set-biggest-word-bitsizes!.
594 * opcodes.scm (opcodes-init!): Ditto.
595 * rtx-funcs.scm (annul): Fix mode of pc.
596 * cpu/ia64.cpu: Remove cruft that sets word modes.
597 * cpu/xstormy16.cpu (define-cpu): Set word-bitsize.
599 2003-06-03 Nick Clifton <nickc@redhat.com>
601 * cpu/frv.cpu (media-dual-word-rotate-r-r): Use a signed 6-bit
602 immediate value not unsigned.
604 2003-05-21 J"orn Rennecke <joern.rennecke@superh.com>
606 * cpu/sh.cpu: Amend comments to refer to SuperH.
607 * cpu/sh64-compact.cpu: Change comment to refer to SuperH.
608 * cpu/sh64-media.cpu: Likewise.
609 (Saturation): Update manual reference.
611 2003-05-15 Doug Evans <dje@sebabeach.org>
613 * Makefile.am (srcroot): New var.
615 * Makefile.in: Regenerate.
616 * cgen-doc.scm: New file.
617 * html.scm: New file.
618 * gen-all-doc: New file.
619 * dev.scm (cload): Handle DOC application.
621 * machs.scm (machs-for-cpu): New fn.
622 * model.scm (models-for-cpu): New fn.
623 * utils.scm (gen-c-copyright): Renamed from gen-copyright.
625 (iota): Rewrite to be identical to pmacro version. All uses updated.
626 * utils-cgen.scm (alpha-sort-obj-list): New fn.
628 * utils-sim.scm (-gen-decoder-switch): Back out patch of 2003-01-09.
629 (-gen-decode-bits): Instead put in better fix here.
631 * cpu/i960.cpu (index): Rename to indx. All uses updated.
633 2003-05-01 DJ Delorie <dj@redhat.com>
635 * cpu/xstormy16.cpu (alignfix-mem): Correct logic for unaligned
637 (set-alignfix-mem): Likewise.
639 2003-04-16 Dave Brolley <brolley@redhat.com>
641 * doc/rtl.texi (Iiming): Correct example to use 'model-name'.
642 * utils.scm (copyright-fsf): Update generate copyright years.
643 (copyright-cygnus): Ditto.
644 * sid.scm (-op-gen-set-trace): Generate code to fill in bitmask of modified
646 (-gen-arch-model-decls): Don't generate unit enum declaration or MAX_UNITS
648 (<operand>'gen-profile-code): New parameter 'when'.
649 (<iunit>'gen-profile-code): Ditto.
650 (<insn>'gen-profile-code): Ditto.
651 (<unit>'gen-profile-code): Ditto. Only generate 'referenced' and
652 'insn_reference' for the 'after' function.
653 * model.scm (unit:enum): Moved to sim-model.scm.
654 * sim-model.scm (unit:enum): Moved from model.scm.
655 * sid-decode.scm (-gen-scache-decls): Generate the 'written' field.
656 * cgen-sid.scm (sim-arguments): Document the generation of model.h.
657 * sid-model.scm (unit:enum): New version for sid.
658 (gen-model-class-name): New function.
659 (gen-model-unit-fn-decl): New function.
660 (gen-model-fn-decls): Call gen-model-unit-fn-decl.
661 (gen-model-unit-fn-name): New parameter 'when'.
662 (-gen-model-insn-fn-name): Ditto.
663 (-gen-model-insn-qualified-fn-name): New function.
664 (-gen-model-insn-fn-decl): New function.
665 (-gen-model-insn-fn-decls): New function.
666 (-gen-model-insn-fn): New parameter 'when'. Call
667 -gen-model-insn-qualified-fn-name.
668 (-gen-model-insn-fns): Generate the constructor for the model. Generate
669 functions for modelling insn before and after execution.
670 (-gen-model-class-decls): New function.
671 (" (gen-model-class-name model) "): New function.
672 (gen-model-classes): New function.
673 (-gen-insn-timing): Generate functions for modelling insn before and after
675 (-gen-insn-unit-timing): Generate class-qualified names.
676 (-gen-model-timing-table): Ditto.
677 (cgen-model.cxx): Generate #include for @cpu@.h. Omit generation of code
678 not needed (yet) by sid.
679 (cgen-model.h): New function.
681 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
683 * cpu/sh.cpu: Replace occurrances of 'Hitachi' with 'Renesas'.
684 * cpu/sh64-compact.cpu: Likewise.
685 * cpu/sh64-media.cpu: Likewise.
687 2003-03-21 DJ Delorie <dj@redhat.com>
689 * cpu/xstormy16.cpu (basic-psw): New argument ws (wordsize),
690 which indicates if the sign flag is set from bit 15 or 7.
692 (set-psw): New argument ws, propogate it.
693 (set-psw-nowrite): Likewise.
694 (set-mem-psw): Likewise.
695 (set-psw-carry): Likewise. Use temporaries to prevent
696 prematurely overwriting needed inputs.
697 (set-psw-rrotate17): Fix logic.
698 (shrgrgr): Preserve carry for zero-bit shifts.
699 (shrgrimm): Likewise.
701 (shlgrimm): Likewise.
703 (asrgrimm): Likewise.
706 2003-03-12 Frank Ch. Eigler <fche@redhat.com>
708 * sid.scm: Set APPLICATION to SID-SIMULATOR.
710 2002-03-05 DJ Delorie <dj@redhat.com>
712 * cpu/xstormy16.cpu (set-psw-add): Use temporaries to prevent
713 prematurely overwriting needed inputs.
714 (set-psw-sub): Likewise.
716 Fri Feb 21 19:48:19 2003 J"orn Rennecke <joern.rennecke@superh.com>
718 * cpu/sh64-media.cpu (make-mextr): Fix setting of count.
720 2003-02-18 DJ Delorie <dj@redhat.com>
722 * xstormy16.cpu (set-mem-alignfix-psw): Remove.
723 (movlmemimm): Just mask the address.
724 (movhmemimm): Likewise.
725 (movlmemgr): Likewise.
726 (movhmemgr): Likewise.
727 (set-psw): Always set the psw last.
728 (set-psw-carry): Likewise.
729 (set-psw-add): Likewise.
730 (set-psw-sub): Likewise.
732 * xstormy16.cpu (set-psw-rrotate17): New. Choose the correct set
733 of 16 patterns from the set-psw-rotate17 function.
734 (movgrigr, movgripostincgr, movgripredecgr, movgriigr,
735 movgriipostincgr, movgriipredecgr): Set psw correctly.
736 (movfgrigr, movfgripostincgr, movfgripredecgr, movfgriigr,
737 movfgriipostincgr, movfgriipredecgr): Fix semantics.
738 (rrcgrgr, rrcgrimm4): Use new set-psw-rrotate17 function.
740 2003-02-11 Dave Brolley <brolley@redhat.com>
742 * desc-cpu.scm (gen-ifld-defns): Add all ifields to the
743 @arch@_cgen-ifld_table.
744 (gen-maybe-multi-ifld): Use the ifield enumerators to index the
745 @arch@_cgen-ifld_table.
747 2003-02-03 Frank Ch. Eigler <fche@redhat.com>
749 * sid-cpu.scm (-gen-sfrag-engine-fn): Generate more hygienic C++.
751 2003-01-09 Graydon Hoare <graydon@redhat.com>
753 * utils-sim.scm (-gen-decoder-switch): Fix edge condition for
756 2003-01-07 Graydon Hoare <graydon@redhat.com>
758 * utils-gen.scm (attr-int-gen-defn): Define.
760 2002-12-21 Doug Evans <dje@sebabeach.org>
762 * ifield.scm (-ifield-parse): Rewrite <bitrange> computation.
763 (-get-ifld-word-offset,-get-ifld-word-length): New fns.
765 * dev.scm (cload): Update location of .cpu files.
767 2002-12-19 Doug Evans <dje@sebabeach.org>
769 * utils-sim.scm (gen-profile-sym): New fn.
770 (<operand>,sbuf-profile-sym): New method.
771 (<operand>,sbuf-profile-elm): Use it.
772 * sim.scm (<operand>,gen-record-profile): Use sbuf-profile-sym instead
773 of hardcoding symbol name.
774 (<operand>,gen-profile-code): Ditto.
775 (<unit>,gen-profile-code): Use gen-profile-sym instead of hardcoding
778 * mode.scm (mode-sem-mode): New fn.
779 * operand.scm (op:new-mode): Update. mode-name.
780 (op-natural-mode?) New fn.
781 * rtl.scm (hw): Set hw-name,mode-name.
783 Back out sim*.scm changes of 2001-04-02 Ben Elliston <bje@redhat.com>
785 * sim-decode.scm (-gen-decode-insn-globals): Use @PREFIX@_INSN__MAX
786 as size of IDESC-TABLE-VAR.
787 (@prefix@_init_idesc_table): Ditto.
788 * sim-model.scm (-gen-mach-defns): Ditto.
789 * sim.scm (gen-cpu-insn-enum-decl): Rename last elm from max to -max.
791 * utils-sim.scm (-gen-decode-insn-entry): Fix some spacing in output.
793 * insn.scm (-parse-insn-format-symbol): Improve error message.
794 (-parse-insn-format): Ditto.
796 * gen-all-sim: New script.
798 2002-12-16 DJ Delorie <dj@delorie.com>
800 * cpu/xstormy16.opc (parse_immediate16): Add prototype.
802 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
804 * cpu/xstormy16.cpu (imm16): Call handler immediate16.
805 * cpu/xstormy16.opc (parse_small_immediate): Return on '@'.
806 (parse_immediate16): Handle immediate16 values, which now include
807 @hi(label) and @lo(label)
809 2002-12-03 Alan Modra <amodra@bigpond.net.au>
811 * desc-cpu.scm (gen-maybe-multi-ifld): Remove superfluous parens.
812 Add braces and cast for union field.
813 (gen-multi-ifield-nodes): Add braces and cast for union field.
814 (cgen_operand_table): Similarly fix sentinel.
815 (cgen_cpu_close): Constify "insns". Formatting.
816 (cgen-desc.c): Include xregex.h.
817 * cpu/ip2k.opc (ip2k_cgen_insn_supported): Move to opc.c section.
819 <opc.c>: Include safe-ctype.h.
820 (ip2k_asm_hash): Use ISSPACE and TOLOWER.
821 (PARSE_FUNC_DECL): Declare. Use to prototype parse_fr, parse_addr16,
822 parse_addr16_p, parse_addr16_cjp, parse_lit8 and parse_bit3.
823 (parse_fr): Constify "old_strp". Correct type of "tempvalue".
824 Don't test it for >= 0. Use ISSPACE rather than isspace. Formatting.
825 (parse_addr16): Correct type of "value". Formatting.
826 (parse_addr16_p): Likewise.
827 (parse_addr16_cjp): Likewise.
828 (parse_lit8): Likewise.
829 (parse_bit3): Formatting.
830 (PRINT_FUNC_DECL): Define. Use to prototype print_fr, print_dollarhex,
831 print_dollarhex8, print_dollarhex16, print_dollarhex_addr16h,
832 print_dollarhex_addr16l, print_dollarhex_p, print_dollarhex_cj and
834 (print_fr): Add ATTRIBUTE_UNUSED on unused args. Formatting.
835 (print_dollarhex): Add ATTRIBUTE_UNUSED on unused args.
836 (print_dollarhex8): Likewise.
837 (print_dollarhex16): Likewise.
838 (print_dollarhex_addr16h): Likewise.
839 (print_dollarhex_addr16l): Likewise.
840 (print_dollarhex_p): Likewise.
841 (print_dollarhex_cj): Likewise.
842 (print_decimal): Likewise.
843 * cpu/xstormy16.opc (parse_mem8): Use ISALNUM rather than isalnum.
845 2002-11-30 Hans-Peter Nilsson <hp@axis.com>
847 * doc/rtl.texi (Model variants): Mention current limitations for
848 unit inputs and outputs.
849 (Hardware elements) <attribute PROFILE>: Be slightly more
851 (Instructions) <timing>: input/output overrides have a direction
854 2002-11-25 DJ Delorie <dj@redhat.com>
856 * xstormy16.cpu (sdiv, divlh, sdivlh): Fix sdivlh/divlh encodings.
858 2002-11-21 Jeff Johnston <jjohnstn@redhat.com>
860 * cpu/iq10.cpu: New file.
861 * cpu/iq2000.cpu: Likewise.
862 * cpu/iq2000.opc: Likewise.
863 * cpu/iq2000m.cpu: Likewise.
865 2002-11-19 DJ Delorie <dj@redhat.com>
867 * cpu/xstormy16.cpu (sdiv, divlh, sdivlh): New.
869 2002-11-05 Frank Ch. Eigler <fche@redhat.com>
871 * dev.scm: Call getenv with a string, not a symbol.
873 2002-10-08 Doug Evans <dje@transmeta.com>
874 Hans-Peter Nilsson <hp@axis.com>
876 * types.scm (bitrange-overlap?): Handle lsb0?.
878 2002-09-07 Frank Ch. Eigler <fche@redhat.com>
880 From Robert Cragie <rcc@jennic.com>:
881 * cpu/arm7.cpu (ldm*-sw*, stm*-sw*): New instructions.
883 2002-07-17 Frank Ch. Eigler <fche@redhat.com>
884 Ben Elliston <bje@redhat.com>
885 John Healy <jhealy@redhat.com>
886 Jeff Johnston <jjohnstn@redhat.com>
887 Alan Lehotsky <alehotsky@redhat.com>
888 Ubicom Inc. <SupportDesk@ubicom.com>
890 * cpu/ip2k.cpu: New file.
891 * cpu/ip2k.opc: Likewise.
893 2002-07-01 Hans-Peter Nilsson <hp@axis.com>
895 * utils-gen.scm (-gen-extract-word): Handle lsb0?.
897 2002-06-25 J"orn Rennecke <joern.rennecke@superh.com>
899 * cpu/sh64-compact.cpu (movw5): Use Correct operand field for reg.
900 * cpu/sh64-media.cpu (-ldhi-byte, -ldhi-word, -ldhi-long): New macros.
901 (-ldlo-byte, -ldlo-word, -ldlo-long): Likewise.
902 (-sthi-word, -sthi-long -stlo-byte, -stlo-word, -stlo-long): Likewise.
903 (ldhil, ldhiq, ldlol, ldloq, stlol, stloq): Implement.
904 (mshfhib, mshfhil, mshfhiw, mshflob, mshflol, mshflow): Fix indices.
905 (-sthi-byte): If there is a single byte to store, store it at
907 (sthil, sthiq): Fix big-endian behaviour.
908 (mcnvslw, mcnvswb, mcnvswub, mmacfxwl, mmacnfx.wl): Fix indices.
909 (mmulfxl, mmulfxw, mmulfxrpw, mmulhiwl, mmullowl): Likewise.
910 (saturate): Use Dimode to check if saturation operation is required.
911 (usaturate): Likewise.
913 (-maddsl, -maddsub): Compute to-be-saturated value in wider mode.
914 (-maddsw, mmacfxwl, mmacnfx.wl, -mshaldsl, -mshaldsw): Likewise.
915 (-mshardl, -mshardw, -msubsl, -msubsub, -msubsw): Likewise.
916 (msadubq): Fix subword index in second operand of first subtraction.
918 2002-06-20 Hans-Peter Nilsson <hp@axis.com>
920 * sim-cpu.scm (gen-semantic-code): Prepend with setup-semantics
923 2002-06-18 Dave Brolley <brolley@redhat.com>
925 * cpu/frv.cpu: New cpu description.
926 * cpu/frv.opc: New cpu support code.
928 2002-05-21 Dave Brolley <brolley@redhat.com>
930 * decode.scm (-opcode-slots): Don't consider bits beyond the
933 2002-05-17 Johan Rydberg <jrydberg@rtmk.org>
935 * cpu/powerpc.cpu: New file.
937 2002-05-01 Graydon Hoare <graydon@redhat.com>
939 * desc-cpu.scm (@arch@_cgen_cpu_close): Fix memory leaks.
941 2002-03-20 Hans-Peter Nilsson <hp@axis.com>
943 * doc/pmacros.texi (Symbol concatenation): Mention that .sym
944 results are expanded recursively.
946 2002-03-19 Hans-Peter Nilsson <hp@axis.com>
948 * pmacros.scm (-pmacro-expand,scan): If result is a symbol,
949 call scan-symbol on it, to enable recursive macro-expansion.
951 2002-01-25 Frank Ch. Eigler <fche@redhat.com>
953 * sid-cpu.scm (-gen-hardware-types): Generate single hardware union
954 for multiple-isa configurations.
955 * sid-decode.scm (-gen-decode-fn): Tolerate empty insn list.
957 2002-02-04 Ben Elliston <bje@redhat.com>
959 * cpu/sh.cpu, cpu/sh.opc: New files.
960 * cpu/sh64-comact.cpu, cpu/sh64-media.cpu: Likewise.
962 2002-01-29 Hans-Peter Nilsson <hp@axis.com>
964 * doc/rtl.texi: Fix typo: define-attr, not define-attribute.
965 (Enumerated constants): Mention that an ifield must not specify a
967 (Instruction operands): Ditto for index.
968 (Expressions) <parallel>: Remove misplaced mention of local
970 <if>: Mention that mode must be specified and non-VOID when the
973 2002-01-28 Hans-Peter Nilsson <hp@axis.com>
975 * doc/porting.texi: When referring to *.opc, mention they are in
976 the cpu subdir. Call top-level directory toplevel, not devo.
977 Close string in define-normal-insn example.
979 * doc/pmacros.texi: Fix .substr typo to .substring.
980 Mention that .sym expansions are not further expanded.
982 2002-01-22 Graydon Hoare <graydon@redhat.com>
984 * desc-cpu.scm (ifld-number-cache): Add.
986 (gen-maybe-multi-ifld-of-op): Add.
987 (gen-maybe-multi-ifld): Add.
988 (gen-multi-ifield-nodes): Add.
989 (cgen-desc.c): Add call to gen-multi-ifield-nodes.
991 2002-01-10 matthew green <mrg@redhat.com>
993 * cpu/xstormy16.cpu (gr-Rbj-names): Rename this ...
994 (gr-Rb-names): ... to this.
995 (h-Rb): New hardware piece.
996 (h-Rbj): Use gr-Rb-names.
998 (holdx): New instruction.
1000 2002-01-07 Ben Elliston <bje@redhat.com>
1002 * utils.scm (package-cygnus-simulators): Rename from this ..
1003 (package-red-hat-simulators): .. to this.
1004 * opcodes.scm (option-set!): Use package-red-hat-simulators.
1005 * sid-cpu.scm (cgen-desc.h): Likewise.
1006 (cgen-cpu.h): Likewise.
1007 (cgen-defs.h): Likewise.
1008 (cgen-write.cxx): Likewise.
1009 (cgen-semantics.cxx): Likewise.
1010 (cgen-sem-switch.cxx): Likewise.
1011 * sid-decode.scm (cgen-decode.h): Likewise.
1012 (cgen-decode.cxx): Likewise.
1013 * sid-model.scm (cgen-model.cxx): Likewise.
1014 * sid.scm (option-set!): Likewise.
1015 * sim.scm (option-set!): Likewise.
1017 2002-01-07 Ben Elliston <bje@redhat.com>
1019 * utils.scm (copyright-fsf): Add 2002.
1020 (copyright-cygnus): Rename to copyright-red-hat.
1021 (copyright-red-hat): Add 2002.
1022 (CURRENT-COPYRIGHT): Update comment.
1023 * opcodes.scm (option-set!): Update callers.
1024 * sid-model.scm (cgen-model.cxx): Likewise.
1025 * sid-cpu.scm: Likewise.
1026 * sid-decode.scm: Likewise.
1027 * sid.scm (option-set!): Handle "redhat" as an option for
1028 "copyright"; use copyright-red-hat.
1029 * sim.scm (option-set!): Likewise.
1031 2002-01-03 Dave Brolley <brolley@redhat.com>
1033 * decode.scm (-distinguishing-bit-population): Compute num-insns, the
1034 number of insns in the list. Update the population count function to
1035 identify and prioritize 3 catgories of useful bits.
1036 (-population-top-few): Don't consider bits with a population count of
1038 (-build-decode-table-entry): Don't call
1039 filter-harmlessly-ambiguous-insns. Filter out non-specialized and
1040 identical insns at the next tree level.
1041 * insn.scm (filter-harmlessly-ambiguous-insns): Note in a comment that
1042 this function is no longer used.
1043 (filter-non-specialized-ambiguous-insns): New function.
1044 (filter-identical-ambiguous-insns): New function.
1045 (find-identical-insn): New function.
1046 (filter-harmlessly-ambiguous-insns): Removed.
1048 2001-11-26 Geoffrey Keating <geoffk@redhat.com>
1049 matthew green <mrg@redhat.com>
1050 Frank Ch. Eigler <fche@redhat.com>
1051 Nick Clifton <nickc@cambridge.redhat.com>
1053 * cpu/xstormy16.cpu: New file.
1054 * cpu/xstormy16.opc: New file.
1056 2001-11-26 Frank Ch. Eigler <fche@redhat.com>
1058 * doc/sim.texi, rtl.texi, porting.texi: Correct texinfo markup typos.
1060 2001-11-14 Dave Brolley <brolley@redhat.com>
1062 * utils-gen.scm (-gen-extract-word): Correct computation of the length
1063 of the field being extracted.
1065 2001-10-29 Johan Rydberg <johan@rydberg.com>
1067 * doc/rtl.texi (Expressions): Document the (error ..), (sqrt ..),
1068 (cos ...) and (sin ..) rtx.
1070 2001-10-13 Nick Clifton <nickc@cambridge.redhat.com>
1072 * desc-cpu.scm: Do not include ctype.h in generated desc
1073 files. They will inherit safe-ctype.h instead.
1075 2001-10-08 Nick Clifton <nickc@cambridge.redhat.com>
1077 * desc-cpu.scm: Add missing function prototypes (for generated
1078 C files). Fix compile time warning messages about unused
1079 parameters (for generated C files).
1080 * opc-asmdis.scm: The same.
1081 * opc-ibld.c: The same.
1082 * opc-itab.scm: The same.
1083 * cpu/fr30.opc: The same.
1084 * cpu/m32r.opc: The same.
1085 * cpu/openrisc.opc: The same.
1087 2001-09-17 graydon hoare <graydon@redhat.com>
1089 * insn.scm (syntax-break-out): Correct logic in handling escaped
1092 2001-07-12 Jeff Johnston <jjohnstn@redhat.com>
1094 * opc-itab.scm (@arch@_cgen_init_opcode_table): Unconditionally
1095 call @arch@_cgen_build_insn_regex now that regex support is in
1098 2001-07-12 Frank Ch. Eigler <fche@redhat.com>
1100 * insn.scm (filter-harmlessly-ambiguous-insns): Fix msg typo.
1101 (mask-superset?): Look for strict supersets to allow rejection of
1104 2001-07-11 Frank Ch. Eigler <fche@redhat.com>
1106 * sid-cpu.scm (-gen-mach-params): New proc to emit ...CHUNK_BITSIZE...
1107 (cgen-desc.h): Call it.
1108 * sid-decode.scm (-gen-decode-fn): Use base-insn-bitsize as
1110 * utils-sim.scm (-gen-decode-insn-entry): For SID only, prepare
1111 entire_insn for extraction, if it's shorter than base-insn-bitsize.
1113 2001-07-11 Frank Ch. Eigler <fche@redhat.com>
1115 * desc-cpu.scm (-gen-mach-table-defns): Emit fourth field: the
1116 mach->cpu insn-chunk-bitsize.
1117 (-gen-cpu-open): In @arch@_cgen_rebuild_tables, process above new
1118 field toward CGEN_CPU_TABLE->insn_chunk_bitsize.
1119 * mach.scm (<cpu>): New field insn-chunk-bitsize.
1120 (-cpu-parse, -cpu-read): Parse/initialize it.
1121 * doc/rtl.texi (define-cpu): Document it.
1123 2001-07-09 Geoffrey Keating <geoffk@redhat.com>
1125 * ifield.scm (<ifield> 'field-start): Don't look at word-len.
1127 2001-07-06 Ben Elliston <bje@redhat.com>
1129 * opcodes.scm (read-cpu.opc): Read .opc files from subdir/cpu.
1131 2001-07-05 Ben Elliston <bje@redhat.com>
1135 * read.scm (include): Include files from srcdir/cpu.
1136 (-cgen): Likewise for loading .cpu files.
1137 * sid.scm (sim-finish!): Read .sim files from srcdir/cpu.
1138 * *.cpu: Move all cpu descriptions into cpu subdirectory.
1140 * simplify.inc: Likewise.
1142 2001-07-04 Ben Elliston <bje@redhat.com>
1144 * read.scm (include): Log "Including file" message at level 1,
1145 rather than outputting it with (display).
1146 (cpu-load): Log "Loading cpu description" and "Processing cpu
1147 description" messages at levels 1 and 2, respectively, rather than
1150 2001-06-14 Geoffrey Keating <geoffk@redhat.com>
1152 * desc.scm (<keyword> 'gen-defn): Add extra zero into
1153 CGEN_KEYWORD_ENTRY initializers.
1155 * gas-test.scm (gen-gas-test): Create 8 testcases, not just 5.
1156 (<operand> 'test-data): Involve both the index and the hardware
1157 in testcase generation.
1158 (<hw-indx> 'test-data): Generate test data from the underlying
1160 (<ifield> 'test-data): Generate test data by computing bit
1161 patterns for the field, then decoding them.
1162 (<hw-address> 'test-data): Allow for new calling convention.
1163 (<hw-iaddress> 'test-data): Likewise.
1164 (<keyword> 'test-data): Convert index values into keywords.
1165 (<hw-asm> 'test-data): Convert index values into integer strings.
1167 * gas-test.scm (cgen-build.sh): Escape '.' as well.
1169 2001-06-01 Frank Ch. Eigler <fche@redhat.com>
1171 * rtl.scm (hw): Encode hw access mode into <operand> name, since this
1172 is required for multi-mode hw types (memory).
1174 2001-05-11 Ben Elliston <bje@redhat.com>
1176 * gas-test.scm (cgen-build.sh, gentest): Escape $ with a backslash
1177 when generating allinsn.d from objdump output. Without it, the
1178 testsuite will treat $ as the regular expression for end of line.
1180 2001-05-09 Ben Elliston <bje@redhat.com>
1182 * doc/porting.texi (Doing a GAS port): Replace `cgen_opcode_open'
1183 with `cgen_cpu_open'; documentation had become out of date.
1184 * doc/rtl.texi (Instruction operands): Likewise.
1186 2001-05-07 Frank Ch. Eigler <fche@redhat.com>
1188 * iformat.scm (compute-insn-base-mask-length): Rewrite to tolerate
1189 various-base-length instruction sets.
1191 2001-04-02 Ben Elliston <bje@redhat.com>
1193 * sid-cpu.scm (-last-insn): New function.
1194 (-gen-sem-switch-engine): Loop through idesc while less than or
1195 equal to the last instruction enum, not less than the MAX enum.
1196 (-gen-sfrag-engine-fn): Clean up frag_label_table initialisation.
1197 * sid-decode.scm (-gen-decode-insn-globals): Define the idesc
1198 table's size to be the last instruction enum plus one, not
1200 * sid.scm (gen-cpu-insn-enum-decl): Do not append a dummy `max'
1201 instruction onto the instruction list.
1203 * sim-decode.scm (@prefix@_init_idesc_table): Compute tabsize
1204 using the size of the table and its elements.
1205 (-gen-decode-insn-globals): Define the idesc table's size to be
1206 the last instruction enum plus one, not @PREFIX@_INSN_MAX.
1207 * sim-model.scm (-gen-mach-defns): Define CPU_MAX_INSNS as the
1208 last instruction enum plus one, not @CPU@_INSN_MAX.
1210 2001-03-28 Ben Elliston <bje@redhat.com>
1212 * doc/version.texi (UPDATED, EDITION): Update.
1213 * doc/stamp-vti: Likewise.
1215 2001-03-26 Ben Elliston <bje@redhat.com>
1217 * doc/credits.texi (Credits): Update.
1219 * gas-test.scm (<keyword>,test-data): Prefix keywords by their
1220 specified prefix and, if necessary, escape `$' in gas-build.sh to
1221 prevent unwanted shell variable expansion.
1223 2001-03-24 Ben Elliston <bje@redhat.com>
1225 * gas-test.scm (<hw-asm>,test-data): Choose pseudo-random data.
1226 (<keyword>,test-data): Likewise.
1227 (<hw-address>,test-data): Likewise.
1228 (<hw-iaddress>,test-data): Likewise.
1229 (-collate-test-set): New function.
1230 (build-test-set): Use it.
1231 (gen-gas-test): Generate five test cases per instruction.
1232 (cgen-allinsn.exp): Include "-*- Tcl -*-" in DejaGNU test file.
1234 * read.scm: Load "slib/random" if random is not defined.
1235 * slib/random.scm: New file.
1237 * utils.scm: Remove comments about the Hobbit compiler.
1238 (copyright-cygnus): Add 2001.
1239 (package-cygnus-simulators): Replace "Cygnus" with "Red Hat".
1240 (package-gnu-simulators): Tidy.
1242 2001-03-23 Ben Elliston <bje@redhat.com>
1244 * cgen-gas.scm: Inline documentation improvements.
1246 2001-03-21 Ben Elliston <bje@redhat.com>
1248 * opc-itab.scm (compute-syntax): Emit a parse error if an operand
1249 given in a syntax string is undefined.
1251 * opc-itab.scm (compute-syntax): Emit a parse error if an operand
1252 name is empty or invalid -- eg. "$(rs)" instead of "($rs)".
1254 2001-03-20 Patrick Macdonald <patrickm@redhat.com>
1256 * desc-cpu.scm (@arch@_cgen_cpu_open): Correct machine calculation
1257 for arg_type CGEN_CPU_OPEN_BFDMACH.
1259 2001-03-20 Ben Elliston <bje@redhat.com>
1261 * opc-itab.scm (-gen-insn-enum): Do not append a dummy `max'
1262 instruction onto the instruction list. Define MAX_INSNS to be the
1263 value of the last instruction enum plus one.
1265 2001-03-14 Nick Clifton <nickc@redhat.com>
1267 * utils.scm (copyright-fsf): Add 2001. Remove (C).
1269 2001-03-05 Dave Brolley <brolley@redhat.com>
1271 * sim-decode.scm (-gen-extract-case): Generate declaration of "insn"
1272 if the number of ifields is greater than zero.
1274 2001-03-01 Frank Ch. Eigler <fche@redhat.com>
1276 * sid.cpu (-op-gen-set-trace[-parallel], -create-virtual-insns!):
1277 Emit LIKELY/UNLIKELY branch probability hints.
1278 * sid-decode.cpu (-gen-record-args): Ditto.
1280 2001-02-02 Patrick Macdonald <patrickm@redhat.com>
1282 * desc-cpu.scm (-gen-hash-defines): Rename
1283 CGEN_ACTUAL_MAX_SYNTAX_BYTES to CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS.
1285 2001-01-26 Frank Ch. Eigler <fche@redhat.com>
1287 * sid-cpu.scm (gen-parallel-exec-type): Use unsigned long long for
1289 (-gen-write-fn, -gen-sem-case, -gen-sfrag-case): Ditto.
1290 * sid-decode.scm (-gen-scache-decls): Exclude writeback tracking field
1292 * sid.scm (<operand> gen-write): Use unsigned long long expression
1294 (-op-gen-set-trace, -op-gen-set-trace-parallel): Ditto.
1295 (<unit> gen-profile-code): Ditto.
1297 2001-01-23 Johan Rydberg <jrydberg@opencores.org>
1299 * doc/rtl.texi (Expressions): Document the (index-of ...) and
1302 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
1304 * operand.scm (<operand> pretty-sem-name): New field.
1305 (<operand> make): Initialize it from hw-name.
1306 (op:set-pretty-sem-name!): New function.
1307 (<operand> gen-pretty-name): Default to fetching new field.
1308 * rtl.scm (hw): Copy hw-name to pretty-sem-name instead. Restore
1309 sem-name setting from -rtx-hw-name.
1311 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
1313 * rtl.scm (hw): Copy hw-name to new operand's sem-name, to simplify
1314 its subsequent gen-pretty-name.
1316 * read.scm: Increase thread working stack limit and backtrace
1319 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
1321 * doc/rtl.texi: Deprecate and depreciate the decode-assist construct.
1323 2001-01-06 Johan Rydberg <jrydberg@opencores.org>
1325 * openrisc.cpu (or32): Setup semantics for h-delay-insn to
1326 current insn plus 4.
1327 (h-delay-insn): New hardware register.
1328 (l-jal): Uses h-delay-insn instead of pc when setting link register.
1332 * openrisc.opc (parse_hi16): Sign extend value.
1333 (parse_lo16): Likewise.
1335 2001-01-06 Ben Elliston <bje@redhat.com>
1337 * utils-gen.scm (gen-sfmt-enum-decl): Use @prefix@ and @PREFIX@
1338 instead of @cpu@ and @CPU@ to generically prefix symbol names.
1339 * sim-cpu.scm (-gen-sem-fn-table-entry): Likewise.
1340 (-gen-semantic-fn-table): Likewise.
1341 (-gen-scache-semantic-fn): Likewise.
1342 (-gen-no-scache-semantic-fn): Likewise.
1343 (cgen-read.c): Likewise.
1344 (cgen-sem-switch.c): Likewise.
1345 * desc-cpu.scm (cgen-desc.c): Use @arch@, not @prefix@, since this
1346 is a filename prefix.
1347 * sim-decode.scm (IDESC-TABLE-VAR): Use @prefix@, et al.
1348 (-gen-decode-insn-globals): Likewise.
1349 (-gen-idesc-decls): Likewise.
1350 (cgen-decode.h): Likewise.
1351 (cgen-decode.c): Likewise.
1352 * sim.scm (gen-cpu-insn-enum-decl): Likewise.
1353 (gen-cpu-insn-enum): Likewise.
1354 (sim-finish!): Likewise.
1356 2001-01-05 Johan Rydberg <jrydberg@opencores.org>
1358 * openrisc.cpu: New file.
1359 * openrisc.opc: Likewise.
1361 2000-12-12 Ben Elliston <bje@redhat.com>
1363 * doc/rtl.texi (Expressions): Document the (delay ..) rtx.
1365 2000-12-07 Ben Elliston <bje@redhat.com>
1367 * sim-decode.scm (-gen-extract-case): Do not emit a definition for
1368 "insn" when there are zero ifields to extract.
1370 2000-12-04 Frank Ch. Eigler <fche@redhat.com>
1372 * utils-sim.scm (gen-define-argbuf-macro): Handle sfmt=#f case, to be
1373 used by simple/non-scache simulators.
1374 * sim-cpu.scm (-gen-read-case): Call gen-define/undef-field-macro
1375 regardless of with-scache?.
1376 (-gen-write-case, -gen-no-scache-semantic-fn, -gen-sem-case): Ditto.
1378 2000-12-03 Ben Elliston <bje@redhat.com>
1380 * desc-cpu.scm (cgen-desc.h): Clarify generated filenames.
1381 (cgen-desc.c): Likewise.
1383 2000-12-01 Greg McGary <greg@mcgary.org>
1385 * desc.scm (<keyword>,gen-defn): Prepend prefix to keyword names.
1387 2000-12-01 Ben Elliston <bje@redhat.com>
1389 * sim-cpu.scm (cgen-cpu.h): Only emit argbuf, scache and extract
1390 definitions if run without with-multipla-isa?.
1391 (cgen-defs.h): New function. Emit an ISA-specific defs file.
1392 * cgen-sim.scm (sim-arguments): Accept -G option to generate defs.
1394 2000-11-24 Ben Elliston <bje@redhat.com>
1396 * sim-cpu.scm (-gen-hardware-struct): New function.
1397 (-gen-hardware-types): If with-multiple-isa is specified, emit all
1398 hardware elements wich have share one or more ISAs with the ISAs
1401 * sim.scm (-with-multiple-isa?): New symbol.
1402 (with-multiple-isa?): New function.
1403 (option-init!): Initialise -with-multiple-isa?.
1404 (option-set!): Handle with-multiple-isa option.
1406 2000-11-21 Ben Elliston <bje@redhat.com>
1408 * utils.scm (copyright-fsf): Add the year 2000.
1410 2000-11-20 Frank Ch. Eigler <fche@redhat.com>
1412 * opc-itab.scm (-gen-ifmt-table, -gen-macro-insn-table: Remove
1413 unneeded "\n\n" from F() macro definition.
1415 2000-11-15 Greg McGary <greg@mcgary.org>
1417 * utils-cgen.scm (gen-define-with-symcat): New function.
1418 * desc-cpu.scm (gen-ifld-defns): Use it.
1419 (gen-hw-table-defns): Use it.
1420 (-gen-hash-defines): Use it.
1421 (gen-operand-table): Use it.
1422 (gen-insn-table): Use it. Remove spurious `#undef MNEM'.
1423 * opc-itab.scm (-gen-ifmt-table): Use it.
1424 (-gen-insn-opcode-table): Use it.
1425 (-gen-macro-insn-table): Use it.
1426 * opc-opinst.scm (-gen-operand-instance-tables): Use it.
1427 * sim-cpu.scm (cgen-semantics.c): Use it.
1428 (cgen-sem-switch.c): Use it.
1430 2000-11-10 Frank Ch. Eigler <fche@redhat.com>
1432 * utils-sim.scm (-gen-decode-insn-entry): Add fn? parameter to signal
1433 request to emit calls to insn extractors as functions rather than
1434 branches to inline blocks.
1435 (-gen-decode-expr-set-itype, -gen-decode-expr-entry): Ditto.
1436 (-gen-decode-table-entry, -gen-decoder-switch, gen-decoder): Ditto.
1438 * sim-decode.c (-gen-decode-fn): Tell (gen-decode) to emit branches
1439 to extractor clauses.
1441 2000-11-10 Frank Ch. Eigler <fche@redhat.com>
1443 * decode.scm (-distinguishing-bit-population): Significantly
1444 improve popularity heuristic. Renamed from
1445 (-mask-bit-population): Gone.
1446 (-population-above-threshold): Sort new bit numbers in order of
1448 (-population-top-few): Allow up to three more bits to be selected
1449 than requested. Correct selection order to prefer better bits.
1450 Correct bug in fewer-than-requested case. Keep threshold as
1452 (decode-best-get-bits): Pass also the insn-values.
1454 * utils-sim.scm (-gen-decoder-switch): Add comment suggesting a
1455 future optimization.
1457 * utils.scm (message): Format nested lists better.
1459 2000-11-09 Doug Evans <dje@casey.transmeta.com>
1461 * dev.scm: Add srcdir to %load-path.
1463 * rtx-funcs.scm (subword): Mode of argument can be different
1464 than mode of result, so don't use OP0 to specify argument's mode.
1466 2000-11-02 Ben Elliston <bje@redhat.com>
1468 * doc/porting.texi (Building a GAS test suite): Document my change
1471 2000-11-01 Ben Elliston <bje@redhat.com>
1473 * sim-test.scm (cgen-build.sh): Include "-*- Asm -*-" in test cases.
1475 2000-10-31 Ben Elliston <bje@redhat.com>
1477 * gas-test.scm (cgen-build.sh): Allow the generated script to run
1478 with no command line arguments if the gas build directory can be
1481 2000-10-26 Doug Evans <dje@casey.transmeta.com>
1483 * insn.scm (-parse-insn-format-symbol): Fix spelling error,
1484 op-ifld -> op-ifield.
1486 2000-10-23 Frank Ch. Eigler <fche@redhat.com>
1488 * thumb.scm (cc-tests): Add (ISA thumb) attribute.
1490 2000-10-13 matthew green <mrg@cygnus.com>
1492 * utils-cgen.scm (get-ifetch): Move from here ...
1493 * sim.scm (get-ifetch): ... to here.
1494 * sid.scm (get-ifetch): Copy and port to c++.
1496 2000-10-06 Dave Brolley <brolley@redhat.com>
1498 * utils-gen.scm (-gen-ifld-extract-base): Compute start position as
1499 ifld-start + ifld-word-offset.
1500 (gen-ifld-extract): Check adata-integral-insn? before checking whether
1501 the field is beyond the base number of bits.
1502 (gen-define-ifields): Use a base-length of 32 if adata-integral-insn?.
1503 (gen-extract-ifields): Ditto.
1504 * gas-test.scm (gentest): Generate backslashes before '[' and ']'
1505 characters in the regular expression.
1507 2000-10-02 Frank Ch. Eigler <fche@redhat.com>
1509 * desc-cpu.scm: (gen-operand-decls): Emit MAX_OPERANDS as a
1510 preprocessor constant.
1512 2000-09-21 Frank Ch. Eigler <fche@redhat.com>
1514 * slib/logical.scm: New file from slib. Provides robust bitwise
1515 logical operations for large integers.
1516 * read.scm: maybe-load it.
1518 2000-09-15 Frank Ch. Eigler <fche@redhat.com>
1520 * enum.scm (define-full-insn-enum): Filter with keep-isa predicate.
1521 * ifield.scm (-ifield-parse, -multi-ifield-parse): No longer assert
1522 single-isa predicate, but support keep-isa filtering.
1524 2000-09-08 Frank Ch. Eigler <fche@redhat.com>
1526 * rtl-c.scm (s-sequence): Handle nested c-calls in both
1527 statement-expression and comma-expression contexts.
1528 (s-c-call, s-c-raw-call): Add warning comment about bad assumption.
1530 2000-09-08 Frank Ch. Eigler <fche@redhat.com>
1532 * decode.scm (-population-top-few): Signal error gracefully if
1533 decoding is about to become ambiguous.
1535 2000-09-06 Frank Ch. Eigler <fche@redhat.com>
1537 * doc/rtl.texi (decode-assist): Describe this field as optional.
1539 2000-09-06 Frank Ch. Eigler <fche@redhat.com>
1541 * utils-gen.scm (gen-multi-ifld-extract): Handle case of multi-ifield
1544 2000-09-05 Dave Brolley <brolley@redhat.com>
1546 * sim.scm (sim-finish!): Honour the definition of FAST_P when calling
1547 @cpu@_pbb_begin. Use 0 if FAST_P is not defined.
1549 2000-08-29 Dave Brolley <brolley@redhat.com>
1551 * utils-gen.scm (gen-ifld-extract): Pass total-len if
1552 adata-integral-insn is true for this architecture.
1554 2000-08-24 Frank Ch. Eigler <fche@redhat.com>
1556 * hardware.scm (<hw-immediate> get-index-mode): Define method.
1557 * operand.scm (<operand> gen-pretty-name): Tolerate no op:sem-name.
1558 * rtl-c.scm (-c-rtl-get): Improve an error message.
1559 * sim.scm (-op-gen-set-trace): Support <derived-operand> lvalues.
1561 2000-08-22 Frank Ch. Eigler <fche@redhat.com>
1563 * Makefile.in (DIST_COMMON): Regenerated.
1564 * ifield.scm (<derived-ifield> needed-iflds): New method.
1565 * iformat.scm (-ifmt-lookup-sfmt!): Use base ifields for
1566 sfmts built from <derived-ifield>s.
1567 * operand.scm (-derived-parse-encoding): Give <derived-ifield> a fixed
1568 type symbol 'derived-ifield, not an unparseable string.
1569 * utils-sim.scm (op-needed-iflds) Handler 'derived-ifield case.
1570 (-sfmt-contents): Add tracing.
1572 From Doug Evans <dje@transmeta.com>:
1573 * sim.scm (<operand> cxmake-get): Result is a <c-expr>, not a string of
1576 2000-08-20 Doug Evans <dje@casey.transmeta.com>
1578 * rtl-c.scm (rtl-c-expr-with-estate): New fn.
1579 (rtl-c-expr-parsed,rtl-c-expr): New fns.
1580 (-rtl-c-get): Rename from rtl-c-get.
1581 (rtl-c-get): New fn for getter logging.
1583 2000-07-28 Ben Elliston <bje@redhat.com>
1587 2000-07-25 Ben Elliston <bje@redhat.com>
1589 * doc/credits.texi (Credits): Add Frank Eigler.
1591 2000-07-24 Dave Brolley <brolley@redhat.com>
1593 * opc-itab.scm (gen-insn-opcode-table): Initialize the first element
1595 * desc.scm (gen-attr-table-defn): Initialize all elements fully.
1596 (<keyword>): Initialize all elements fully.
1597 * desc-cpu.scm (-gen-isa-table-defns): Initialize the last element
1599 (-gen-mach-table-defns): Ditto.
1600 (-gen-ifld-defns): Ditto.
1601 (-gen-operand-table): Ditto.
1602 (-gen-insn-table): Ditto.
1603 (-gen-cpu-open): Nothing to do for the mach table.
1605 2000-07-13 Ben Elliston <bje@redhat.com>
1607 * doc/version.texi (UPDATED): Update.
1609 2000-07-05 Ben Elliston <bje@redhat.com>
1611 * configure.in (AC_PATH_PROG): Remove.
1612 * configure: Regenerate.
1613 * Makefile.am (GUILE): Locate guile dynamically.
1614 * Makefile.in: Regenerate.
1615 * doc/Makefile.in: Likewise.
1617 2000-07-03 Ben Elliston <bje@redhat.com>
1619 * desc-cpu.scm (cgen-desc.c): Include "libiberty.h".
1620 * opc-itab.scm (cgen-opc.c): Likewise.
1622 2000-06-28 Frank Ch. Eigler <fche@redhat.com>
1624 * rtl.scm (-rtx-traverse-locals): Correct call to `symbol?' for
1625 guile 1.4 compatibility.
1626 (rtx-env-dump): Comment out buggy display calls.
1628 2000-06-15 matthew green <mrg@redhat.com>
1630 * opc-itab.scm (-gen-ifmt-table-1): Add extra braces to pacify GCC.
1632 2000-06-14 Frank Ch. Eigler <fche@redhat.com>
1634 * Makefile.in: Regenerated.
1636 * desc-cpu.scm (gen-ifld-decls): Exclude derived ifields.
1637 (gen-ifld-defns): Ditto.
1638 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
1639 * rtl.c (rtl-finish!): Ditto.
1640 * opc-itab.scm (-gen-ifield-decls): Ditto.
1641 * opcodes.scm (gen-switch): Exclude derived operands.
1642 * operand.scm (op-iflds-used): Expand derived operands.
1643 (hw-index-derived): New dummy function to create dummy object.
1644 (-derived-operand-parse): Fix mode arg passed to <derived-operand>
1645 constructor. Set object's hw-name and index fields.
1646 (-anyof-merge-subchoices): Set instance object's index also.
1647 (-anyof-name): New helper function.
1648 (anyof-merge-semantics): Correct replacement of operand names in
1650 (op-ifield): Tolerate derived-operands and their funny indices better.
1651 * ifield.scm (ifld-known-values): Expand derived ifields.
1652 (non-multi-ifields, non-derived-ifields): New utility functions.
1653 (ifld-decode-mode): Tolerate objects with unbound decode field.
1654 * iformat.scm (compute-insn-length): Expand derived ifields.
1655 (compute-insn-base-mask): Ditto.
1656 * insn.scm (insn-base-ifields): Remove.
1657 (<insn>): Add iflds-values entry to cache ifld-base-ifields values.
1658 (insn-value): Call ifld-base-ifields and ifld-constant? instead.
1659 * mach.scm (arch-analyze-insns!): Exclude multi-insns.
1660 * sem-frags.scm (sim-sfrag-analyze-insns!): Ditto.
1661 (-frag-test-data): Ditto.
1662 * sid-cpu.scm (cgen-write.cxx,-gen-sem-switch): Ditto.
1663 (-gen-sem-switch-engine); Ditto.
1664 * sid-model.scm (-gen-model-insn-fns, -gen-model-timing-table): Ditto.
1665 * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
1666 (-gen-record-args): Tolerate unbound op-ifield.
1667 * sid.scm (<derived-operand> cxmake-get): New sketch implementation.
1668 (-gen-arch-model-decls, scache-engine-insns, pbb-engine-insns):
1669 Exclude multi-insns.
1670 * sim-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
1671 * utils-sim.scm (op-extract?): Handle derived operands.
1673 * gas-test.scm (cgen-build.sh): Quote '*' chars printed by objdump.
1674 * semantics.scm (-build-operand!): Handle 'DFLT case during parsing.
1675 * hardware.scm (hardware-for-mode): New function.
1677 * insn.scm (filter-harmlessly-ambiguous-insns): New function for
1678 cleaning up decode tables.
1679 (mask-superset?): Little helper function for above.
1680 * decode.scm (-build-decode-table-entry): Call it.
1681 (-opcode-slots): Add some more tracing.
1682 * arm.cpu: Disable decode-splits construct due to implementation
1683 conflict with `filter-harmlessly-ambiguous-insns'
1685 * decode.scm (-population-top-few): New function for better decode
1686 bit generation. Includes minor helper functions.
1687 (decode-get-best-bits): Call it instead.
1688 (OLDdecode-get-best-bits): Renamed previous version of above.
1691 2000-06-13 Ben Elliston <bje@redhat.com>
1693 * configure.in: Use AC_EXEEXT with Cygnus mode. Remove AC_ARG_WITH
1694 for the Guile library directory.
1695 * configure: Regenerate.
1696 * Makefile.in, doc/Makefile.in: Regenerate.
1698 * Makefile.in, doc/Makefile.in: Regenerate.
1699 * configure.in: Remove unnecessary tests. Move to version 1.0.
1700 * acconfig.h, config.in: Remove.
1701 * configure, aclocal.m4: Regenerate.
1702 * doc/stamp-vti, doc/version.texi: Likewise.
1703 * AUTHORS: New file.
1705 2000-06-07 Ben Elliston <bje@redhat.com>
1707 * fixup.scm (symbol-bound?): Reduce debugging output.
1709 2000-06-02 matthew green <mrg@redhat.com>
1711 * insn.scm (insn-base-ifields): Returns all the instruction fields for
1712 a given instruction, replacing derived fields with their subfields.
1713 (insn-value): Use `insn-base-ifields' to find all constant values.
1714 (multi-insn-instantiate!): Comment some debug messages.
1716 2000-06-01 Ben Elliston <bje@redhat.com>
1718 * doc/rtl.texi (Expressions): Document a hazard with the choice of
1719 symbol names used in a (c-call ..) rtx.
1721 * sim-test.scm (build-test-set): Return (()) for an instruction
1722 with no operands, so it too is included in the generated test set.
1724 2000-05-31 Ben Elliston <bje@redhat.com>
1726 * Makefile.am (gas-test): Ensure $(ISA) is not empty.
1727 (sim-test): Likewise.
1728 * Makefile.in: Regenerate.
1730 2000-05-30 Frank Ch. Eigler <fche@redhat.com>
1732 * read.scm (-cgen): In debugging mode (-b), ask guile for untruncated
1733 stack traceback, in an order that resembles gdb's `bt'.
1735 2000-05-24 Frank Ch. Eigler <fche@redhat.com>
1737 * desc-cpu.scm (-gen-hash-defines): Use ifmt-ifields again.
1738 * opc-itab.scm (-gen-ifmt-table-1): Ditto.
1739 * gas-test.scm (gas-test-analyze!, cgen-build.sh): Filter out
1741 * ifield.scm (multi-ifield): Define workable field-mask and field-value
1743 (ifld-base-ifields): New routine to replace ifmt-expanded-ifields.
1744 * iformat.scm (ifmt-expanded-ifields): Gone.
1745 (ifields-base-ifields): New function. Call ifld-base-ifields for real
1747 (-ifmt-lookup-ifmt!): Use it to expand derived/multi combos in new
1750 * opcodes.scm (multi-ifield gen-extract): Correct spacing in generated
1753 2000-05-23 Frank Ch. Eigler <fche@redhat.com>
1755 * sid.scm (with-any-profile?): New function clone.
1757 2000-05-19 Frank Ch. Eigler <fche@redhat.com>
1759 * utils-gen.scm (gen-multi-ifld-extract): Fix decode hook for sim.
1761 2000-05-18 Frank Ch. Eigler <fche@redhat.com>
1763 * ifield.scm (-multi-ifield-parse): Add encode/decode args.
1764 (-multi-ifield-read): Parse them.
1765 (define-full-multi-ifield): Pass #f/#f as defaults for them.
1766 * opcodes.scm (multi-ifield gen-insert): Add encode hook.
1767 (multi-ifield gen-extract): Add decode hook.
1768 * utils-gen.scm (gen-multi-ifld-extract): Add decode hook for sim.
1770 * insn.scm (syntax-break-out): More correctly handle \-escaped
1772 (syntax-make-elements): Ditto.
1773 * opc-itab.scm (compute-syntax): Ditto.
1775 2000-05-17 Ben Elliston <bje@redhat.com>
1777 * gas-test.scm (cgen-build.sh): Log the correct script filename.
1779 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
1781 * gas-test.scm (build-test-set): Return (()) for an instruction
1782 with no operands, so it too is included in the generated test set.
1784 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
1786 * desc-cpu.scm (-gen-hash-defines): Define CGEN_ACTUAL_MAX values for
1787 IFMT_OPERANDS and SYNTAX_BYTES.
1789 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
1791 * sim.scm (with-any-profile?): New function.
1792 * utils-sim.scm (-sfmt-contents): Use above instead of `with-profile?'
1793 to decide whether or not to include profiling counters.
1795 2000-05-10 Frank Ch. Eigler <fche@redhat.com>
1797 Fuller derived-operand support for opcodes.
1798 * insn.scm (non-multi-insns): New filter to oppose `multi-insns'.
1799 * desc-cpu.scm (-define-hash-defines): Compute CGEN_MAX_SYNTAX_BYTES.
1800 Correctly compute ..._IFMT_OPERANDS. Omit useless ..._INSN_OPERANDS.
1801 (gen-operand-table): Omit derived- and anyof- operands from table.
1802 (gen-insn-table): Omit multi-insns from table.
1803 * iformat.scm (ifmt-expanded-fields): New function to expand
1804 subfields of derived-ifields.
1805 (ifmt-compute!): Ignore remaining multi-insns.
1806 * mach.scm (isa-min-insn-bitsize, isa-max-insn-bitsize): Ignore
1808 * opc-itab.scm (-gen-ifmt-table-1): Use ifmt-expanded-ifields.
1809 (-gen-insn-enum, -gen-insn-opcode-table): Ignore multi-insns.
1810 * opcodes.scm (derived-operand): Define abort()ing gen-insert,
1811 gen-extract, gen-fget, gen-fset, gen-parse, gen-print functions.
1812 (gen-switch): Omit anyof-operands.
1813 * operand.scm (-anyof-syntax): New function.
1814 (-anyof-merge-syntax): Call it.
1815 * utils.scm (collect): New idiomatic function.
1817 2000-05-10 Ben Elliston <bje@redhat.com>
1819 * m68k.cpu: New file (work in progress).
1821 2000-05-05 Frank Ch. Eigler <fche@redhat.com>
1823 * Makefile.am (all-local): New target. Create stamp-cgen.
1824 * Makefile.in: Regenerated.
1825 * doc/Makefile.in: Regenerated.
1827 2000-04-26 Frank Ch. Eigler <fche@redhat.com>
1829 * operand.scm (-operand-g/setter-syntax): Correct off-by-one error.
1830 (-operand-parse-setter): Ditto.
1831 * utils-sim.scm (needed-iflds): Store ifield (index) in argbuf, even
1832 for CACHE-ADDR operands.
1833 * sid-decode.scm (-gen-record-args): Remove newly duplicated extract
1834 trace entries. Widen byte-wide values for printing.
1835 * sid.scm (-op-gen-set-trace): Enhance result trace with op indices.
1836 Widen byte-wide values for printing. Hexify memory addresses.
1838 2000-04-23 matthew green <mrg@redhat.com>
1840 * m32r.cpu: Fix a typo.
1842 Fri Apr 21 22:18:48 2000 Jim Wilson <wilson@cygnus.com>
1844 * ia64.cpu (define-model): Change merced to Itanium.
1845 (f-qp): Change quilifying to qualifying.
1846 (movbr_ph, movbr_pvec): Delete.
1847 (I-I21): Delete uses of movbr_ph and movbr_pvec.
1849 2000-04-07 Ben Elliston <bje@redhat.com>
1851 * doc/porting.texi (Building a simulator test suite): Clarify
1852 where generated test cases are placed.
1854 2000-04-07 Ben Elliston <bje@redhat.com>
1856 * Makefile.am (gas-test): Remove dependency on `cgen'.
1858 * Makefile.in: Regenerate.
1860 2000-04-04 Frank Ch. Eigler <fche@redhat.com>
1862 * hardware.scm (<hw-pc> parse): Allow user to set type for pc register.
1863 * mode.scm (mode-finish!): Add placeholder code for mach-dependent
1864 type reconfiguration.
1865 * utils-sim.scm (-sfmt-contents): Add profile-counters only if
1868 2000-03-30 Ben Elliston <bje@redhat.com>
1870 * doc/rtl.texi (Enumerated constants): Add concept index entries.
1872 2000-03-24 Ben Elliston <bje@redhat.com>
1874 * Makefile.am (stamp-cgen): Reinstate target.
1875 * Makefile.in: Regenerate.
1877 2000-03-22 Ben Elliston <bje@redhat.com>
1879 * slib/ppfile.scm: Remove; unused.
1880 * slib/defmacex.scm: Likewise.
1882 2000-03-21 Ben Elliston <bje@redhat.com>
1884 * doc/internals.texi (Source file overview): Document.
1886 * Makefile.am (GUILEDIR): Remove.
1887 (CGEN): Ditto. Callers use $(GUILE) instead.
1888 (GUILEFLAGS): Ditto.
1890 (APPDESCFILES): Ditto.
1891 (OPCODESFILES): Ditto.
1893 (pkgdata_SCRIPTS): Ditto.
1894 (stamp-cgen): Remove target.
1895 * Makefile.in: Regenerate.
1897 * configure.in: Remove header and library tests.
1898 * configure: Regenerate.
1899 * config.in: Likewise.
1901 2000-03-20 Ben Elliston <bje@redhat.com>
1903 * read.scm: Cease loading "hob-sup.scm".
1904 * utils.scm: Inherit the fastcall family of procedures (for now).
1905 * hob-sup.scm: Remove.
1907 2000-03-20 Ben Elliston <bje@redhat.com>
1909 * configure.in (AC_OUTPUT): Do not emit .gdbinit.
1910 * configure: Regenerate.
1911 * gdbinit.in: Remove.
1913 2000-03-17 Ben Elliston <bje@redhat.com>
1915 * Makefile.am (CGEN): Use guile, not cgen.
1916 (CGENCFLAGS, LIBIBERTY, INCLUDES): Remove.
1917 (bin_PROGRAMS, cgen_SOURCES): Likewise.
1918 (CGENFILES): Fold CGEN_HOB_INPUT_FILES and CGEN_NOHOB_FILES.
1919 (HOBBIT_INPUT_FILES, HOBBIT_OUTPUT_FILE): Remove.
1920 (HOB_OBJS): Likewise.
1921 (CGEN_HOB_SRC, CGEN_HOB_OBJ): Likewise.
1922 (CGENOBJS): Likewise.
1923 (cgen_DEPENDENCIES, cgen_LDFLAGS, cgen_LDADD): Likewise.
1924 (hobbit, hobbit.o, hobbit.c): Remove targets.
1925 (cos.o, cgen.o, cgen-gh.o, hob-sup.o): Likewise.
1926 (CLEANFILES): Update.
1927 * acconfig.h (WITH_HOBBIT): Remove.
1928 * configure.in: Do not test for 3 arg scm_make_vector. Remove
1929 option --with-cgen-hobbit.
1930 * cos.h, cos.c, hob-main.c, hob-sup.c, hob-sup.h, hob.sh: Remove.
1931 * cgen-gh.h, cgen-gh.c, cgen-hob.scm, cgen.c: Likewise.
1932 * hobbit.c, hobbit.h, hobbit.scm: Likewise.
1933 * hobscmif.h, hobslib.scm, scmhob.h: Likewise.
1934 * Makefile.in: Regenerate.
1935 * config.in: Likewise.
1936 * aclocal.m4: Likewise.
1937 * configure: Likewise.
1938 * README (Hobbit support): Remove.
1939 * doc/internals.texi (Conventions): Do not mention Hobbit.
1940 * doc/porting.texi (Supported Guile versions): Likewise.
1942 2000-03-16 Frank Ch. Eigler <fche@redhat.com>
1944 * sid-cpu.scm (-gen-sem-switch-engine): Adjust calling &
1945 callback convention to new sid sidutil::basic_cpu code.
1946 (-gen-sfrag-engine-fn): Ditto.
1947 * sid.scm (-create-virtual-insns!): Ditto.
1948 (-hw-gen-set-quiet-pc): Mark delay slot execution specially in pbb
1950 (cxmake-skip): Implement properly for pbb mode.
1952 2000-03-03 Ben Elliston <bje@redhat.com>
1954 * doc/internals.texi: New file.
1956 2000-02-29 Ben Elliston <bje@redhat.com>
1958 * doc/rtl.texi (Derived operands): Remove unnecessary footnote.
1959 * doc/porting.texi: Formatting tweaks.
1961 2000-02-25 Nick Clifton <nickc@cygnus.com>
1963 * desc-cpu.scm (*_cgen_cpu_open): Initialise signed_overflow_ok_p
1966 Thu Feb 24 14:09:01 2000 Doug Evans <devans@seba.cygnus.com>
1968 * operand.scm (<anyof-operand>,make!): Initialize mode-name, not
1971 2000-02-23 Andrew Haley <aph@cygnus.com>
1973 * m32r.cpu (pcmpbz): Make pcmpbz a special (i.e. hidden)
1976 2000-02-24 Ben Elliston <bje@redhat.com>
1978 * doc/rtl.texi (Derived operands): Add some cindex entries.
1980 2000-02-23 Ben Elliston <bje@redhat.com>
1982 * ia32.cpu (dndo): Move general purpose macro from here ..
1983 * simplify.inc (dndo): .. to here.
1985 2000-02-18 Frank Ch. Eigler <fche@redhat.com>
1987 * arm.cpu (h-tbit): Add c-call setter function.
1990 2000-02-17 Frank Ch. Eigler <fche@redhat.com>
1992 * sem-frags.scm (-frag-hash-compute!): Add appstuff arg for traversal.
1993 (-frag-cost-compute!): Ditto.
1994 * utils.scm (copyright-cygnus): Add Y2K.
1995 * sid-cpu.scm (@prefix@_pbb_run): Add unsigned& argument.
1997 2000-01-25 Nick Clifton <nickc@cygnus.com>
1999 * desc-cpu.scm (@arch@_cgen_cpu_open): Add code to initialise
2000 flags field of the CGEN_CPU_TABLE structure.
2002 Sun Dec 12 14:20:36 1999 Doug Evans <devans@seba.cygnus.com>
2004 * operand.scm (<anyof-instance>): Renamed from <anyof-value>.
2005 All references updated.
2007 Tue Nov 30 11:06:22 1999 Doug Evans <devans@seba.cygnus.com>
2009 * ia32.cpu: Rewrite addressing mode support.
2011 * ifield.scm (<ifield>): New member `follows'.
2012 (ifld-known-values): New proc.
2013 (<ifield>): New method set-word-offset!.
2014 (ifld-set-word-offset!): New proc.
2015 (ifld-new-word-offset): New proc.
2016 (<ifield>): New method next-word.
2017 (<multi-ifield>): New method next-word.
2018 (ifld-next-word): New proc.
2019 (ifld-precedes?): New proc.
2020 (-ifield-parse): New args word-offset,word-length,follows.
2021 All callers updated. Handle CISC-style vs RISC-style ifields.
2022 (-ifield-read): Recognize word-offset,word-length,follows specs.
2023 (-ifld-parse-follows): New proc.
2024 (-multi-ifield-make-default-insert): New proc.
2025 (-multi-ifield-make-default-extract): New proc.
2026 (-multi-ifield-parse): Provide default values for insert,extract
2027 handlers if not specified.
2028 (<derived-ifield>): New class.
2029 (derived-ifield?): New predicate.
2030 (ifld-derived-operand?): New predicate.
2031 (f-anyof): New global.
2032 (ifld-anyof?,ifld-anyof-operand?): New predicates.
2033 (f-derived,ifld-derived?): Delete.
2034 (ifield-builtin!): Delete init of f-derived. Init f-anyof.
2035 * insn.scm (-sub-insn-ifields): New proc.
2036 (-sub-insn-make!): New proc.
2037 (multi-insn-instantiate!): Provide initial implementation.
2038 (-insn-parse): If insn contains "anyof" operands, create a
2039 <multi-insn> object instead of a plain <insn>.
2040 (-parse-insn-format-symbol): Rewrite derived operand handling.
2041 Add anyof operand handling.
2042 (-parse-insn-format-ifield-spec): Rewrite.
2043 (-parse-insn-format-operand-spec): Delete.
2044 (-parse-insn-format-list): Delete support for `(operand value)'.
2045 (anyof-operand-format?): Replaces derived-operand-format?.
2046 * operand.scm (-operand-parse-getter): Improve error messages.
2047 (-operand-parse-setter): Ditto.
2048 (<derived-operand>): New members args,syntax,base-ifield,encoding,
2050 (<anyof-operand>): Change baseclass from <derived-operand> to
2051 <operand>. Delete member values. New members base-ifield,choices.
2052 (anyof-operand?): New predicate.
2053 (-derived-parse-encoding,-derived-parse-ifield-assertion): New procs.
2054 (-derived-operand-parse): Rewrite.
2055 (-derived-operand-read): Rewrite.
2056 (-anyof-parse-choice): New proc.
2057 (-anyof-operand-parse): Rewrite.
2058 (-anyof-operand-read,define-anyof-operand): New procs.
2059 (<anyof-value>): Rewrite.
2060 (-anyof-initial-known): New proc.
2061 (anyof-satisfies-assertions?): New proc.
2062 (-anyof-merge-syntax,-anyof-merge-encoding): New procs.
2063 (-anyof-merge-getter,-anyof-merge-setter): New procs.
2064 (-anyof-merge-semantics,-anyof-merge-ifield-assertion): New procs.
2065 (-anyof-merge-subchoices,-anyof-all-subchoices): New procs.
2066 (-anyof-value-from-derived): New proc.
2067 (-anyof-all-choices-1,anyof-all-choices): New procs.
2068 (operand-init!): Create define-anyof-operand reader command.
2070 * insn (syntax-break-out): Take syntax as argument instead of insn.
2071 All callers updated.
2072 (syntax-make): Move here, from ???.
2074 * types.scm (<bitrange>): Rename accessors from bitrange:foo to
2075 bitrange-foo. All uses updated.
2076 (bitrange-next-word): New proc.
2078 * semantics.scm (-solve-expr-fn,rtx-solve): New procs.
2080 * rtl.scm (rtx-canonicalize): Provide initial implementation.
2081 (rtx-make-const,rtx-make-enum): New procs.
2082 (rtx-arg1,rtx-arg2): Renamed from -rtx-arg[12]. All callers updated.
2083 (rtx-mem-addr,rtx-mem-sel): New procs.
2084 (rtx-change-address): New proc.
2085 (rtx-make-ifield,rtx-make-operand,rtx-make-local): New proc.
2086 (rtx-make-set,rtx-single-set?): New procs.
2087 (rtx-combine): New proc.
2089 * rtl.scm (rtx-traverse): New arg `appstuff'. All callers updated.
2090 (rtx-traverse-with-locals): Ditto.
2091 (-rtx-traverse,-rtx-traverse-*): Ditto.
2093 * rtl.scm (define-subr): New proc.
2094 (rtl-init!): Create reader command `define-subr'.
2096 * cos.c (_object_mi_p): Ensure argument is an object.
2097 (indent): New function.
2098 (_object_print_elms): Add pretty-printing support.
2099 (_object_print): Ditto.
2101 * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall7.
2102 (*floats-s->c-fun-table*): Ditto.
2103 * hobbit.c,hobbit.h: Rebuild.
2104 * hob-sup.c (fastcall7): New proc.
2105 * hob-sup.h (fastcall7): Declare.
2106 * hob-sup.scm (fastcall7): New macro.
2108 * mach.scm (<arch>): New member subr-list.
2109 (current-subr-list,current-subr-add!,current-subr-lookup): New procs.
2110 (arch-finish!): Reverse recorded subr list.
2112 * read.scm (debug-env): New global.
2113 (debug-var-names,debug-var,debug-repl-env): New procs.
2114 (debug-repl): Rewrite. New arg `env-list'. All callers updated.
2115 (debug-quit): Renamed from `continue'.
2117 * simplify.inc (dsmf): New pmacro.
2119 * utils.scm (plus-scan): New proc.
2120 (split-bits): Rewrite.
2121 (split-value): New proc.
2123 1999-10-13 Doug Evans <devans@casey.cygnus.com>
2125 * doc/Makefile.am (DOCFILES): Add notes.texi.
2126 * doc/Makefile.in: Rebuild.
2128 1999-10-11 Doug Evans <devans@casey.cygnus.com>
2130 * ifield.scm (ifld-derived?): New proc.
2131 (f-derived): New global.
2132 (ifield-builtin!): Create ifield f-derived.
2133 (<multi-insn>): New class.
2134 (multi-insn?): New predicate.
2135 (multi-insn-instantiate!): New proc.
2136 (-insn-parse): Create <multi-insn> objects for insns with derived
2138 (-parse-insn-format-symbol): Handle derived ifields.
2139 (-parse-insn-format-ifield-spec): New proc.
2140 (-parse-insn-format-operand-spec): New proc.
2141 (-parse-insn-format-list): Simplify.
2142 (-parse-insn-format): No longer allow (ifield-object value) spec.
2143 (derived-operand-format?): New proc.
2144 (insn-alias?): New proc.
2145 (non-alias-insns): Rewrite.
2146 (insn-real?): Renamed from real-insn?, all callers updated.
2147 (virutal-insns): Rewrite.
2148 (multi-insns): New proc.
2149 * mach.scm (arch-analyze-insns!): Instantiate multi-insns if present.
2150 * operand.scm (op-ifield): Renamed from op:ifield, all callers updated.
2151 Return #f if operand doesn't have an index or if index is not an
2153 (hw-index-anyof): New proc.
2154 (-operand-parse): Allow integer indices.
2155 (<derived-operand>): New class.
2156 (derived-operand?): New predicate.
2157 (<anyof-operand>): New class.
2158 (<anyof-value>): New class.
2159 (-anyof-parse-value,-anyof-operand-parse): New procs.
2160 (-derived-operand-parse,-derived-operand-read): New procs.
2161 (define-derived-operand,define-full-derived-operand): New procs.
2162 (operand-init!): New reader command define-derived-operand.
2164 * utils.scm (list-take): Handle negative amount.
2165 (element?): Rewrite.
2167 1999-10-10 Doug Evans <devans@casey.cygnus.com>
2169 * dev.scm: quick-utils.scm renamed to ~/.cgenrc.
2171 1999-10-04 Richard Henderson <rth@cygnus.com>
2173 * ia64.cpu: Checkpoint.
2175 1999-09-29 Doug Evans <devans@casey.cygnus.com>
2177 * sim-cpu.scm (-gen-semantic-fn-table): Virtual insns are always valid.
2179 * sim.scm (sim-finish!,x-invalid): Always set pc. Set vpc based on
2180 default-insn-bitsize. Pass vpc to sim_engine_invalid_insn.
2182 Wed Sep 29 14:39:39 1999 Dave Brolley <brolley@cygnus.com>
2184 * sim.scm (sim-finish!): Don't call sim_io_error for invalid insn. Use
2185 PC returned by sim_engine_invalid_insn.
2187 1999-09-28 Doug Evans <devans@casey.cygnus.com>
2189 * ia32.cpu: New file.
2191 1999-09-25 Doug Evans <devans@casey.cygnus.com>
2193 * utils.scm (bit-set?): Fix off by one error.
2195 * rtl-c.scm (s-sequence): Fix non-void-mode result output.
2197 * rtl.scm (hw): Check for valid hardware element before trying to
2200 * arm.cpu (arm7f cpu): Renamed from arm. All users updated.
2201 * arm7.cpu (bx): Fix name of target address operand in assembler spec.
2202 (*): arm_compute_operand2_foo renamed to compute_operand2_foo.
2203 * thumb.cpu (*): arm_compute_operand2_foo renamed to
2204 compute_operand2_foo.
2206 * cgen-sid.scm (sim_arguments): Add support for building defs.h.
2207 * sid.scm (-hw-gen-set-quiet-pc): Handle #:delay modifier.
2208 Call delayed_branch/branch methods instead of assigning to `vpc'.
2209 (<hw-pc>,cxmake-skip): Call skip method.
2210 (-gen-hw-selector): Call rtl-c++ instead of rtl-c.
2211 (<pc>,cxmake-skip): Ditto.
2212 (-create-virtual-insns!): Ditto.
2213 (op:read): Call estate-make-for-normal-c++ instead of estate-...-c.
2215 (op:record-profile): Specify #:output-language "c++".
2216 * sid-cpu.scm (-gen-insn-attr-decls): Rename @cpu@_insn_attr to
2218 (cgen-desc.h): Use @arch@ namespace instead of @cpu@.
2220 (-gen-reg-access-defns): Use rtl-c++ instead of rtl-c.
2221 (gen-semantic-code): Ditto.
2222 (-gen-sem-case,-gen-sfrag-code): Ditto.
2223 (-gen-hardware-types): Delete class @cpu@_cpu_base.
2224 (cgen-cpu.h): File is now #included by main cpu class, rather than
2226 (cgen-defs.h): New proc.
2227 (-gen-scache-semantic-fn): Change result type to sem_status.
2228 New local `status'. Call done_cti_insn/done_insn method at end.
2229 (cgen-semantics.cxx): Include @cpu@.h instead of @arch@-main.h,
2231 (cgen-sem-switch.cxx): Ditto.
2232 * sid-decode.scm (-gen-idesc-decls): Update return type of
2234 (cgen-decode.h): Add using namespace @arch@.
2235 (cgen-decode.cxx): Include @cpu@.h instead of @arch@-main.h.
2237 * rtl-c.scm (<rtl-c-eval-state>): New member output-language.
2238 (estate-output-language-c?,estate-output-language-c++?): New procs.
2239 (<rtl-c-eval-state>,vmake!): Handle #:output-language.
2240 (estate-make-for-normal-rtl-c++): New proc.
2241 (rtl-c++-parsed,rtl-c++): New proc.
2242 (s-c-call): Invoke cpu class method if c++.
2243 (join): Use s-c-raw-call.
2245 * rtl-c.scm (subword): Don't pass current_cpu to SUBWORD.
2248 * rtl-c.scm (delay): Mark the sequence as #:delay'd.
2249 * rtl.scm (<eval-state>): New member `modifiers'.
2250 (<eval-state>,vmake!): Handle #:modifiers.
2251 (estate-with-modifiers): New proc.
2253 * rtl.scm (rtx-side-effects?): New proc.
2254 (rtx-canonical-bool): Don't change expr if it has side effects.
2255 * semantics.scm (-simplify-expr-fn): Handle exprs with side-effects
2258 1999-09-23 Doug Evans <devans@casey.cygnus.com>
2260 * sim.scm (gen-scache-type): Fix typo in last patch.
2262 Tue Sep 21 17:12:55 1999 Dave Brolley <brolley@cygnus.com>
2264 * sim.scm (gen-scache-type): Add last_insn_p flag for parallel support.
2266 1999-09-05 Doug Evans <devans@casey.cygnus.com>
2268 * sid.scm (<hw-pc>,cxmake-skip): New method.
2269 (<pc>,cxmake-skip): New method.
2271 * decode.scm (decode-build-table): Delete args startbit,index-list.
2272 All callers updated.
2273 * utils-sim.scm (gen-decoder): Delete args startbit,index-list.
2274 All callers updated.
2275 * sim-decode.scm (-gen-decode-fn): Always pass 0 for startbit
2276 to decode-get-best-bits.
2277 * sid-decode.scm (-gen-decode-fn): Ditto.
2279 * hardware.scm (hw-bits): New proc.
2280 (-hw-parse): New arg layout. All callers updated.
2281 (define-full-hardware): New arg layout. All callers updated.
2282 (-hw-validate-layout): New proc.
2283 (-hw-create-[gs]etter-from-layout): New procs.
2284 (<hw-register>,parse!): Handle layout spec.
2285 * types.scm (type-bits): New proc.
2287 * sem-frags.scm (-frag-cost-compute!): Fix calculation of
2288 UNARY, BINARY, TRINARY rtxs.
2290 * attr.scm (<enum-attribute>,parse-value): Allow strings.
2291 * enum.scm (parse-enum-vals): Use reverse! instead of reverse.
2292 Support '- as "unused spot" indicator.
2294 1999-09-03 Doug Evans <devans@casey.cygnus.com>
2296 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Fix typo.
2298 1999-09-02 Doug Evans <devans@casey.cygnus.com>
2300 * rtx-funcs.scm (subword): Fix mode spec of `value'.
2302 * rtl.scm (-rtx-traverse-operands): Fix debugging message
2304 (tstate-make): New arg `depth'. All callers updated.
2305 (tstate-depth,tstate-set-depth!): New procs.
2306 (tstate-incr-depth!,tstate-decr-depth!): New procs.
2307 (-rtx-traverse-operands): Indent debugging output by traversal depth.
2308 (-rtx-traverse): Ditto. Keep track of traversal depth.
2310 1999-09-01 Doug Evans <devans@casey.cygnus.com>
2312 * sim-decode.scm (-gen-decoder+supporting cast): Move to utils-sim.scm.
2313 * sid-decode.scm (-gen-decoder+supporting cast): Ditto.
2314 * utils-sim.scm: Decoder generator support moved here.
2315 (-decode-equiv-entries?,-decode-sort-entries): New procs.
2316 (-gen-decoder-switch): Sort entries for more fall-throughs.
2318 * Makefile.am (gas-test,sim-test): Specify ISA when invoking cgen.
2319 * Makefile.in: Rebuild.
2320 * sim-test.scm (build-sim-testcase): Add logging message.
2321 * dev.scm (cload): Recognize SIM-TEST application.
2322 (load-stest): Set APPLICATION to SIM-TEST.
2324 * desc-cpu.scm (-gen-hash-defines): Add \n to output.
2326 * ifield.scm (-ifield-parse): Allow bit numbers up to 127.
2327 * mach.scm (-isa-parse): Allow insn bitsizes from 8 to 128.
2328 * mode.scm (mode-make-int,mode-make-uint): Allow values up to 64 bits.
2330 * insn.scm (syntax-break-out): Handle ${foo}.
2332 Sun Aug 29 11:11:15 1999 Doug Evans <devans@canuck.cygnus.com>
2334 * Makefile.am (noinst_PROGRAMS,noinst_LIBRARIES): Delete.
2335 (bin_PROGRAMS): Define.
2336 (CGEN_HOB_INPUT_FILES): Remove $(srcdir)/.
2337 (cgen-hob.c): Prepend $(srcdir)/ here.
2338 (APPDESCFILES,OPCODESFILES,SIMFILES,pkgdata_SCRIPTS): Define.
2339 (libcpu_a_SOURCES): Delete.
2340 (cgen_DEPENDENCIES,cgen_LDADD): Rewrite.
2341 (CGEN_HOB_OBJ,CGENOBJS): New variables.
2342 * configure.in (LIBS): Replace -Wl,-rpath with -R.
2343 Add AC_CHECK_LIB(guile,main).
2344 * Makefile.in: Rebuild.
2345 * doc/Makefile.in: Rebuild.
2346 * aclocal.m4: Rebuild.
2347 * config.in: Rebuild.
2348 * configure: Rebuild.
2350 1999-08-28 Doug Evans <devans@casey.cygnus.com>
2352 Rename rtx functions from name: to name, accept optional leading
2354 VM -> VOID, DM -> DFLT, use DFLT instead of VM for default mode.
2355 * attr.scm (-attr-eval): Update.
2356 * hardware.scm (hw-mode-ok?): Rename arg mode to new-mode-name.
2357 (<hw-register>,mode-ok?): Disallow VOID.
2358 (<hw-immediate>,mode-ok?): Disallow VOID.
2359 (<hw-address>,mode-ok?): Disallow VOID.
2360 * mode.scm (mode-name?): New proc.
2361 (VOID): Renamed from VM.
2362 (DFLT): Renamed from DM.
2363 (mode-builtin!): Update.
2364 * opcodes.scm (<ifield>,gen-insert): Update.
2365 (<ifield>,gen-extract): Update.
2366 (<multi-ifield>,gen-insert,gen-extract): Update.
2367 * operand.scm (op:mode): Update.
2368 (<pc>,make!): Update.
2369 (op:new-mode): Update.
2370 (-operand-read): Update.
2371 * rtl.scm (-rtx-valid-types): Add OPTIONS, EXPLNUMMODE,
2372 NONVOIDMODE, DFLTMODE. Rename VMMODE to VOIDMODE.
2373 (def-rtx-dual-mode,define-rtx-dual-mode): Delete.
2374 (-rtx-lazy-sem-mode): Renamed from -rtx-mode. All callers updated.
2375 (rtx-make): Call -rtx-munge-mode&options.
2376 (rtx accessors): Rewrite.
2377 (rtx-pretty-name): Update.
2378 (-rtx-traverse-*): Update.
2379 (-rtx-traverse-explnummode,-rtx-traverse-nonvoidmode): New procs.
2380 (-rtx-traverse-voidmode,-rtx-traverse-dfltmode): New procs.
2381 (-rtx-make-traverse-table): Update.
2382 (-rtx-traverse-operands): Update.
2383 (-rtx-option?,-rtx-option-list?): New procs.
2384 (-rtx-munge-mode&options): New proc.
2385 (-rtx-traverse-expr): Call -rtx-munge-mode&options.
2386 (-rtx-traverse): Update.
2387 (rtx-traverse,rtx-traverse-with-locals,rtx-compile): Update.
2388 (rtx-compile-time-constant?): Update.
2389 (rtx-true?,rtx-false?,rtx-true,rtx-false): Update.
2390 (rtx-value): Update.
2391 (hw,reg,mem): Renamed from foo:. Update. All callers updated.
2392 * rtx-funcs.scm (*): Update.
2393 * rtl-c.scm (rtl-c-get): Update.
2394 (rtl-c-set-quiet,rtl-c-set-trace): Update.
2395 (s-c-call,s-c-raw-call): Update.
2396 (s-boolifop,s-convop,s-if,s-cond): Update.
2397 (s-case-vm,-gen-non-vm-case-test,s-case): Update.
2398 (-par-replace-set-dests,-par-replace-set-srcs): Update.
2399 (s-parallel,s-sequence): Update.
2400 (rtl-c-build-table): Update.
2401 * sem-frags.scm (-frag-hash-compute!): Update.
2402 (-frag-cost-compute!): Improperly handle unary,binary,trinary ops
2403 for temporary bug compatibility with previous version.
2404 (-frag-expr-locals,-frag-expr-stmts): Update.
2405 (-frag-compute-desired-frags,-frag-pick-best): Update.
2406 * semantics.scm (-simplify-expr-fn): Update.
2407 (rtx-simplify): Update.
2408 (-rtx-ref-type): Update. Account for modifiers.
2409 (-build-operand!,-build-reg-operand!,-build-mem-operand!): Update.
2410 (-build-ifield-operand!): Update.
2411 (-build-known-values): Update.
2412 (semantic-compile): Update.
2413 (-gen-reg-access-defns): Update.
2414 (gen-semantic-code,-gen-sem-case): Update.
2415 (-gen-sfrag-code,-gen-sfrag-case): Update.
2416 * sim-cpu (gen-semantic-code): Update.
2417 * sim.scm (<hw-pc>,gen-write,cxmake-skip): Update.
2418 (<hw-register>,gen-write,gen-set-macro,cxmake-get-raw): Update.
2419 (-hw-cxmake-get): Update.
2420 (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
2421 (<hw-index>,cxmake-get): Update.
2422 (<operand>,gen-type,gen-read,cxmake-get): Update.
2423 (<operand>,gen-set-quiet,gen-set-trace): Update.
2424 (<pc>,cxmake-get): Update.
2425 (sim-finish!): Update.
2426 * utils-gen.scm (-gen-ifld-extract-base): Update.
2427 (-gen-ifld-extract-beyond): Update.
2428 (gen-multi-ifld-extract): Update.
2429 * sid-decode.scm (-decode-expr-ifield-values-used): Update.
2430 * sid.scm (<hw-pc>,gen-write): Update.
2431 (-gen-decode-insn-globals): Update.
2432 (-hw-cxmake-get): Update.
2433 (<hw-register>,cxmake-get-raw): Update.
2434 (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
2435 (<hw-index>,cxmake-get): Update.
2436 (<operand>,gen-type,gen-read,cxmake-get): Update.
2437 (<operand>,gen-set-quiet,gen-set-trace): Update.
2438 (<pc>,cxmake-get): Update.
2439 (-create-virtual-insns!): Update.
2440 (-decode-split-build-assertion): Update.
2442 * simplify.inc: Update.
2444 1999-08-20 Doug Evans <devans@casey.cygnus.com>
2446 * sim.scm (-op-gen-queued-write): Fix memory address calculation.
2447 Prefix queue function name with sim_ instead of @cpu@_.
2449 * sim.scm (-with-parallel-only?): New global.
2450 (option-init!): Initialize it.
2451 (option-set!): Set it.
2452 (with-parallel-only?): New proc.
2453 * sim-decode.scm (-gen-decode-insn-globals): Don't include parallel
2454 and writeback markers if with-parallel-only.
2455 (-gen-idesc-init-fn): Update.
2456 * sim-cpu.scm (cgen-cpu.h): Don't generate struct parexec if
2459 Wed Aug 18 15:04:30 1999 Doug Evans <devans@canuck.cygnus.com>
2461 * sim-cpu.scm (-gen-semantic-fn-table): Handle unsupported insns
2462 with the invalid insn handler.
2464 * utils.scm (list-maybe-ref): New proc.
2466 * mach.scm (-isa-parse): Signal error if isa wasn't specified in
2468 (-mach-parse): Signal error if mach wasn't specified in define-arch.
2470 * i960.cpu (test*-*): Delete `expr' arg.
2471 (test-op,branch-op): Update.
2473 1999-08-09 Doug Evans <devans@casey.cygnus.com>
2475 * sim.scm (gen-reg-getter-fn,gen-reg-setter-fn): New procs.
2476 (gen-reg-access-decl): Replace `name' arg with `hw'. All callers
2478 (gen-reg-access-defn): Ditto.
2479 (-gen-hw-addr): Rewrite.
2480 (-op-gen-queued-write): Rewrite.
2481 * sim-cpu.scm (-gen-cpu-reg-access-decls):
2482 (-gen-scache-semantic-fn): Handle with-generic-write.
2483 (-gen-no-scache-semantic-fn): Ditto.
2485 1999-08-08 Doug Evans <devans@casey.cygnus.com>
2487 * utils-gen.scm (gen-define-ifmt-ifields): Tweak output.
2489 * sim.scm (-with-generic-write?): New global.
2490 (option-init!): Initialize it.
2491 (option-set!): Set it.
2492 (with-generic-write?): New proc.
2493 (-gen-hw-addr): New proc.
2494 (-op-gen-queued-write): New proc.
2495 (-op-gen-set-{quiet,trace}-parallel): Use it if with-generic-write?.
2497 * sim-cpu.scm (-gen-hardware-types): Output code with parallel support
2499 (-gen-sem-switch): Preserve existing with-parallel? value.
2500 (-gen-sem-parallel-switch): Ditto.
2501 (-gen-write-case): Add /indent support.
2502 (cgen-write.c): Rewrite.
2504 * utils.scm (-current-print-state): New global.
2505 (make-print-state): New proc.
2506 (pstate-indent,pstate-set-indent!): New procs.
2507 (pstate-cmd?,pstate-cmd-do): New procs.
2508 (/indent): New global.
2509 (/indent-set,/indent-add): New procs.
2510 (string-write): Set -current-print-state.
2511 (-string-write): New arg pstate, all callers updated.
2512 Handle print-state commands.
2513 (-string-list-flatten): New proc.
2514 (string-list->string): Use it.
2516 * sim-cpu.scm (-gen-sem-fn-name): Move here from sim-decode.scm.
2517 (-gen-sem-fn-table-entry): New proc.
2518 (-gen-semantic-fn-table): New proc.
2519 (-gen-scache-semantic-fn): Make fn static.
2520 (-gen-no-scache-semantic-fn): Ditto.
2521 (cgen-semantics.c): Define macro SEM_FN_NAME.
2522 * sim-decode.scm (-gen-decode-insn-globals): Delete FMT,TYPE,IDX,
2523 FAST,FULL. Update @cpu@_insn_sem contents.
2524 (-gen-semf-fn-name): Delete.
2525 (-gen-sem-fn-decls): Delete.
2526 (-gen-idesc-decls): Output prototypes of @cpu@_sem_init_idesc_table,
2527 @cpu@_semf_init_idesc_table.
2528 (-gen-idesc-init-fn): Update. Don't initialize pointers to semantic
2530 (cgen-decode.h): Print sfmt enum.
2531 * sid-decode.scm (-gen-semf-fn-name): Delete.
2532 * utils-gen.scm (gen-sfmt-enum-decl): New proc.
2534 * iformat.scm (sfmt-build): Rename sformats from fmt-foo to sfmt-foo.
2535 (ifmt-compute!): Ditto.
2536 * sim-decode.scm (-gen-decoder-switch): Ditto.
2537 * sid-decode.scm (-gen-decode-expr-entry): Ditto.
2538 (-gen-decoder-switch): Ditto.
2540 * insn.scm (insn-virtual?): New proc.
2542 * enum.scm (gen-enum-decl): Speed up, build string as list and then
2544 * mach.scm (<arch>): attr-list is now a pair of lists.
2545 (current-attr-list): Rewrite.
2546 (current-attr-add!,current-attr-lookup): Rewrite.
2547 * sim.scm (gen-cpu-insn-enum-decl): Replace append with append!.
2549 1999-08-06 Richard Henderson <rth@cygnus.com>
2551 * ia64.cpu: Initial checkpoint.
2553 1999-08-06 Doug Evans <devans@casey.cygnus.com>
2555 * pmacros.scm (-pmacro-apply): Fix definition, takes only 1 arg.
2556 (pmacros-init!): Update .apply help string.
2558 1999-08-03 Doug Evans <devans@casey.cygnus.com>
2560 * sim.scm (-hw-gen-set-quiet-pc): Update call to SEM_BRANCH_VIA_CACHE.
2561 (<hw-pc>,cxmake-skip): New method.
2562 (<pc>,cxmake-skip): New method.
2563 (-gen-argbuf-fields-union): Add branch_target to `chain' member.
2564 (gen-argbuf-type): New member `skip_count'.
2565 (sim-finish!): Update calls to @cpu@_pbb_cti_chain.
2566 * utils-cgen.scm (atlist-cti?): Don't include SKIP-CTI insns.
2568 * utils-sim.scm: New file.
2569 * dev.scm (load-sim): Load it.
2570 (load-sid): Load it.
2571 * cgen-sid.scm: Load it.
2572 * cgen-sim.scm: Load it.
2573 * iformat.scm (<sformat>): New member sbuf, not initialized by
2575 * rtx-funcs.scm (skip): Rewrite.
2576 * rtl-c.scm (skip): Rewrite.
2577 * m32r.cpu (sc,snc): Update `skip' usage.
2578 * mode.scm (mode-real-mode): New proc.
2579 * sem-frags.scm (-frag-split-by-sbuf): Rename from -frag-split-by-sfmt.
2580 Distinguish fragments by the <sformat-abuf> they use.
2581 * sim.scm (gen-profile-index-type): Delete.
2582 (ifield argbuf support): Move to utils-sim.scm and sim-decode.scm.
2583 (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
2584 (hardware argbuf support): Move to utils-sim.scm and sim-decode.scm.
2585 (operand argbuf support): Move to utils-sim.scm and sim-decode.scm.
2586 (-gen-argbuf-elm): Rewrite.
2587 (-gen-argbuf-hw-elm): Delete.
2588 (-gen-argbuf-fields-union): Generate structs for each sbuf instead
2590 (-sim-sformat-argbuf-list,-sim-insns-analyzed?): New globals.
2591 (sim-init!): Initialize them.
2592 (sim-analyze-insns!): Set them.
2593 (current-sbuf-list): New proc.
2594 * sim-cpu.scm (-gen-no-scache-semantic-fn): Update calls to
2595 gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns.
2596 * sim-model.scm (-gen-model-insn-fn): Ditto.
2597 * sim-decode.scm (-gen-extract-decls): Delete.
2598 (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
2599 (<hardware-base>,gen-extract,gen-trace-extract): Move here from
2601 (<hw-register,gen-extract,gen-trace-extract): Ditto.
2602 (<hw-address,gen-extract,gen-trace-extract): Ditto.
2603 (-gen-op-extract,-gen-op-trace-extract): New procs.
2604 (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
2605 gen-sfmt-argvars-foo and rewrite.
2606 (-gen-record-args): Rewrite.
2607 (-gen-extract-case): Tweak.
2608 * sid.scm (gen-profile-index-type): Delete.
2609 (ifield argbuf support): Move to utils-sim.scm.
2610 (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
2611 (hardware argbuf support): Move to utils-sim.scm and sid-decode.scm.
2612 (operand argbuf support): Move to utils-sim.scm and sid-decode.scm.
2613 (-sim-sformat-argbuf-list): New global.
2614 (sim-init!): Initialize it.
2615 (sim-analyze-insns!): Set it.
2616 (current-sbuf-list): New proc.
2617 * sid-decode.scm (-gen-argbuf-elm): Rewrite.
2618 (-gen-argbuf-hw-elm): Delete.
2619 (-gen-argbuf-fields-union): Generate structs for each sbuf instead
2621 (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
2622 (-gen-extract-decls): Delete.
2623 (<hardware-base>,gen-extract,gen-trace-extract): Move here from
2625 (<hw-register,gen-extract,gen-trace-extract): Ditto.
2626 (<hw-address,gen-extract,gen-trace-extract): Ditto.
2627 (-gen-op-extract,-gen-op-trace-extract): New procs.
2628 (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
2629 gen-sfmt-argvars-foo and rewrite.
2630 (-gen-record-args): Rewrite.
2631 (-gen-extract-case): Tweak.
2633 * cgen-gh.c (gh_putc,gh_puts): New functions.
2634 * cgen-gh.h (gh_putc,gh_puts): Declare them.
2635 * cos.c (_object_print_elms,_object_print): Use them.
2636 * hob-sup.c (fastcall_print): Use them.
2637 * configure.in: Check for scm_gen_puts, scm_puts.
2638 * config.in: Rebuild.
2639 * configure: Rebuild.
2640 * aclocal.m4: Rebuild.
2641 * Makefile.in: Rebuild.
2643 * dev.scm (load-opc): Use load instead of maybe-load.
2644 (load-gtest,load-sim,load-stest): Ditto.
2647 1999-07-23 Doug Evans <devans@casey.cygnus.com>
2649 * sid-cpu.scm (-gen-sem-switch-engine): Move definition of `count'
2650 up to avoid g++ 'goto crosses initialization' warning.
2651 (-gen-sfrag-engine-fn): Delete vpc arg to NEXT_FRAG.
2652 (-gen-sfrag-case): Update use of NEXT_FRAG.
2654 1999-07-22 Doug Evans <devans@casey.cygnus.com>
2656 * cos.c (cos_init): Protect _make_x_symbol from garbage collection.
2658 * read.scm: Load sem-frags.scm.
2659 * sem-frags.scm (*): Lots rewritten.
2660 * sid.scm (-with-sem-frags?): New global
2661 (with-sem-frags?): New proc.
2662 (option-init!): Initialize -with-sem-frags?.
2663 (option-set!): Recognize with-sem-frags.
2664 (sim-init!): Call sim-sfrag-init! if with-sem-frags.
2665 * sid-cpu.scm (cgen-sem-switch.cxx): Generate semantic frag version
2667 (-gen-sfrag-engine-decls): New proc.
2668 (-gen-sfrag-code,-gen-sfrag-case,-gen-sfrag-enum-decl): New procs.
2669 (-gen-sfrag-engine-frag-table,-gen-sfrag-engine-fn): New procs.
2670 (-gen-sfrag-engine): New proc.
2671 (-gen-sem-case): Emit setup-semantics if specified.
2672 (-gen-sem-switch-engine): Update init/use of computed goto label.
2673 * sid-decode.scm (-gen-decode-expr-entry): Fetch ifield values
2675 (-gen-idesc-decls): Replace sem_address with cgoto.
2676 (-gen-scache-decls): Rewrite definition of `execute' member.
2677 * arm.cpu (arm isa): Enable decode-splits.
2678 * arm7.cpu (multiply insns): Rename result to mul-result.
2680 Rename decode-specialize to decode-split.
2681 * decode.scm (*): Update.
2682 * insn.scm (*): Update.
2683 * mach.scm (*): Update.
2684 * sid.scm (*): Update.
2686 1999-07-19 Doug Evans <devans@casey.cygnus.com>
2688 Record objects as a smob.
2689 * cos.c (scm_tc16_object): New static global.
2690 (cos_init): Initialize it.
2691 (OBJECT_P,OBJECT_ELEMENTS,OBJECT_CLASS_DESC): Update macros.
2692 (OBJECT_CLASS,OBJECT_ELEMENT_OFFSET): Update.
2693 (_object_tag): Delete.
2694 (_object_make_smob): New function.
2695 (_object_make_x,_object_make_with_values_x): Rewrite.
2696 (_object_elements,_object_class_desc): Rewrite.
2697 (_object_copy,object_p): Rewrite.
2698 (_object_specialize): Rewrite.
2699 (_object_print_elms,_object_print): New functions.
2700 (object_smob): New static global.
2701 (default_make_x): Use OBJECT_ELEMENT_OFFSET instead of magic number.
2703 * cos.c (_make_x_symbol): New static global.
2704 (object_make): Use it.
2705 (cos_init): Initialize it.
2707 1999-07-15 Doug Evans <devans@casey.cygnus.com>
2709 * rtl-c.scm (ifield): Back out last patch, use estate-ifield-var?
2710 instead to determine whether to use FLD macro.
2711 (<rtl-c-eval-state>): New member ifield-var?.
2712 (<rtl-c-eval-state>,vmake!): Recognize #:ifield-var?.
2713 * utils-gen.scm (-gen-ifld-extract-base): Specify #:ifield-var? #f.
2714 (-gen-ifld-extract-beyond,gen-multi-ifld-extract): Ditto.
2716 * rtl.scm (rtx-sequence-assq-locals): New proc.
2718 * cos.scm (-object-error): Don't crash on non-objects.
2720 * Makefile.am (CLEANFILES): Add hobbit.
2721 * Makefile.in: Rebuild.
2723 * rtl-c.scm (s-c-call): Delete unnecessary code.
2725 1999-07-14 Doug Evans <devans@casey.cygnus.com>
2727 * rtl-c.scm (ifield): Always reference value via `FLD'.
2729 * cos.c (elm_bound_p): Return problem SCM boolean values.
2731 * utils-cgen.scm (display-argv): New proc.
2732 * cgen-opc.scm (cgen): Call it.
2733 * cgen-sim.scm (cgen): Ditto.
2734 * cgen-gas.scm (cgen): Ditto.
2735 * cgen-stest.scm (cgen): Ditto.
2736 * cgen-sid.scm (cgen): Ditto.
2738 1999-07-05 Doug Evans <devans@casey.cygnus.com>
2740 * opc-asmdis.scm (-gen-parse-switch): New local var `junk'.
2741 * opc-ibld.scm (-gen-insert-switch): Initialize result to NULL.
2742 (-gen-extract-switch): Initialize result to 1.
2743 * opcodes.scm (gen-ifield-default-type): New proc.
2744 (gen-ifield-value-decl): Renamed from gen-ifield-type. All callers
2746 (<hw-index>,gen-insert): Handle non-ifield indices.
2747 (<hw-index>,gen-extract): Ditto.
2748 (<hw-asm>,gen-parse): Ditto.
2749 (<hw-asm>,gen-print): Ditto.
2750 (<keyword>,gen-parse): Ditto.
2751 (<keyword>,gen-print): Ditto.
2752 (<operand>,gen-fget): Ditto.
2753 (<operand>,gen-fset): Ditto.
2755 * sim.scm (-gen-hw-index-raw): Handle scalar indices.
2756 (-gen-hw-index): Ditto.
2757 * sid.scm (-gen-hw-index-raw): Handle scalar indices.
2758 (-gen-hw-index): Ditto.
2760 * sem-frags.scm: New file.
2762 * attr.scm (attr-parse): Add better checking of input.
2764 * hardware.scm (-hw-parse-getter): Renamed from -hw-parse-get.
2766 (-hw-parse-setter): Renamed from -hw-parse-set. All uses updated.
2768 * ifield.scm (ifld-nil?): New proc.
2770 * operand.scm (<operand>): New members getter,setter.
2771 (<operand>,make!): New args getter,setter. All uses updated.
2772 (op:getter,op:setter): New procs.
2773 (<hw-index>,field-start): Return 0 for non-ifield indices.
2774 (<hw-index>,field-length): Return 0 for non-ifield indices.
2775 (-operand-parse-getter,-operand-parse-setter): New procs.
2776 (-operand-parse): New args getter,setter. All callers updated.
2777 Always use hw-index-scalar for scalar operands.
2778 (-operand-read): Handle getter,setter.
2779 (define-full-operand): New args getter,setter. All uses updated.
2780 * semantics.scm (-build-ifield-operand!): Update.
2781 (-build-index-of-operand!): Update.
2782 * sim.scm (<operand>,cxmake-get): If operand has getter, use it.
2783 * simplify.inc (define-normal-operand): Update.
2785 * rtl.scm (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
2786 * rtl-c.scm (s-unop): Indirect fp ops through fpu op vector.
2787 (s-binop,s-cmpop,s-convop): Ditto.
2788 (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
2789 * sparc.cpu (insn-fmt2): Add FPOPS1,FPOPS2.
2790 (fcc-tests): New insn-enum.
2791 (fcc-value): Rename from fcc-type.
2792 * sparcfpu.cpu: New file. All fp support moved here.
2794 * rtl.scm (<rtx-func>): New member class.
2795 (rtx-class-*?): New procs.
2796 (def-rtx-node): New arg class. All callers updated.
2797 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-dual-node): Ditto.
2798 * rtx-funcs.scm (*): Specify class.
2800 * utils-cgen.scm (context-make-reader): New proc.
2802 * utils.scm (assert-fail-msg): New variable.
2804 (list-drop,list-tail-drop): New procs.
2806 1999-06-22 Doug Evans <devans@casey.cygnus.com>
2808 * desc-cpu.scm (-gen-hash-defines): Restore generation of
2809 CGEN_MIN_INSN_SIZE deleted on March 22.
2811 * ifield.scm (<ifield>,needed-iflds): New method.
2812 (<multi-ifield>,needed-iflds): New method.
2813 (ifld-needed-iflds): New proc.
2814 (multi-ifield?): New proc.
2815 * iformat.scm (<sfmt>): Delete member ifmt. New members length,iflds.
2816 (-sfmt-search-key): Include insn length in key.
2817 (-sfmt-order-iflds,-sfmt-used-iflds): New procs.
2818 (<fmt-desc>): Delete members ifmt-key,sfmt-key. New member used-iflds.
2819 (-ifmt-lookup-ifmt!): Compute key here.
2820 (-ifmt-lookup-sfmt!): Compute key here. Delete arg ifmt.
2821 All callers updated.
2822 (ifmt-build): Delete arg desc. New args search-key,iflds.
2823 All callers updated.
2824 (sfmt-build): Delete args desc,ifmt. New args search-key,cti?,
2825 in-ops,out-ops,sorted-used-iflds. All callers updated.
2826 * minsn.scm (minsn-make-alias): Use insn-set-ifmt!. Update call
2828 * operand.scm (op-iflds-used): New proc.
2829 * utils-gen.scm (gen-ifld-type): Move here from sim.scm
2831 And from sid.scm,sid-cpu.scm as well.
2832 (gen-ifld-extract-decl,-gen-ifld-extract-base): Ditto.
2833 (-gen-extract-word,-gen-ifld-extract-beyond): Ditto.
2834 (gen-ifld-extract,gen-multi-ifld-extract): Ditto.
2835 (gen-extracted-ifld-value): Ditto.
2836 (-extract-chunk-specs): Ditto.
2837 (gen-define-ifields,gen-define-ifmt-ifields): Ditto.
2838 (-extract-chunk,-gen-extract-beyond-var-list): Ditto.
2839 (gen-extract-ifields,gen-extract-ifmt-ifields): Ditto.
2840 (-extract-insert-subfields): New function.
2841 * sim.scm (gen-record-argbuf-ifld): Renamed from gen-ifld-extract.
2842 (gen-record-argvar-ifld): Renamed from gen-ifld-extract-argvar.
2843 * sim-cpu.scm (-gen-extract-ifmt-macro): Replace calls to
2844 gen-define-ifields with gen-define-ifmt-ifields. Ditto for
2846 (-gen-no-scache-semantic-fn): Ditto.
2847 (-gen-sem-case): Ditto.
2848 (-gen-read-case): Update calls to gen-define-ifields,
2849 gen-extract-ifields.
2850 * sim-decode.scm (-gen-record-args): Update.
2851 (-gen-sfmt-argvars-assigns): Update.
2852 (-gen-extract-case): Update.
2853 * sim-model.scm (-gen-model-insn-fn): Replace calls to
2854 gen-define-ifields with gen-define-ifmt-ifields. Ditto for
2856 * sid.scm (gen-ifld-argbuf-defn): Use gen-ifld-type.
2857 (gen-record-argbuf-ifld): Rename from gen-ifld-extract.
2858 (gen-record-argvar-ifld): Rename from gen-ifld-extract-argvar.
2859 * sid-decode.scm (-gen-decode-expr-entry): Update calls to
2860 gen-define-ifields, gen-extract-ifields.
2861 (-gen-record-args): Update.
2862 (gen-sfmt-argvars-assigns): Update.
2863 (-gen-extract-case): Replace calls to gen-define-ifmt-ifields
2864 with gen-define-ifields. Ditto for gen-extract-foo.
2865 (-gen-decode-fn): Use gen-ifld-extract-decl/gen-ifld-extract
2866 procs rather than method calls.
2868 1999-06-18 Doug Evans <devans@casey.cygnus.com>
2870 * sid.scm (-create-virtual-insns!): New local `context', pass it
2873 * rtl.scm (-rtx-traverse): Output symbol shortcuts in source form,
2874 (operand name) not (operand object), (local name) not (local object).
2875 (rtx-traverse-with-locals): New proc.
2876 (-compile-expr-fn): New proc.
2877 (rtx-compile): Rewrite.
2878 * rtl-c.scm (rtl-c-get): Handle operand/local names for src arg.
2879 (rtl-c-set-quiet): Don't accept operand/local names for dest arg.
2880 (rtl-c-set-trace): Ditto.
2881 (operand define-fn): Recognize operand name argument.
2882 (local define-fn): Recognize sequence temp name argument.
2883 * rtx-funcs.scm (operand): Argument is operand name, not object,
2884 so call current-op-lookup.
2885 (local): Similarily, so call rtx-temp-lookup.
2887 * rtl.scm (rtx-field?): Use rtx-name instead of car.
2888 (rtx-operand?): Ditto.
2889 (rtx-pretty-name): Ditto.
2890 (rtx-local-obj): Flag symbol argument as an error.
2891 (rtx-local-name): New proc.
2892 (rtx-sequence-locals,rtx-sequence-exprs): New procs.
2894 * rtl.scm (-rtx-traverse-operands): Fix debugging output of arg-types.
2896 * read.scm (debug-repl): Renamed from -debug-repl. All callers
2899 * arm7.cpu (do-word/byte-store): Use (trunc: QI rd) rather than
2902 * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall4, fastcall6.
2903 (*floats-s->c-fun-table*): Ditto.
2904 * hobbit.c,hobbit.h: Rebuild.
2905 * rtl.scm (-rtx-traverse-expr): Use fastcall6.
2906 * semantics.scm (rtx-simplify): Use /fastcall-make.
2908 * iformat.scm (-sfmt-search-key): Don't include memory modes.
2910 * insn.scm (<insn>): Delete members condition, compiled-condition.
2911 (<insn>,make!): Update
2912 (<insn> getters,setters): Update.
2913 (-insn-parse,insn-read,define-full-insn): Update.
2914 * minsn.scm (minsn-make-alias): Update.
2915 * iformat.scm (ifmt-analyze): Delete insn-condition reference.
2916 (ifmt-compute!): Ditto.
2917 * sim.scm (sim-finish!): Update.
2918 * simplify.inc: (define-normal-insn): Update.
2919 * sid-cpu.scm (gen-semantic-code): Update.
2921 * iformat.scm (-ifmt-lookup-ifmt!): Use insn-set-ifmt!.
2922 (-ifmt-lookup-sfmt!): Use insn-set-sfmt!.
2923 (ifmt-compute!): Ditto.
2925 1999-06-16 Doug Evans <devans@casey.cygnus.com>
2927 * minsn.scm (minsn-compute-iflds): Print better error message for
2930 1999-06-12 Doug Evans <devans@casey.cygnus.com>
2932 * rtl.scm (tstate->estate): Don't copy over expr-fn.
2934 * Makefile.am (HOBFLAGS): New variable.
2935 (cgen-hob.c): Use it.
2937 (libcpu_a_SOURCES): Add hob-sup.c.
2938 (hob-sup.o): New rule.
2939 * Makefile.in: Rebuild.
2940 * cgen.c: #include hob-sup.h.
2941 (cgen_init_c): Call hobbit_init_support.
2942 * hobbit.scm (*fastcall-make*,*c-symbol*): New variables.
2943 (*special-scm->c-functions*): Add them.
2944 (display-c-expression): Handle *c-symbol*.
2945 (*reckless-s->c-fun-table*): Add *fastcall-make*, fastcall5.
2946 (*floats-s->c-fun-table*): Ditto.
2947 (normalize): Recognize /fastcall-make.
2948 (normalize-fastcall-make): New proc.
2949 * hobbit.c,hobbit.h: Rebuild.
2950 * hob-sup.scm: New file.
2951 * hob-sup.c: New file.
2952 * hob-sup.h: New file.
2953 * read.scm: Load hob-sup.scm.
2954 * rtl.scm (-rtx-name-list): New variable.
2955 (rtx-name-list): New proc.
2956 (rtx-lookup): Try symbol first.
2957 (def-rtx-node): Add name to -rtx-name-list.
2958 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
2959 (-rtx-traverse-anymode): New proc.
2960 (-rtx-traverse-{emode,intmode,floatmode,nummode,vmmode}): New procs.
2961 (-rtx-traverse-{rtx,setrtx,testrtx,condrtx,casertx}): New procs.
2962 (-rtx-traverse-{locals,env,attrs,symbol,string,number}): New procs.
2963 (-rtx-traverse-{symornum,object}): New procs.
2964 (-rtx-make-traverse-table): Rewrite.
2965 (-rtx-traverse-operands): Rewrite arg-types handling.
2966 Handle #f result of traverser.
2967 (-rtx-traverse): Renamed from -rtx-traverse-normal.
2968 Move debug handling here.
2969 (-rtx-traverse-debug): Delete.
2970 (rtl-finish!): Change -rtx-traverse-table into list of handlers
2972 * semantics.scm (semantic-compile:process-expr!): Fix call to
2974 * utils.scm (map1-improper): New proc.
2976 1999-06-08 Doug Evans <devans@casey.cygnus.com>
2978 * arm.sim (h-tbit): Replace FUN-ACCESS with FUN-SET.
2980 * sid.scm (-hw-cxmake-get): s/FUN-ACCESS/FUN-GET/.
2981 (-hw-gen-set-quiet): s/FUN-ACCESS/FUN-SET/.
2982 (<operand>,cxmake-get): Tweak.
2983 (sim-finish!): Delete FUN-ACCESS attribute. Create FUN-GET,FUN_SET.
2985 1999-06-07 Doug Evans <devans@casey.cygnus.com>
2987 * thumb.cpu (dnti): Delete timing spec.
2990 * arm.cpu (arm isa): New fields condition, setup-semantics.
2991 (thumb isa): New field setup-semantics.
2992 (h-gr): Add attribute CACHE-ADDR.
2993 * arm7.cpu (dnai): Delete condition.
2994 (eval-cond): Delete.
2996 * mach.scm (<isa>): New member setup-semantics.
2997 (-isa-parse-setup-semantics): New proc.
2998 (-isa-parse): New arg setup-semantics.
2999 (-isa-read): Recognize setup-semantics.
3001 * sid-cpu.scm (gen-extract-fields): Split into two:
3002 gen-extract-ifields, gen-extract-ifmt-ifields.
3003 (-gen-scache-semantic-fn): Delete `taken_p'. Delete
3004 tracing begin/end messages (done by caller now).
3005 (-gen-sem-case): Delete `taken_p'. Add npc,br_status. Delete
3006 tracing begin/end messages (done by x-before,x-after virtual insns).
3007 (-gen-sem-switch-engine): Redo vpc initialization. Save vpc at
3008 end so don't have to look it up again next time.
3009 * sid-decode.scm (-decode-expr-ifield-values): New proc.
3010 (-decode-expr-ifield-tracking-key): New proc.
3011 (-decode-expr-ifield-tracking): New proc.
3012 (-decode-expr-ifield-values-used): New proc.
3013 (-decode-expr-ifield-mark-used!): New proc.
3014 (-gen-decode-expr-set-itype): New proc.
3015 (-gen-decode-expr-entry): Rewrite.
3016 (-gen-decode-table-entry): New proc.
3017 (-gen-decoder-switch): Use it.
3018 (-gen-virtual-insn-finder): New proc.
3019 (-gen-argbuf-elm): Move here from sid.scm.
3020 (-gen-argbuf-hw-elm): Ditto.
3021 (-gen-argbuf-fields-union): Add entries for chain,before insns.
3022 (-gen-scache-decls): Add `cond' member to @prefix@_scache for
3023 conditional-execution isas.
3024 (-gen-decode-fn): Record conditional-exec ifield.
3025 * sid.scm (-current-pbb-engine?): New global.
3026 (current-pbb-engine?,set-current-pbb-engine?!): New procs.
3027 (<ifield>,gen-ifld-extract): New arg `indent'.
3028 (<multi-ifield>,gen-ifld-extract): Ditto.
3029 (-hw-gen-set-quiet-pc): Add pbb support. Delete `taken_p'.
3030 (-op-gen-set-trace): Don't print tracing messages for pbb engine.
3031 (-gen-arch-model-decls): Only scan real insns.
3032 (scache-engine-insns,pbb-engine-insns): New procs.
3033 (-create-virtual-insns!): New proc.
3034 (sim-finish!): Call it.
3035 (-decode-specialize-insn?): New proc.
3036 (-decode-specialize-build-assertion): New proc.
3037 (-decode-specialize-insn-1): New proc.
3038 (-decode-specialize-insn): New proc.
3039 (-fill-sim-insn-list!): New proc.
3040 (sim-analyze!): Create copies of insns to be specialized.
3041 * utils-cgen.scm (obj-set-name!): New proc.
3043 * attr.scm (-attr-eval): Rewrite calls to rtx-simplify/rtx-compile.
3044 * iformat.scm (ifmt-analyze): Pass `insn' to semantic-compile,
3046 (ifmt-compute!): Delete arg `arch'. Result is list of iformats,
3048 * mach.scm (arch-analyze-insns!): Update call to ifmt-compute!.
3049 * rtl-c.scm (rtl-c-get): Use DM for default mode instead of VM.
3050 Avoid infinite loop when rtx-eval-with-estate leaves expr alone.
3051 (attr): Rewrite test for insn owner.
3052 (member): New rtx function.
3053 * rtl.scm (rtx-* accessors): Define as cxr directly rather than
3054 as separate function.
3055 (rtx-ifield?,rtx-ifield-name): New procs.
3056 (rtx-operand-obj): Rewrite.
3057 (rtx-operand-name): New proc.
3058 (rtx-cmp-op-mode,rtx-cmp-op-arg): New procs.
3059 (rtx-number-list-values,rtx-member-value,rtx-member-set): New procs.
3060 (tstate-make): New args owner, known. All callers updated.
3061 (tstate-known-lookup): New proc.
3062 (rtx-traverse): New arg owner. All callers updated.
3063 (rtx-make-bool): New proc.
3064 (rtl-find-ifields): Rewrite.
3065 (rtx-simplify,rtx-simplify-eq-attr-{insn,mach}): Moved to ...
3066 * semantics.scm: ... here.
3067 (rtx-const-equal,rtx-const-list-equal): New procs.
3068 (-build-known-values): New proc.
3069 (semantic-compile): New arg `insn'. Call rtx-simplify.
3070 (semantic-attrs): Ditto.
3071 * rtx-funcs.scm (member,number-list): New rtx functions.
3073 * attr.scm (attr-remove-meta-attrs-alist): Delete leading '-' in name.
3074 Rewrite. Delete arg `all-attrs'. All callers updated.
3075 (attr-remove-meta-attrs): Delete leading '-' in name. All callers
3077 * utils-cgen.scm (gen-bool-attrs): Remove meta attrs.
3079 * decode.scm (subdtable-add): Handle `expr' entries.
3080 (exprtable-entry-make): Use vector. Record ifields refered to by expr.
3081 (exprtable-entry-*): Update.
3082 (exprtable-entry-iflds): New proc.
3083 (exprentry-cost): New proc.
3084 (exprtable-sort,-gen-exprtable-name): New procs.
3085 (exprtable-make): New arg `name'. All callers updated. use vector.
3086 (exprtable-*): Update.
3087 (-build-decode-table-entry): Don't issue collision warning if all are
3088 specialized insns. Sort exprtable entries before building table.
3090 * read.scm (-reader-process-expanded-1): Move pretty printing of
3091 input to logging level 4.
3093 * utils.scm (string-list->string): New proc.
3095 * insn.scm (<insn>): Define setters for ifield-assertion, condition,
3097 (insn-read): Delete leading '-' in name. All callers updated.
3098 (real-insn?): New proc.
3099 (real-insns): Rewrite.
3100 (insn-has-ifield?): New proc.
3101 (insn-builtin!): Create insn attribute SPECIALIZED.
3103 * mach.scm (<arch>): Delete member app-data.
3104 (current-raw-insn-list): New proc.
3105 (insn-list-car,insn-list-splice!): New procs.
3106 (<decode-specialize>): New class.
3107 (-isa-parse-decode-specialize): New proc.
3108 (-isa-parse-decode-specializes): New proc.
3109 (<isa>): New members `condition', `decode-specializes'.
3110 (-isa-parse-condition): New proc.
3111 (-isa-parse): New args condition, decode-specializes.
3112 (-isa-read): Recognize condition, decode-specializes.
3113 (-isa-add-decode-specialize!): New proc.
3114 (modify-isa): New proc.
3115 (isa-conditional-exec?,state-conditional-exec?): New procs.
3116 (arch-init!): New reader command `modify-isa'.
3118 * mode.scm (mode-class-signed?,mode-class-unsigned?): New procs.
3119 (mode-signed,mode-unsigned?): New procs.
3121 Thu Jun 3 16:00:40 1999 Doug Evans <devans@canuck.cygnus.com>
3123 * types.scm (<array>): New method get-shape.
3124 * hardware.scm (<hardware-base>): Forward get-shape,get-num-elms
3126 (hw-shape,hw-num-elms): New procs.
3127 * sim.scm (<hw-register>,gen-profile-index-type): Use "unsigned short"
3128 if there's more than 255 registers.
3129 * sid.scm (<hw-register>,gen-profile-index-type): Ditto.
3131 * hardware.scm (-hw-parse): Flag as error CACHE-ADDR specified
3134 1999-05-21 Doug Evans <devans@casey.cygnus.com>
3136 * cgen-sid.scm (sim-arguments): Add -X.
3137 * sid-cpu.scm (-gen-hardware-types): Comment out scache vars.
3138 (-gen-all-semantic-fns): Don't include PBB support virtual insns.
3139 (-gen-sem-case): Use CASE/NEXT macros again. Tweak indenting.
3140 Simplify by supporting pbb engine only.
3141 (-gen-sem-switch-init): New proc.
3142 (-gen-sem-switch-engine): Rename from -gen-sem-switch-fn.
3143 (cgen-sem-switch.cxx): New proc.
3144 * sid-decode.scm (-gen-decode-insn-globals): Replace with-sem-switch?
3145 with with-pbb?. Support dual scache/pbb engines.
3146 (-gen-idesc-decls): Replace with-sem-switch? with with-pbb?.
3147 Support dual scache/pbb engines.
3148 (cgen-decode.h): Generate semantic fn decls if with-scache?.
3149 * sid.scm (*) with-pbb? replaces with-sem-switch?.
3150 (sim-finish!): Create pbb support virtual insns if with-pbb?.
3152 1999-05-10 Ben Elliston <bje@cygnus.com>
3154 * arm7.cpu: Remove coprocessor related fields, operands and insn
3155 definitions for now. Take the undefined instruction trap instead.
3156 (ldmda-wb): New instruction.
3157 (ldmib-wb): Likewise.
3158 (ldmdb-wb): Likewise.
3159 (stmdb-wb): Likewise.
3160 (stmib-wb): Likewise.
3161 (stmda-wb): Likewise.
3163 1999-05-08 Doug Evans <devans@casey.cygnus.com>
3165 * sid.scm (<hw-memory>,cxmake-get): Call GETMEM method, not function.
3166 (<hw-memory>,gen-set-quiet): Call SETMEM method, not function.
3168 * utils-cgen.scm (keyword-list->arg-list): Fix call to substring,
3169 hobbit can't handle optional third arg.
3171 1999-05-07 Doug Evans <devans@casey.cygnus.com>
3173 * arm.cpu (h-tbit): Delete set spec.
3174 (h-mbits): Don't call arm_mbits_set in set spec.
3175 * arm.sim: New file.
3176 * hardware.scm (modify-hardware): New proc.
3177 (hardware-init!): Add modify-hardware command.
3178 * sid.scm (-hw-cxmake-get): Use method call if FUN-ACCESS specified.
3179 (-hw-gen-set-quiet): Ditto.
3180 (sim-finish!): Call invalid_insn method. Define FUN-ACCESS builtin
3181 hardware attribute. Load $arch.sim file if present.
3182 * utils-cgen.scm (keyword-list?): New proc.
3183 (keyword-list->arg-list,arg-list-validate-name): New procs.
3184 (arg-list-check-no-args,arg-list-symbol-arg): New procs.
3186 * arm7.cpu (eval-cond): Pass pc to @cpu@_eval_cond handler.
3188 * sid-cpu.scm (-gen-hardware-types): Rename @cpu@_cpu to
3191 * attr.scm (obj-prepend-atlist!): New proc.
3193 * opc-opinst.scm (cgen-opinst.c): Analyze instructions if necessary.
3195 * sid.scm (<operand>,profilable?): Use op:type.
3196 * sim.scm (<operand>,profilable?): Use op:type.
3198 1999-05-04 Doug Evans <devans@casey.cygnus.com>
3200 * utils.scm (find-index,find): Be more stack friendly.
3202 * arm7.cpu (arith-imm-op): Compute pc before setting cpsr.
3205 1999-05-01 Doug Evans <devans@casey.cygnus.com>
3207 * arm.cpu (h-gr-usr): New hardware element.
3208 (h-gr-fiq,h-gr-svc,h-gr-abt,h-gr-irq,h-gr-und): New hardware elements.
3209 (arm-mode): New keyword.
3210 (h-mbits): Add set spec.
3211 (h-spsr): Implement get/set specs.
3213 * read.scm: Load slib/pp.scm, slib/genwrite.scm.
3214 (-reader-process-expanded-1): Pretty print logging output.
3216 * sid-cpu.scm (-gen-reg-access-defns): Make getters `const'.
3217 (cgen-cpu.h): Print enums before hardware elements.
3218 (cgen-semantics.cxx): @arch@-cgen.h renamed to @arch@-main.h.
3219 * sid-decode.scm (cgen-decode.cxx): Ditto.
3220 * sid-model.scm (cgen-model.cxx): Ditto.
3222 * utils-cgen.scm (context-error): Accept variable number of
3225 * rtx-funcs.scm (error:): New rtx function.
3226 * rtl-c.scm (s-case-vm): New proc.
3227 (-gen-non-vm-case-get,s-case-non-vm): New procs.
3228 (s-case): Simplify, handle non-VM result.
3229 (error:): New rtx function.
3231 1999-04-30 Doug Evans <devans@casey.cygnus.com>
3233 * arm.cpu (h-pc): Add set spec to zero bottom bits.
3234 (test-hi,test-ls): Fix cbit handling.
3235 (shift-type,h-operand2-shifttype): Move here ...
3236 * arm7.cpu: ... from here.
3237 (set-cond,set-cond-maybe,dnix): Delete, unused.
3238 (set-zn-flags,set-logical-cc,set-add-flags,set-sub-flags): Move ...
3239 * arm.cpu: ... to here.
3240 * thumb.cpu (cmp,alu-cmp): Use set-sub-flags.
3241 (alu-cmn): Use set-add-flags.
3242 (alu-tst): Use set-zn-flags.
3243 (alu-cmp): Use set-sub-flags.
3244 (lsl,lsr,asr): Set condition codes.
3245 (add,addi,sub,subi,mov,addi8,subi8): Ditto.
3246 (alu-op): Split into three: alu-logical-op,alu-arith-op,
3248 (hireg-op): Split sem-fn into lo-dest-sem-fn,hi-dest-sem-fn.
3249 All callers updated.
3250 (sub-sp): Rename from add-sp-neg.
3251 (f-lbwl-offset): Delete.
3252 (f-lbwl-hi,f-lbwl-lo): New ifields.
3253 (lbwl-hi,lbwl-lo): Update.
3254 (bl-hi): Add 4 to pc.
3255 (push-reg,pop-reg): Simplify.
3256 (push,push-lr): Push registers in correct order.
3257 (pop,pop-pc): Pop registers in correct order.
3258 (save-reg-inc,load-reg-inc): Simplify.
3259 (ldmia): Save registers in correct order.
3261 1999-04-30 Ben Elliston <bje@cygnus.com>
3263 * arm7.cpu (f-op-hdt): Remove; unused.
3264 (f-ror-imm8-value,f-ror-imm-rotate): New fields.
3265 (f-ror-imm8): New multi-ifield.
3266 (f-operand2-bit7): Remove; use the generic `f-bit7' instead. All
3268 (f-uimm12): New field.
3269 (ror-imm8): New operand.
3271 (hdt-offset8): Reinstate operand.
3272 (offset4-hi,offset4-lo): Remove.
3273 (set-cond): Remove macro; unused.
3274 (set-cond-maybe): Likewise.
3275 (load-word/byte): Use uimm12 operand for a true 12-bit immediate.
3276 (store-word/byte): Likewise.
3277 (load-halfword): Use hdt-offset8 multifield operand instead of two
3278 4-bit operands that are explicitly combined by semantic code.
3279 (do-halfword-store): Bug fix. Set address when not preindexing.
3280 (store-halfword): Also use hdt-offset8 operand.
3281 (arith-op): Avoid clobbering source registers when one of them is
3282 the destination register.
3283 (arith-imm-op): Likewise.
3284 (tst-imm): Use ror-imm8 operand. Handle special case of rot 0.
3285 (teq-imm): Likewise.
3286 (ldm-p): Rename to ldmdb.
3287 (stm-pw): Rename to stmdb-wb.
3288 (multi-action): New macro; test reg-list bits and execute a
3289 semantic fn if the bit is set.
3290 (ldmda,ldmib,ldmia,ldmia-wb,ldmdb): New multiple load insns.
3291 (stmdb,stmib,stmia,stmia-wb,stmda,stmdb-wb): Store insns.
3292 (all insns): Use dnai entries for simplicity rather than dni.
3293 (*): Use short-form of (const ..).
3295 1999-04-29 Doug Evans <devans@casey.cygnus.com>
3297 * rtl.scm (<rtx-func>): Rename member type to style. Rename
3298 member eval to evaluator.
3299 (rtx-foo accessors): Rename from rtx:foo. All callers updated.
3300 (tstate-make): Delete arg op-fn. All callers updated.
3301 (tstate-op-fn,tstate-set-op-fn!): Delete.
3302 (rtx-traverse): Delete op-fn arg. All callers updated.
3303 * semantics.scm (-simplify-for-compilation-process-expr): New proc,
3304 split out of -simplify-for-compilation.
3306 * Makefile.am (CGEN_NONHOB_FILES,CGENFILES): New variables.
3307 (cgen_DEPENDENCIES): Add stamp-cgen.
3308 (stamp-cgen): New rule.
3309 * Makefile.in: Rebuild.
3311 * rtl-c.scm (enum:): Define emitter for.
3312 * rtl.scm (rtx-constant?): Rename from rtx-const? and check for
3314 (rtx-constant-value,rtx-enum-value): New procs.
3315 (-rtx-traverse-normal): Expand enum-value to (enum enum-value).
3316 (rtx-compile-time-constant?): Return #t for enums.
3317 (rtx-true?,rtx-false?): Handle enums.
3318 (rtx-simplify-eq-attr-mach): Use rtx-true,rtx-false instead of
3319 building result by hand.
3320 (rtx-simplify-eq-attr-insn): Ditto.
3321 * rtx-funcs.scm (enum:,enum): New rtx functions.
3323 * mach.scm (<arch>): New members insns-analyzed?, semantics-analyzed?,
3325 (arch-analyze-insns!): New proc.
3326 * opcodes.scm (opcodes-analyze!): Call arch-analyze-insns! instead
3327 of calling ifmt-compute! directly.
3328 * sid.scm (-sim-insns-analyzed?): Delete.
3329 (sim-analyze!): Call arch-analyze-insns! instead of calling
3330 ifmt-compute! directly.
3331 * sim.scm (-sim-insns-analyzed?): Delete.
3332 (sim-analyze!): Call arch-analyze-insns! instead of calling
3333 ifmt-compute! directly.
3335 * utils.scm (string-take-with-filler): New proc.
3336 (string-take): Use it.
3338 * pgmr-tools.scm: New file.
3339 * read.scm: Load it.
3340 * insn.scm (pretty-print-insn-format): Move to pgmr.scm.
3342 * insn.scm (insn-base-mask): Renamed from insn:mask.
3343 All callers updated.
3344 (insn-base-mask-length): Renamed from insn:mask-length.
3345 All callers updated.
3346 (insn-foo): Renamed from insn:foo. All callers updated.
3347 * minsn.scm (minsn-foo): Renamed from minsn:foo. All callers updated.
3348 * iformat.scm (compute-insn-base-mask-length): Renamed from
3349 compute-insn-mask-length. All callers updated.
3350 (compute-insn-base-mask): Renamed from compute-insn-mask.
3351 All callers updated.
3353 * enum.scm (-enum-parse-prefix): New proc.
3354 (<enum>,make!): Don't parse enum values here.
3355 (-enum-parse): Do it here. Call -enum-parse-prefix.
3356 (define-full-insn-enum): Ditto.
3357 (enum-vals-upcase): New proc.
3358 * hardware.scm (define-keyword): Make enum prefix uppercase.
3359 * hobscmif.h (CHAR_LOWERP,CHAR_UPPERP,CHAR_WHITEP): New macros.
3361 * ifield.scm (<ifield>,field-mask): Allow container to be #f.
3362 (<ifield>,field-extract): New method.
3363 (<multi-ifield>,field-extract): New method.
3364 (ifld-extract): New proc.
3365 * opcodes.scm (ifld-insert-fn-name): Renamed from ifld-insert.
3366 (ifld-extract-fn-name): Renamed from ifld-extract.
3368 * ifield.scm (ifld-new-value): Renamed from ifield-make.
3369 All callers updated.
3371 * ifield.scm (ifld-lsb0?): New proc.
3372 (sort-ifield-list): New arg up?. All callers updated.
3373 * iformat.scm (compute-insn-mask): Get lsb0? flag from argument,
3374 rather than global state.
3376 1999-04-27 Doug Evans <devans@casey.cygnus.com>
3378 * insn.scm (pretty-print-insn-format): New proc.
3380 * Makefile.in: Rebuild.
3381 * aclocal.m4: Rebuild
3382 * configure: Rebuild.
3384 Mon Apr 26 10:30:18 1999 Doug Evans <devans@canuck.cygnus.com>
3386 * configure.in (AM_INIT_AUTOMAKE): Update version to 0.7.2.
3387 * configure: Rebuild.
3388 * aclocal.m4: Rebuild.
3389 * Makefile.in: Rebuild.
3390 * doc/Makefile.in: Rebuild.
3391 * doc/version.texi: Rebuild.
3393 1999-04-25 Doug Evans <devans@casey.cygnus.com>
3395 * utils.scm (bits->bools): New proc.
3397 1999-04-23 Doug Evans <devans@casey.cygnus.com>
3399 * sid.scm (<multi-ifield>,gen-ifld-extract-decl): Fix call to
3400 subfield's gen-ifld-extract-decl method.
3402 1999-04-23 Ben Elliston <bje@cygnus.com>
3404 * arm7.cpu (ldrsh-pu): Remove.
3405 (do-halfword-load): New pmacro.
3406 (load-halfword): Likewise.
3407 (do-halfword-store): Likewise.
3408 (store-halfword): Likewise.
3409 (strh-*): New instructions.
3410 (ldrsb-*): Likewise.
3412 (ldrsh-*): Likewise.
3414 1999-04-22 Doug Evans <devans@casey.cygnus.com>
3416 * ifield.scm (ifld-constant?): Delete special handling of RESERVED
3419 * arm7.cpu (do-word/byte-store): Fix typo.
3421 1999-04-22 Ben Elliston <bje@cygnus.com>
3423 * arm7.cpu (do-word/byte-load): Handle cases where the destination
3424 register is the program counter (R15).
3426 * arm7.cpu (do-word/byte-store,store-word/byte): New pmacros.
3427 (str-*): Implement using store-word-byte. Remove older versions.
3428 (bic): Use the `inv' rtx for obtaining bitwise complements.
3429 (bic-imm): Likewise.
3431 (mvn-imm): Likewise.
3432 (store-indev-reg): Remove crufty pmacro.
3433 (load-indiv-reg): Likewise.
3434 (ldm-p): Reverse the order of register processing for decrement.
3436 (stbi): Remove; handled by the str-* insns.
3438 1999-04-21 Doug Evans <devans@casey.cygnus.com>
3440 * thumb.cpu (cmp): Fix carry bit computation.
3443 1999-04-20 Doug Evans <devans@casey.cygnus.com>
3445 * arm.cpu (h-tbit): Specify set spec.
3447 * arm7.cpu (bx): Don't call C routine, just set h-tbit.
3448 (set-sub-flags): Interpret "carry bit" as a borrow.
3449 (all sub/cmp insns): Carry bit is actually a borrow bit.
3450 * thumb.cpu (bx-rs,bx-hs): Don't call C routine, just set h-tbit.
3451 (add-carry,sub-carry,thumb-neg,thumb-bic,thumb-inv): Delete. Use
3453 (hireg-add,hireg-cmp,hireg-move): Ditto.
3455 * read.scm (-CGEN-VERSION): Change version to 0.7.2.
3456 (-CGEN-LANG-VERSION): Ditto.
3458 1999-04-18 Doug Evans <devans@casey.cygnus.com>
3460 * pmacros.scm (-pmacro-make): New arg `default-values',
3461 all callers updated.
3462 (-pmacro-default-values): New proc.
3463 (-pmacro-process-keyworded-args): New proc.
3464 (-pmacro-process-args): New proc.
3465 (-pmacro-invoke): Process arguments before expanding macro.
3466 (-pmacro-get-arg-spec,-pmacro-get-default-values): New procs.
3467 (define-pmacro): Handle default values specified in arg list.
3468 * rtl.scm (rtx-alu-op-mode,rtx-alu-op-arg): New procs.
3469 (rtx-boolif-op-arg[01]): New procs.
3470 (rtx-true,rtx-false,rtx-canonical-bool): New procs.
3471 (rtx-simplify): Handle not,orif,andif.
3472 * semantics.scm (-simplify-for-compilation): Simplify not,orif,andif.
3473 * utils.scm (alist-copy): New proc.
3474 * arm7.cpu (do-word/byte-load,load-word/byte): New pmacros.
3476 (swi): Explicitly set pc.
3478 * thumb.cpu (bx-rs,bx-hs): Reverse test for switch to arm mode.
3480 1999-04-17 Ben Elliston <bje@cygnus.com>
3482 * arm7.cpu (ldr-pu): Do not add 8 to R15; the step() method
3483 correctly adjusts the program counter now.
3485 * arm7.cpu (f-halfword?): Rename from `f-hdt-halfword?'.
3486 (f-signed?): Rename from `f-hdt-signed?'.
3487 (f-offset4-hi): Rename from `h-hdt-off4-ms'.
3488 (f-offset4-lo): Rename from `h-hdt-off4-ls'.
3489 (f-hdt-offset8): Use new field names.
3490 (ldr): Use `imm12' field, not `offset12', since we do our own
3492 (str, str-*): Likewise.
3493 (ldu-*): Remove most; better not implemented than broken.
3495 (ldrsh-pu): New insn.
3499 (ldm-p): Likewise; replace (load-indiv-reg) version.
3501 1999-04-15 Doug Evans <devans@casey.cygnus.com>
3503 * arm.cpu (h-pc): Delete VIRTUAL attribute, get/set specs.
3504 * arm7.cpu (*): Fix mode of result of arm_compute_carry_out_*.
3505 (*): Explicitly specify mode in c-call.
3506 (logical-op): Recognize sets of h-gr[15] as sets of pc.
3508 (and-imm,orr-imm,xor-imm,mov-imm,bic-imm,mvn-imm): Ditto.
3509 (arith-imm-op): New pmacro.
3510 (add-imm,adc-imm,sub-imm,sbc-imm,rsb-imm,rsc-imm): Use it.
3511 * thumb.cpu (bx-rs,bx-hs): Rewrite.
3513 1999-04-14 Doug Evans <devans@casey.cygnus.com>
3515 * rtl.scm (rtx-simplify-eq-attr-insn): Fix call to context-error.
3517 * rtl.scm (rtl-find-ifields): Implement.
3519 * utils-gen.scm: New file.
3520 * read.scm: Load it.
3521 * desc.scm: Move generic attribute code to utils-gen.scm.
3522 * Makefile.am (CGEN_HOB_INPUT_FILES): Add it.
3523 * Makefile.in: Rebuild.
3525 * arm7.cpu (R15-OFFSET): New attribute.
3527 (logical-op): Delete arg `result?'. All callers updated. Use dnai.
3528 Delete use of eval-cond (dnai specifies it). Specify R15-OFFSET of 12
3529 for reg-shift version.
3531 (data processing insns): Reorganize. Use dnai.
3533 * attr.scm (attr-kind): New proc.
3534 (attr-list-enum-list): Rewrite.
3535 (-attr-sort): Split result into two lists, bools and non-bools.
3536 (current-attr-list-for): Update.
3538 * cgen-sid.scm (sim-arguments): Add -H -> build desc.h file.
3539 * sid-cpu.scm (-gen-attr-decls): New proc.
3540 (-gen-insn-attr-decls): New proc.
3541 (cgen-desc.h): New proc.
3542 (cgen-cpu.h): Put everything in @cpu@ namespace.
3543 (gen-parallel-exec-type): Change prefix of parexec struct from
3545 (-gen-trace-record-type): Ditto for trace_record struct.
3546 (-gen-write-case): Update.
3547 (-gen-scache-semantic-fn): Change function prefix from @cpu@ to
3548 @prefix@. Update scache struct references.
3549 (-gen-sem-case): Update scache struct references.
3550 (-gen-sem-switch-fn): Update idesc struct reference.
3551 Update insn_type enum reference.
3552 (cgen-write.cxx): Update scache,argbuf references.
3553 (cgen-semantics.cxx): Simplify namespace choice (always @cpu@).
3554 * sid-decode.scm (IDESC-TABLE-VAR): Change prefix of insn_data
3555 from @cpu@ to @prefix@.
3556 (-gen-decode-insn-entry): Use gen-cpu-insn-enum.
3557 (-gen-decode-expr-entry): Ditto. Change prefix of INSN_X_INVALID
3558 from @CPU@ to @PREFIX@.
3559 (-gen-decoder-switch): Change prefix of INSN_X_INVALID
3560 from @CPU@ to @PREFIX@.
3561 (-gen-decode-insn-globals): Generate insn attributes.
3562 (-gen-sem-fn-name): Change function prefix from @cpu@ to @prefix@.
3563 (-gen-sem-fn-decls): Use -gen-sem-fn-name. Add `using' for
3564 semantic fn typedef.
3565 (-gen-idesc-decls): Simplify cpu class name (always @cpu@_cpu).
3566 Change prefix of scache struct from @cpu@ to @prefix@.
3567 Change prefix of semantic fn typedef from @cpu@ to @prefix@.
3568 Change prefix of idesc struct from @cpu@ to @prefix@.
3569 Change prefix of insn_type enum from @cpu@ to @prefix@.
3570 (-gen-argbuf-fields-union): Change prefix of sem_fields union
3571 from @cpu@ to @prefix@.
3572 (-gen-scache-decls): Change prefix of scache struct from
3573 @cpu@ to @prefix@. Update idesc struct name.
3574 Update decode,execute methods.
3575 (-gen-extract-case): Update to type name changes.
3576 (-gen-decode-fn): Ditto.
3577 (cgen-decode.h): Put everything in @cpu@ namespace (except
3578 semantic fn decls). Change prefix of insn_word from @cpu@ to @prefix@.
3579 (cgen-decode.cxx): Add using namespace @cpu@.
3580 * sid-model.scm (-gen-hw-profile-decls): Change prefix of
3581 model_mark_get/set from @cpu@ to @prefix@.
3582 (gen-model-unit-fn-name): Change function prefix from @cpu@ to
3584 (gen-model-fn-decls): Update idesc struct name. Change prefix
3585 of model_insn_before/after from @cpu@ to @prefix@.
3586 (-gen-model-insn-fn): Update scache/idesc/argbuf struct names.
3587 Update insn_word type name.
3588 (-gen-model-timing-table): Update INSN_TIMING struct name.
3589 (-gen-model-init-fn): Update MODEL_DATA struct name.
3590 (-gen-mach-defns): Update name of init_idesc_table fn.
3591 (cgen-model.cxx): Add using namespace @cpu@.
3592 * sid.scm (gen-cpu-class): Delete.
3593 (gen-attr-type): New proc.
3594 (gen-obj-attr-sid-defn): New proc.
3595 (<operand>,gen-profile-code): Update name of model_mark_get/set fn.
3596 (gen-cpu-insn-enum-decl): Change prefix of insn_type enum from
3598 (gen-cpu-insn-enum): Update name of insn enum.
3599 * thumb.cpu (bx-rs): Rename @cpu@_do_bx to @prefix@_do_bx.
3601 (swi): Rename @cpu@_swi to @prefix@_swi.
3603 * decode.scm (-build-decode-table-entry): Remove heuristic for
3604 distinguishing insns, and use insn ifield-assertion specs.
3606 * desc-cpu.scm (gen-A-attr-mask): Simplify.
3607 (gen-ifld-defns): Boolean attributes begin at number 0 now.
3608 (gen-hw-table-defns,gen-operand-table,gen-insn-table): Ditto.
3609 * opc-itab.scm (-gen-macro-insn-table): Ditto.
3610 * utils-cgen.scm (gen-attr-enum-decl): Change type arg to prefix,
3611 all callers updated.
3612 (gen-attr-name): New proc
3613 (gen-attr-mask): Use it. Boolean attributes start at 0 now.
3614 (gen-obj-attr-defn): Delete num_nonbools count.
3616 * iformat.scm (ifmt-analyze): Handle insn-condition.
3617 (ifmt-compute!): Ditto.
3618 * insn.scm (<insn>): Specify default value for condition,
3619 post-cond-trap,compiled-condition,compiled-semantics.
3620 (<insn>,make!): New arg condition.
3621 (<insn>): Add getters for condition,compiled-condition.
3622 (-insn-parse): New arg condition, all callers updated.
3623 (-insn-read): Recognize condition spec.
3624 (define-full-insn): New arg condition.
3625 * minsn.scm (minsn-make-alias): Update call to (make <insn> ...).
3626 * semantics.scm (semantic-compile): Change arg sem-code to
3628 (semantic-attrs): Ditto.
3629 * sim.scm (sim-finish!): Update calls to define-full-insn.
3630 * simplify.inc (define-normal-insn): Update call to define-full-insn.
3631 * sid-cpu.scm (gen-semantic-code): Handle insn-condition.
3632 * sid.scm (sim-finish!): Update call to define-full-insn.
3634 Tue Apr 13 17:04:34 1999 Doug Evans <devans@canuck.cygnus.com>
3636 * Makefile.am (sim-cpu): Allow specification of ISA.
3637 * Makefile.in: Rebuild.
3639 Sun Apr 11 00:37:56 1999 Jim Wilson <wilson@cygnus.com>
3641 * i960.cpu (sll-expr, srl-expr, sra-expr): Handle large shift counts.
3643 1999-04-10 Doug Evans <devans@casey.cygnus.com>
3645 * sparccom.cpu (check-fp-enable): Wrap TRAP32_FP_DIS in c-code.
3647 * arm.cpu (gr-names): Put pc first so it gets prefered in disassembly.
3649 * attr.scm (atlist?): New proc.
3650 (-attr-eval): Rewrite.
3651 (attr-parse): New proc.
3652 (atlist-parse): Use it.
3654 * decode.scm (exprtable-entry-make): New proc.
3655 (exprtable-entry-insn,exprtable-entry-expr): New procs.
3656 (exprtable-make,exprtable-insns): New procs.
3658 * hardware.scm (hw-mode-ok?): Delete argument `set?'.
3660 (hardware-builtin!): Make h-memory a vector.
3662 * iformat.scm (ifmt-ifields): Renamed from ifmt-fields.
3663 All callers updated.
3664 (ifmt-analyze): Use csem-* accessors on result of semantic-compile.
3666 * insn.scm (<insn>). Rename ifld-assertions to ifield-assertion.
3668 (-insn-parse): Set semantics to #f if not specified.
3669 (define-insn,define-full-insn): Take out code that ignores ALIAS's
3671 (-parse-insn-format): Recognize `=' iformat spec.
3673 * mach.scm (isa-min-insn-bitsize): Ignore ALIAS's.
3674 (isa-max-insn-bitsize): Ditto.
3676 * opcodes.scm (<ifield>,gen-insert): Call rtl-c instead of
3678 (<ifield>,gen-extract): Ditto.
3679 (<multi-ifield>,gen-insert,gen-extract): Ditto.
3680 * sid-cpu.scm (-gen-reg-access-defns): Ditto.
3681 (gen-define-ifmt-ifields): New proc.
3682 (gen-semantic-code): Rewrite.
3683 * sid-decode.scm (-gen-decode-expr-entry): New proc.
3684 (-gen-decoder-switch): Handle expression tables.
3685 (-gen-extract-case): Call gen-define-ifmt-ifields instead of
3687 * sid-model.scm (-gen-model-insn-fn): Call gen-define-ifmt-ifields
3688 instead of gen-define-fields.
3689 * sid.scm (<ifield>,gen-ifld-extract-decl): New arg `indent', all
3691 (<multi-ifield,gen-ifld-extract-decl): Ditto.
3692 (-gen-ifld-extract-base): Call rtl-c instead of rtl-c-with-alist.
3693 (-gen-ifld-extract-beyond): Ditto.
3694 (<multi-ifield>,gen-ifld-extract): Ditto.
3695 (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
3696 rtl evaluation code.
3697 (op:read): Build an <eval-state> to pass to gen-read.
3698 (op:write): Build an <eval-state> to pass to gen-write.
3699 (op:record-profile): Build an <eval-state> to pass to
3701 * sim-cpu.scm (gen-semantic-code): Rewrite.
3702 * sim.scm (-gen-ifld-extract-base): Call rtl-c instead of
3704 (-gen-ifld-extract-beyond): Ditto.
3705 (<multi-ifield>,gen-ifld-extract): Ditto.
3706 (<hw-register>,gen-get-macro,gen-set-macro): Ditto.
3707 (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
3708 rtl evaluation code.
3709 (op:read): Build an <eval-state> to pass to gen-read.
3710 (op:write): Build an <eval-state> to pass to gen-write.
3711 (op:record-profile): Build an <eval-state> to pass to
3714 * operand.scm (<operand>): Give `selector' default value of #f.
3715 Give `num' default value of -1. Give `cond?' default value of #f.
3716 (op:new-mode): Delete arg `set?', all uses updated.
3718 * read.scm (reader-error): Handle #f return from port-filename.
3719 (-init-parse-cpu!): Call rtl-c-init!.
3720 (reader-install-builtin!): Call rtl-builtin!.
3722 * rtl-c.scm: New file.
3723 * semantics.scm: New file.
3724 * read.scm: Load them.
3725 * rtl.scm: C generation moved to rtl-c.scm. Semantic analysis moved
3727 (<rtx-func>): Delete members syntax?,macro,c,expr. New members
3729 (rtx-lookup): Renamed from -rtx-func-lookup. All callers updated.
3730 (-rtx-num-text,-rtx-max-num): New globals.
3731 (def-rtx-operand-node,define-rtx-operand-node): New procs.
3732 (-rtx-macro-lookup): New proc.
3733 (rtx-lvalue-mode-name): Renamed from rtx-expr-mode-name.
3734 (rtx-env-stack-empty?,rtx-env-stack-head): New procs.
3735 (rtx-env-var-list,rtx-env-empty-stack,rtx-env-init-stack1): New procs.
3736 (rtx-env-make,rtx-env-empty?,rtx-env-make-locals): New procs.
3737 (rtx-env-push,rtx-temp-lookup,-rtx-closure-make): New procs.
3738 (rtx-make,rtx-kind?,rtx-const?,rtx-const-value,rtx-symbol-name,
3739 rtx-operand?,rtx-operand-obj,rtx-local?,rtx-local-obj, rtx-xop-obj,
3740 rtx-index-of-value,rtx-if-mode,rtx-if-test,rtx-if-then,rtx-if-else,
3741 rtx-eq-attr-owner,rtx-eq-attr-attr,rtx-eq-attr-value): New procs.
3742 (rtx-pretty-name): New proc.
3743 (-rtx-traverser-table,-rtx-make-traverse-table): New procs.
3744 (rtx-traverse-*): Rewrite rtx traversing.
3745 (rtx-eval-*): Rewrite rtx evaluation.
3746 (rtx-compile): New proc.
3747 (rtx-simplify): New proc.
3748 (rtx-simply-eq-attr-mach,rtx-simplify-eq-attr-insn): New procs.
3749 * rtx-funcs.scm: C generation moved to rtl-c.scm.
3750 (ifield,index-of): Rewrite.
3751 (name): Renamed from `operand:'.
3752 (operand,xop,local): New rtx's.
3753 (current-insn): Rewrite.
3754 * Makefile.am (CGEN_HOB_INPUT_FILES): Add rtl-c.scm, semantics.scm.
3755 (cgen-hob.h): Remove rule for.
3756 (cgen-hob.o): Depend on cgen-hob.c only.
3757 * Makefile.in: Rebuild.
3759 * utils-cgen.scm (vmake): New proc.
3760 (<context>): New class.
3761 (context-make-prefix,context-error): New procs.
3763 Fri Apr 9 19:26:28 1999 Jim Wilson <wilson@cygnus.com>
3765 * i960.cpu: Add some ??? comments.
3766 (xnor, ornot): New instructions.
3767 (*): Delete obsolete COND-CTI and UNCOND-CTI attributes.
3769 1999-04-08 Doug Evans <devans@casey.cygnus.com>
3771 * cos.scm (-object-error): Print better error message.
3773 * pmacros.scm (-pmacro-env-make): Renamed from -env-make.
3774 (-pmacro-env-ref): Renamed from -env-ref.
3776 1999-03-31 Doug Evans <devans@casey.cygnus.com>
3778 * hardware.scm (<hw-pc>,parse!): Allow get/set specs.
3780 (hardware-builtin!): Delete h-pc builtin.
3781 * arm.cpu (h-pc): Define.
3782 (h-gr): Delete get,set specs. Make array of 16 regs again.
3783 * arm7.cpu (set-logical-cc-maybe): Delete.
3784 (set-zn-flags,set-add-flags,set-sub-flags): New macros.
3785 (data processing insns): Rewrite.
3786 * m32r.cpu (h-pc): Define.
3787 * fr30.cpu (h-pc): Define.
3788 * i960.cpu (h-pc): Define.
3789 * sparc.cpu (h-pc): Define.
3791 * rtl.scm (-rtx-traverse-operands): Add some error checking to LOCALS.
3792 (s-parallel): Replace do {...} while (0) with {...}.
3793 (s-sequence): Ditto.
3795 * sid-cpu.scm (gen-parallel-exec-type): Make type of `written'
3797 (-gen-write-case,-gen-sem-case): Ditto.
3798 (-gen-sem-case): Only specify `written' if profiling or
3799 parallel-write-back.
3800 (-gen-scache-semantic-fn,-gen-all-semantic-fns): Put procs back in.
3801 (-gen-sem-switch-fn): New proc.
3802 (cgen-semantics.cxx): Emit either semantic fns or semantic switch
3803 based on with-sem-switch option.
3804 * sid-decode.scm (-gen-decode-insn-globals): Only define
3805 idesc_table_initialized_p if with-sem-switch. Record semantic fn
3806 addresses in idesc_table if !with-sem-switch.
3807 (-gen-sem-fn-decls): Rewrite.
3808 (-gen-idesc-decls): Define @cpu@_sem_fn type. Define `execute'
3809 member based on with-sem-switch. Only define
3810 `idesc_table_initialized_p' member if with-sem-switch.
3811 (cgen-decode.h): If !with-sem-switch, declare semantic fns.
3812 * sid.scm (-with-sem-switch?): New variable.
3813 (option-init!): Initialize it.
3814 (option-set!): Set it.
3815 (with-sem-switch?): New proc.
3816 (-op-gen-set-trace): Only emit `written' reference if profiling.
3817 (sim-finish!): Use h_pc_set to set pc.
3819 1999-03-30 Doug Evans <devans@casey.cygnus.com>
3821 * sparccom.cpu (arith-cc-binop): New args s32-set-flags,s64-set-flags.
3822 All callers updated.
3823 (arith-carry-cc-binop): New arg set-flags. All callers updated.
3825 * sid.scm (gen-argbuf-type): Delete.
3826 (-gen-argbuf-fields-union): Move to ...
3827 * sid-decode.scm: ... here.
3829 * read.scm (-reader-process-expanded-1): New proc.
3830 (-reader-process-expanded): Call it to catch nested begin's.
3831 (reader-process): Move `begin' handling to -reader-process-expanded.
3833 * insn.scm (-insn-read): Fix name of `format' spec.
3835 * pmacros.scm (.pmacro): New builtin.
3836 (scan-symbol): If procedure macro, return macro rather than its symbol.
3837 (check-macro): Don't do lookup, instead check if (car expr) is
3839 (scan-list): Handle .pmacro.
3840 (scan): No longer re-examine text for another macro invocation.
3841 (-pmacro-build-lambda): New proc.
3842 (define-pmacro): Rewrite. If defining one pmacro to be an alias of
3843 another, fetch the other's value (rather than doing it during
3846 1999-03-27 Doug Evans <devans@casey.cygnus.com>
3848 * Makefile.am (CGEN_HOB_INPUT_FILES): Add decode.scm.
3849 * Makefile.in: Rebuild.
3851 * decode.scm (decode-get-best-bits): Use memq instead of element?.
3852 (-fill-slot!): Simplify.
3853 (-build-slots): Simplify.
3855 * dev.scm (load-sid): Don't load sid-arch.scm.
3857 * sid-decode.scm: Replace computed goto decoder/extractor with plain
3859 * sim-decode.scm: Replace computed goto decoder/extractor with plain
3862 1999-03-26 Doug Evans <devans@casey.cygnus.com>
3864 * sim-decode.scm: Clean up pass. Move decoder computation into ...
3865 * decode.scm: ... here. New file.
3866 * sid-decode.scm: Use decoder computation code in decode.scm.
3867 * read.scm: Load decode.scm.
3869 * arm.cpu (arm710 model): Add u-exec function unit.
3870 (h-gr): Delete CACHE-ADDR for now. Make array of 15, not 16 regs.
3871 Add get/set specs to redirect reg 15 to h-pc.
3872 (h-*): Indicate for both ARM and THUMB isas.
3873 (cbit,nbit,vbit,zbit): Ditto.
3874 (h-ibit,h-fbit,h-tbit,h-mbits): New hardware elements.
3875 (h-cpsr): Make virtual. Add get/set specs.
3876 (h-spsr-fiq,h-spsr-svc,h-spsr-abt,h-spsr-irq,h-spsr-und): New hw.
3877 (h-spsr): New virtual reg.
3878 * arm7.cpu (shift-type): New explicitly defined keyword.
3879 (h-operand2-shifttype): Use it.
3880 (set-logical-cc-maybe): Delete carry-out arg. New args arg1,arg2.
3881 All callers updated. Don't set cbit.
3882 (logical-op): Add rm to ifield list. Change case to case:. Use
3883 shift-type enum as case choices. Set cbit.
3884 (and,orr,eor,add-imm): Uncomment out.
3885 (undefined): Temporarily comment out.
3886 * thumb.scm (mov,cmp,addi8,subi8,str-sprel,ldr-sprel): s/rd/bit10-rd/.
3887 (lda-pc,lda-sp): Ditto.
3888 (ldr-pc): Rename from ldr.
3889 (cbranch): Mark insns as being thumb insns.
3891 * attr.scm (<bitset-attribute>,parse-value): Recognize strings.
3893 * cgen-sid.scm: Don't load sid-arch.scm.
3894 (sim-arguments): Delete unused entries.
3895 * sid-arch.scm: Delete.
3897 * insn.scm (<insn>,iflds): Renamed from flds. All uses updated.
3898 (<insn>,ifld-assertions): New member.
3899 (<insn>,make!): New arg ifld-assertions, all callers updated.
3900 (<insn> accessors): Change insn:foo to insn-foo. All callers updated.
3901 (insn:fields): Delete.
3902 (-insn-parse): New arg ifld-assertions. All callers updated.
3903 (-insn-read,define-insn): New procs.
3904 (define-full-insn): New arg ifld-assertions. All callers updated.
3905 (insn-init!): New comment define-insn.
3907 * model.scm (-model-parse): Ensure at least one unit specified.
3909 * rtl.scm (-rtx-traverse-operands): Recognize environments.
3910 (<c-expr-temp>,get-name): New method.
3911 (-rtx-make-current-closure,s-closure): New proc.
3912 (hw:): Wrap rtx indices in a closure.
3913 (-gen-case-prefix): New proc.
3915 * rtx-funcs.scm (case:): Fix call to s-case.
3916 (closure): New rtx func.
3918 * hardware.scm (<hardware-base>): New member isas-cache.
3919 (<hardware-base>,get-isas): New method.
3920 (hardware-builtin): Indicate for all isas.
3921 * ifield.scm (-ifield-parse): Only keep if isa+mach are kept.
3922 * mach.scm (current-arch-mach-name-list): Return list of names.
3923 (current-isa-mach-name-list): Ditto.
3924 (define-arch): Install builtin objects here.
3925 * read.scm (keep-atlist?): Only keep if both mach and isa are
3927 (keep-mach-atlist?): New proc.
3928 (keep-isa-multiple?,current-keep-isa-name-list): New proc.
3929 (reader-install-builtin!): Renamed from -install-builtin!.
3930 * sid-cpu.scm (-gen-reg-access-defns): Renamed from
3931 -gen-cpu-reg-access-defns. Rewrite.
3932 (gen-reg-access-defn): Delete.
3933 (-gen-hardware-struct): New proc.
3934 (-gen-hardware-types): Simplify. Add multiple-isa support.
3935 (gen-semantic-fn,-gen-all-semantics): Delete.
3936 (-gen-read-args,-gen-read-case,-gen-read-switch): Delete.
3937 (cgen-cpu.c,cgen-read.c,cgen-sem-switch.c,cgen-mainloop.in): Delete.
3938 (cgen-write.cxx,cgen-semantics.cxx,cgen-decode.cxx): Renamed from *.c.
3939 Call sem-analyze-insns!.
3940 (cgen-semantics.cxx): Add multiple-isa support.
3941 * sid-decode.c (-gen-idesc-decls): Add multiple-isa support.
3942 (-gen-scache-decls,-gen-decode-fn): Ditto.
3943 (cgen-decode.h): Call sem-analyze-insns!.
3944 * sid-model.scm (cgen-model.cxx): Renamed from cgen-model.c.
3945 * sid.scm (-with-multiple-isa?): New variable.
3946 (option-init!): Initialize it.
3947 (option-set!): Set it.
3948 (with-multiple-isa?): New proc.
3949 (gen-cpu-ref): New arg isas. All callers updated.
3950 (gen-cpu-class): New proc.
3951 (*-get-macro,*-set-macro): Delete.
3952 (gen-reg-get-fun-name,gen-reg-set-fun-name): New procs.
3953 (-hw-gen-fun-get): Call gen-reg-get-fun-name.
3954 (-hw-gen-fun-set): Call gen-reg-set-fun-name.
3955 (-gen-hw-index): Call rtx-c instead of rtx-c-with-temps for rtxs.
3956 (-sim-insns-analyzed): New global variable.
3957 (sim-init!): Reset it.
3958 (sim-analyze-insns!): New proc.
3959 (sim-analyze!): Don't do instruction analysis here.
3960 (sim-finish!): Specify isa of x-invalid insn.
3961 * sim.scm (sim-finish!): Specify isa of added x-* virtual insns.
3963 1999-03-22 Doug Evans <devans@casey.cygnus.com>
3965 * thumb.cpu (cpu,mach,model): Delete.
3966 (dntf): New pmacro. Use it for all field definitions.
3967 (dntop): New pmacro. Use it for all operand definitions.
3968 (asr): Correct field list.
3969 (add,addi,sub,subi,add-sp,add-sp-neg): Ditto.
3971 * utils-cgen.scm (define-getters): New macro to simplify
3972 writing class accessors.
3973 (define-setters): Ditto.
3974 (sanitize): Recognize isa elements.
3976 * sid-cpu.scm (*): Replace cpu:parallel-exec? call with
3977 state-parallel-exec?.
3978 * sid-model.scm (*): Ditto.
3979 * sid-decode.scm (*): Ditto. Replace cpu:decode-assist with
3980 state-decode-assist.
3982 * sid-decode.scm (decode-bits): Replace list-reverse! with reverse!.
3983 (-gen-decode-switch): Rewrite to not generate deeply nested lists.
3984 * sim-decode.scm (-gen-decode-switch): Ditto.
3986 * sim-arch.scm (-regs-for-access-fns): Delete.
3987 (-biggest-reg-mode,-gen-arch-reg-access-decls): Delete.
3988 (-gen-arch-reg-access-defns): Delete.
3990 * sim-cpu.scm (*): Replace cpu:liw-insns with state-liw-insns,
3991 cpu:parallel-insns with state-parallel-insns, cpu:parallel-exec?
3992 with state-parallel=exec?.
3993 (cgen-*): Call sim-analyze-insns! here.
3994 * sim-decode.scm (cgen-*): Ditto.
3995 * sim-model.scm (cgen-*): Ditto.
3996 * sim.scm (-sim-insns-analyzed): New global variable.
3997 (sim-init!): Reset it.
3998 (sim-analyze-insns!): Renamed from sim-analyze!. Keep track if we've
3999 already done the analysis.
4001 * sim-model.scm (-gen-mach-defns): Add mach attribute number to
4004 * arm.cpu: Only include arm7.cpu,thumb.cpu if necessary.
4005 (arm arch): Update isa spec.
4006 (arm,thumb isas): Define.
4007 (arm7 cpu): default-insn-bitsize,base-insn-bitsize moved to isas.
4008 (arm7tdmi mach): Add isa spec.
4009 * arm7.cpu (*): Replace subreg: with subword:. Remove unnecessary
4010 `const' on word number.
4011 * fr30.cpu (fr30 arch): Update isa spec.
4013 (fr30bf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
4015 * i960.cpu (i960 arch): Update isa spec.
4017 (i960base cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
4018 liw-insns,parallel-insns moved to isas spec.
4019 * m32r.cpu (m32r arch): Update isas spec.
4021 (m32rbf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
4022 liw-insns,parallel-insns moved to isa spec.
4023 * sparc.cpu (sparc arch): Update isas spec.
4024 (sparc isa): Define.
4025 * sparc32.cpu (sparc32 cpu): default-insn-bitsize,base-insn-bitsize,
4026 decode-assist moved to isa spec.
4027 * sparc64.cpu (sparc64 cpu): Ditto.
4028 * sparccom.cpu (trap insns): Correct mode of result of c-call:.
4029 * desc-cpu.scm (-gen-isa-table-defns): New proc.
4030 (-gen-mach-table-defns): Output mach table.
4031 (-gen-hash-defines): Delete insn size macros, except for
4033 (-cgen-cpu-open): Rewrite cpu_open handling. Take stdarg list of args.
4034 (cgen-desc.h): Define MAX_ISAS.
4035 (cgen-desc.c): Include stdarg.h. Call -gen-isa-table-defns.
4036 * mach.scm (<arch>): Rename arch-data to data. New member isa-list.
4037 (arch-* accessors): Renamed from arch:*. All callers updated.
4038 (current-arch-isa-name-list): New proc.
4039 (-arch-parse-isas): Renamed from -arch-parse-isa.
4040 (def-isa-attr!): Rewrite.
4041 (<iframe>): New class.
4042 (<itype>): New class.
4044 (isa-min-insn-bitsize,isa-max-insn-bitsize): New procs.
4045 (isa-integral-insn?,isa-parallel-exec?): New procs.
4046 (-isa-parse,-isa-read,define-isa): New proc.
4047 (<cpu>): Members default-insn-bitsize,base-insn-bitsize,decode-assist,
4048 liw-insns moved to <isa>.
4049 (cpu-* accessors): Renamed from cpu:*. All callers updated.
4050 (-cpu-parse,-cpu-read): Update.
4051 (state-*): Renamed from state:*. All callers updated.
4052 (state-default-insn-bitsize,state-base-insn-bitsize): Use isa spec,
4054 (state-parallel-insns,state-parallel-exec?,state-liw-insns): New procs.
4055 (state-decode-assist): New proc.
4056 (<derived-arch-data>): Delete min-insn-bitsize,max-insn-bitsize.
4057 (-adata-set-derived!): Rewrite.
4058 (adata-integral-insn?): Renamed from adata:integral-insn?. All
4060 (arch-init!): Add define-isa command.
4061 * read.scm (<reader>): Default keep-isa member to (all).
4062 (reader-* accessors): Renamed from reader:*. All callers updated.
4063 (-keep-isa-set!): Call string->symbol on isa name list.
4064 (keep-isa-validate!): Rewrite.
4065 (current-isa): New proc.
4066 (keep-isa?): Recognize "all".
4067 (-init-parse-cpu!): New arg keep-isa. All callers updated.
4068 Call -keep-isa-set!.
4069 (cmd-if): Recognize keep-isa?.
4070 (cpu-load): New arg keep-isa. All callers updated.
4071 (-opt-spec-update): New proc.
4072 (common-arguments): First arg is string, not symbol.
4073 (-cgen): Call -opt-spec-update. Rewrite argument parsing.
4075 * rtl.scm (rtx-get): Default mode of string arg is INT.
4077 * rtl.scm (s-subword): Renamed from s-subreg. All uses updated.
4079 * rtx-funcs.scm (join:): Pass cpu to handler.
4081 * configure.in (guile_include_dir): Delete.
4082 * configure: Rebuild.
4083 * Makefile.in: Rebuild.
4084 * doc/Makefile.in: Rebuild.
4086 * sid-cpu.scm (-extract-chunk-specs): New proc.
4087 (gen-define-fields): Use it.
4088 (-extract-chunk): New proc.
4089 (-gen-extract-beyond-var-list): Use it.
4090 (gen-extract-fields): Simplify.
4092 1999-03-22 Ben Elliston <bje@cygnus.com>
4094 * arm7.cpu (ldri-p): New instruction.
4095 (swi): Do not vector through 0x8 yet--there is nothing there.
4098 (all): Use (const x) in subreg expressions.
4100 1999-03-19 Ben Elliston <bje@cygnus.com>
4102 * arm7.cpu (smull): Use operand field `rs', not `mul-rn'. Thinko.
4105 1999-03-17 Doug Evans <devans@casey.cygnus.com>
4107 * fr30.cpu (define-arch): Specify "forced" default-alignment.
4108 * mach.scm (-parse-alignment): Recognize "forced" alignment.
4109 * sim-cpu.scm (-extract-chunk-specs): New proc.
4110 (gen-define-fields): Use it.
4111 (-extract-chunk): New proc.
4112 (-gen-extract-beyond-var-list): Use it.
4113 (gen-extract-fields): Simplify.
4115 Port to guile 1.3.1.
4116 * Makefile.am (GUILEINCDIR,GUILELDFLAGS,GUILELDADD): Delete.
4117 (LIBIBERTY): New var.
4118 (HOB_OBJS): Add cgen-gh.o.
4119 (hobbit): Delete $(CFLAGS) from link, add $(LIBS) $(LIBIBERTY).
4120 * Makefile.in: Rebuild.
4121 * acconfig.h: Add HAVE_3_ARG_SCM_MAKE_VECTOR.
4122 * config.in: Rebuild.
4123 * configure.in: Add checks for libdl, libreadline, libnsl, libsocket,
4124 libncurses, libtermcap.
4125 Add checks for needed functions in guile 1.2 not in guile 1.3,
4126 and vice versa. Add test for 3 argument scm_make_vector.
4127 * configure: Rebuild.
4128 * cgen-gh.c (scm_list_length,scm_list_append,scm_list_reverse): Provide
4129 definitions if guile doesn't have them.
4130 (gh_make_vector,gh_length,gh_vector_set_x,gh_vector_ref):
4131 (cgh_vector): Replace gh_vector with gh_make_vector. Replace gh_vset
4132 with gh_vector_set_x.
4133 (cgh_qsort): Replace gh_list_length with gh_length.
4134 * cgen-gh.h: Add decls for added functions.
4135 (cgh_qsort): Don't declare if IN_HOBBIT.
4136 * cos.c: Include config.h. Replace gh_vref with gh_vector_ref,
4137 gh_vset with gh_vector_set_x, gh_list_length with gh_length,
4138 scm_make_vector with gh_make_vector.
4139 * cos.scm: Use vector-length instead of length on vectors.
4140 * dev.scm (cload): Make varargs proc with keyword/value args.
4141 * hobscmif.h: Include config.h, cgen-gh.h. Undef make_vector and
4142 provide version that works with guile 1.2 or 1.3.
4143 Include private copy of scmhob.h.
4144 * scmhob.h: New file. Keep our own copy for now.
4146 Tue Mar 16 13:22:01 1999 Doug Evans <devans@canuck.cygnus.com>
4148 * rtl.scm (-rtx-traverse-error): Ensure expression is output in
4150 (-rtx-traverse-operands): Dump cx temp stack if debugging.
4151 (-cx-temp-dump-stack): Pretty up output.
4153 * arm.cpu: comment out thumb.cpu until isa support ready.
4154 * arm7.cpu (bl): Replace lr with (reg h-gr 14).
4155 (f-imm12,f-offset24,swi,undef): Fix thinko, add `const'.
4156 * thumb.cpu (h-gr-t,h-lr-t,h-sp-t,dnti,h-hiregs): s/MACH/ISA/.
4158 * sid-decode.scm (cgen-decode.c): Call rtl-gen-init!.
4160 1999-03-11 Doug Evans <devans@casey.cygnus.com>
4162 * hardware.scm (<hw-immediate>,mode-ok?): Ensure result is boolean.
4163 (<hw-address>,mode-ok?): unsigned/signed are compatible.
4165 * operand (op:new-mode): Improve error message.
4167 * arm.cpu: Move arm isa into arm7.cpu. Include arm7.cpu, thumb.cpu.
4168 * arm7.cpu: New file.
4170 1999-03-12 Ben Elliston <bje@cygnus.com>
4172 * arm.cpu: Lots of minor fixes after desk checking.
4174 1999-03-11 Doug Evans <devans@casey.cygnus.com>
4176 * thumb.cpu: snapshot of current work
4178 * rtl.scm (rtx-get): Tweak error message.
4180 1999-03-10 Doug Evans <devans@casey.cygnus.com>
4182 * Makefile.am (cos.o,cgen.o,cgen-gh.o): Fix dependencies.
4183 * Makefile.in: Rebuild.
4185 * cos.c (cos_vector_copy): New function.
4186 (_object_copy): Use it.
4188 * mode.scm (mode:eq?): Clean up.
4189 * rtl.scm (cx-new-mode): Copy attributes.
4190 (rtx-get): Don't make copy if <c-expr> with identical mode.
4192 * fr30.cpu (define-arch): Delete default-insn-word-bitsize,
4194 (gr-names): h-gr register names moved here.
4196 (cr-names): h-cr register names moved here.
4198 (dr-names): h-dr register names moved here.
4200 (h-ps): Replace FUN-ACCESS attribute with get/set specs.
4201 (h-sbit,h-ccr,h-scr,h-ilm): Ditto.
4202 * i960.cpu (define-arch): Delete default-insn-word-bitsize,
4204 * m32r.cpu (define-arch): Delete default-insn-word-bitsize,
4206 (gr-names): h-gr register names moved here.
4208 (cr-names): h-cr register names moved here.
4210 (h-accum): Replace FUN-ACCESS attribute with get/set specs.
4211 (h-accums,h-psw): Ditto.
4212 * sparc.cpu (define-arch): Delete default-insn-word-bitsize,
4214 (gr-names): h-gr register names moved here.
4215 (h-gr-indices): Delete.
4216 (sparc32 h-gr): Update. Replace FUN-ACCESS with get/set specs.
4217 (sparc64 h-gr): Ditto.
4218 (h-y): Add get/set specs.
4220 (fp operands): Rewrite.
4221 * sparc32.cpu (h-psr): Replace FUN-ACCESS with get/set specs.
4222 (h-tbr,h-cwp,h-wim): Ditto.
4223 * sparc64.cpu (h-fpsr): Add get/set specs.
4224 * sparccom.cpu (ldd-reg+reg): Load value all at once.
4225 (fp-ld-op): New arg `dest', all callers updated.
4226 (*): Replace `make-di' with `join'.
4228 * sid-cpu.scm (-gen-cpu-reg-access-defns): Use get/set specs if
4230 (gen-semantic-code): Save/restore rtl generator state.
4231 (cgen-cpu.h): Call rtl-gen-init!.
4232 * sid.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
4233 (-gen-ifld-extract-beyond): Ditto.
4234 (<multi-ifield>,gen-ifld-extract): Ditto.
4235 (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
4237 (-hw-gen-set-quiet-pc): Ditto.
4238 (<hw-pc>,gen-write): Ditto.
4239 (-hw-cxmake-get): Ditto. Call getter function if present.
4240 (<hw-register>,cxmake-get-raw): New method.
4241 (<hw-register>,gen-set-quiet-raw): New method.
4242 (-hw-gen-set-quiet): New arg `gstate'.
4243 (hw-fun-access?): Delete.
4244 (gen-reg-access-defn): Output function contents.
4245 (-gen-hw-index-raw): Update call to rtx-c. Update cxmake-get
4247 (-gen-hw-index): Ditto.
4248 (op:read): Update gen-read invocation.
4249 (op:write): Update gen-write invocation.
4250 (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Handle raw-reg
4252 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
4253 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
4254 (<unit>,gen-profile-code): Update to sim.scm version.
4256 * sim-arch.scm (-regs-for-access-fns): New proc.
4257 (-biggest-reg-mode): New proc.
4258 (-gen-arch-reg-access-decls,-gen-arch-reg-access-defns): Rewrite.
4259 * sim-cpu.scm (-gen-hardware-types): Output get/set handlers for
4260 virtual regs separately.
4261 (-gen-cpu-reg-access-defns): Replace fun-access? with new
4263 (gen-semantic-code): Save/restore rtl generator state.
4264 (cgen-cpu.h): Call rtl-gen-init!.
4265 (cgen-cpu.c): Ditto. #include cgen-ops.h.
4266 * sim-model.scm: mach:cpu renamed to mach-cpu. mach:bfd-name
4267 renamed to mach-bfd-name.
4268 * sim.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
4269 (-gen-ifld-extract-beyond): Ditto.
4270 (<multi-ifield>,gen-ifld-extract): Ditto.
4271 (<scalar>,gen-sym-get-macro): Update call to gen-get-macro.
4272 (<scalar>,gen-sym-set-macro): Update call to gen-set-macro.
4273 (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
4275 (hw-fun-access?): Delete.
4276 (-hw-gen-set-quiet-pc): New arg `gstate'.
4277 (<hw-register>,gen-get-macro): Rewrite.
4278 (<hw-register>,gen-set-macro): Rewrite.
4279 (-hw-gen-fun-get,-hw-gen-fun-set): Delete.
4280 (-hw-cxmake-get): New arg `gstate'. Rewrite.
4281 (<hw-register>,cxmake-get-raw): New method.
4282 (-hw-gen-set-quiet): New arg `gstate'. Rewrite.
4283 (<hw-register>,gen-set-quiet-raw): New method.
4284 (-gen-hw-index-raw): Update call to rtx-c. Update cxmake-get
4286 (-gen-hw-index): Ditto.
4287 (<hw-index>): New arg `gstate'.
4288 (-gen-hw-selector): Update call to rtx-c.
4289 (<pc>): New arg `gstate'.
4290 (op:read): Update gen-read invocation.
4291 (op:write): Update gen-write invocation.
4292 (<operand>,cxmake-get): Handle raw-reg.
4293 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
4294 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
4295 (<operand>,gen-set-quiet): Handle raw-reg.
4296 (<operand>,gen-set-trace): Handle raw-reg.
4297 (-gen-mach-data): mach:cpu renamed to mach-cpu.
4299 * desc-cpu.scm (gen-operand-decls): Take nub of operands for
4300 cgen_operand_type enum.
4301 (gen-operand-table): Add operand type enum. Replace pointer to
4302 hardware element with its enum. Null terminate table.
4303 (-gen-cpu-open): Add new `isa' argument to @arch@_cgen_cpu_open.
4304 Build operand table.
4305 * ifield.scm (-ifield-parse): Recognize ISA attribute.
4306 * mach.scm (<arch-data>): New member `isas'.
4307 (adata-isas): New accessor.
4309 (isa-default-insn-word-bitsize): New accessor.
4310 (isa-enum): New proc.
4311 (current-arch-default-insn-word-bitsize): Delete.
4312 (current-isa-list,current-isa-lookup): New procs.
4313 (-arch-parse-isa): New proc.
4314 (-arch-parse): Rewrite.
4315 (-arch-read): Recognize `isas'. Delete `default-insn-word-bitsize'.
4316 (define-arch): Define ISA attribute.
4317 (def-isa-attr!,isa-supports?): New procs.
4318 (<mach>): New member `isas'.
4319 (mach-isas): New accessor.
4320 (-mach-parse): New arg `isas', all callers updated.
4321 (-mach-read): Recognize `isas'.
4322 (arch-finish!): Rewrite.
4323 * opc-ibld.scm (-gen-fget-switch): Add `cd' arg to
4324 @arch@_cgen_get_{int,vma}_operand.
4325 (-gen-fset-switch): Add `cd' arg to @arch@_cgen_set_{int,vma}_operand.
4326 * opc-opinst.scm (-gen-operand-instance): Output operand enum instead
4327 of pointer to table entry.
4328 * opcodes.scm (gen-switch): Handle multiply defined operands.
4329 * operand.scm (op-sort): New proc.
4331 * hardware.scm (<hardware-base>): Rename getters/setters to get/set.
4332 (hw-getter,hw-setter): Renamed from hw-getters,hw-setter.
4333 (hw-enum): Accept symbol argument.
4334 (hardware-builtin!): Delete attribute FUN-ACCESS.
4335 * ifield.scm (ifld-encode-mode,ifld-decode-mode): New procs.
4337 * attr.scm (atlist-source-form): New proc.
4338 (attr-builtin!): New attr `PRIVATE'.
4339 * desc.scm (<keyword>,gen-defn): Make keyword entry table static.
4340 * desc-cpu.scm (-gen-hw-defn): Only output index and value tables
4341 if they have `PRIVATE' attribute.
4342 (gen-hw-table-defns): Output definitions of explicitly defined
4344 * hardware.scm (<keyword>): New member print-name. Rename member
4345 `value' to `values', all uses updated.
4346 (kw-mode,kw-print-name,kw-prefix,kw-values): New procs.
4347 (keyword-parse): Rewrite.
4348 (-keyword-read): New proc.
4349 (define-keyword): New proc.
4350 (-hw-parse-keyword): New proc.
4351 (-hw-parse-indices): Rewrite keyword handling, support new index spec
4353 (-hw-parse-values): Ditto.
4354 (-hw-parse-get,-hw-parse-set): Rewrite.
4355 (hardware-init!): Add new comment define-keyword.
4356 * mach.scm (<arch>): New member `kw-list'.
4357 (arch:kw-list,arch_set-kw-list!): New accessors.
4358 (current-kw-list,current-kw-add!,current-kw-lookup): New procs.
4360 * hardware.scm (<hw-register>,mode-ok?): Rewrite.
4361 * mode.scm (mode-class-integral?): New proc.
4362 (mode-class-float?,mode-class-numeric?): New procs.
4363 (mode-integral?,mode-float?,mode-numeric?): New procs.
4364 (mode-compatible?): New proc.
4365 * opcodes.scm (<ifield>,gen-insert): Update alist arg to
4367 (<ifield>,gen-extract): Ditto.
4368 * rtl.scm (-rtl-simulator?,-rtx-current-obj): Delete.
4369 (<gstate>): New class.
4370 (gstate-simulator?,gstate-set-simulator?!): New accessors.
4371 (gstate-context,gstate-set-context!): New accessors.
4372 (gstate-macro?,gstate-set-macro?!): New accessors.
4373 (gstate-make,gstate-copy): New procs.
4374 (-rtl-current-gstate): New global.
4375 (current-gstate-simulator?): New proc.
4376 (current-gstate-context,current-gstate-macro?): New procs.
4377 (current-gstate,current-gstate-set!): New procs.
4378 (rtl-gen-init!): Rewrite.
4379 (-rtx-valid-types): Add INTMODE, FLOATMODE, NUMMODE.
4380 (tstate-make): New arg `gstate', all callers updated.
4381 (tstate-set-expr-fn!,tstate-set-op-fn!): New accessors.
4382 (tstate-set-cond?!,tstate-set?,tstate-set-set?!): New accessors.
4383 (tstate-gstate,tstate-set-gstate!): New accessors.
4384 (tstate-copy): New proc.
4385 (tstate-new-cond?,tstate-new-set?): Rewrite.
4386 (-rtx-traverse-operands): Handle INTMODE, FLOATMODE, NUMMODE.
4387 (rtx-traverse): New arg `gstate', all callers updated.
4388 (rtx-strdump): New proc.
4389 (-simplify-for-compilation): New arg `gstate', all callers updated.
4390 (semantic-in-out-operands): Ditto.
4391 (semantic-attrs): Ditto.
4392 (rtx-eval): Rewrite. New arg `gstate', all callers updated.
4393 (rtx-eval-with-temps,rtx-eval-with-alist): Ditto.
4394 (rtx-value): Rewrite.
4395 (<c-expr>,gen-name): New method.
4396 (<c-expr>,gen-set-quiet): New arg `gstate', all callers updated.
4397 (<c-expr>,gen-set-trace): New arg `gstate', all callers updated.
4398 (cx-new-mode): New proc.
4399 (-rtx-c-with-tstate): New proc.
4400 (rtx-c,rtx-c-with-temps,rtx-c-with-alist): New arg `gstate', all
4402 (-rtx-mode): Rewrite.
4403 (-rtx-mode-compatible?): New proc.
4404 (<c-expr-temp>): New member `value'.
4405 (cx-temp:value): New accessor.
4406 (<c-expr-temp>,make!): Override default method.
4407 (<c-expr-temp>,cxmake-get): Rewrite.
4408 (<c-expr-temp>,gen-set-quiet): Rewrite.
4409 (<c-expr-temp>,gen-set-trace): Rewrite.
4410 (gen-temp-defs): Use cx-temp:value.
4411 (record-temp!): New arg value, all callers updated.
4412 (cx-temp:cx:make): Delete.
4413 (-cx-temp-dump-stack): New proc.
4414 (rtx-get): New arg `gstate', all callers updated. Do mode
4415 compatibility checks. Ensure result has specified mode.
4416 (rtx-set-quiet): New arg `gstate', all callers updated.
4417 (rtx-set-trace): Ditto.
4418 (s-c-call): New arg `tstate', all callers updated.
4419 (s-c-raw-call): Ditto.
4420 (s-unop,s-binop,s-binop-with-with,s-shop,s-boolifop,s-convop): Ditto.
4421 (s-cmpop,s-if,e-if): Ditto.
4422 (s-subreg): New proc.
4423 (-par-new-temp!): New proc.
4424 (-par-next-temp!): Rewrite.
4425 (-par-replace-set-dests): Use -par-new-temp!.
4426 (s-parallel): Rewrite temp handling. Use -rtx-c-with-state.
4427 (s-sequence): Use -rtx-c-with-state.
4428 * rtx-funcs.scm (*): Update.
4429 (raw-reg:): New rtx function.
4431 (join:,subreg:): New rtx functions.
4433 * insn.scm (<insn>): New members pre-cond-trap, condition,
4434 post-cond-trap, compiled-condition.
4436 * insn.scm (syntax-break-out): Replace eval with current-op-lookup.
4438 * opcodes.scm (<pc>,cxmake-get): New arg `selector'.
4440 * utils-cgen.scm (parse-symbol): New proc.
4441 (parse-string): New proc.
4442 (gen-get-macro,gen-set-macro): New arg `index-args'.
4443 (gen-set-macro2): Ditto. Enclose code in do { } while (0).
4444 Prepend \ to newlines.
4446 * utils.scm (alist-remove-duplicates): Delete.
4448 * sid.scm (sim-init!): Delete private debugging code.
4450 1999-03-10 Frank Ch. Eigler <fche@cygnus.com>
4452 * cgen-sid.scm: New file for C++ simulator application.
4453 * sid-arch.scm: Ditto.
4454 * sid-cpu.scm: Ditto.
4455 * sid-decode.scm: Ditto.
4456 * sid-model.scm: Ditto.
4458 * utils-cgen.scm (gen-mach-sid-name): Remove this accident.
4460 1999-03-05 Ben Elliston <bje@cygnus.com>
4462 * arm.cpu: New file.
4464 1999-03-03 Doug Evans <devans@casey.cygnus.com>
4466 * Makefile.am (CGEN_HOB_INPUT_FILES): Add hardware.scm.
4467 * Makefile.in: Rebuild.
4469 * attr.scm (<integer-attribute>,parse-value-def): Tweak.
4470 (-attr-parse): Validate default value.
4472 * read.scm (-CGEN-VERSION): Change to 0.7.1.
4473 (-CGEN-LANG-VERSION): Ditto.
4474 (-keep-all-machs): Renamed from -keep-all, all uses updated.
4475 (<reader>): New member keep-isa plus accessors.
4476 (-keep-isa-set!,keep-isa-validate!): New procs.
4477 (keep-isa?,keep-isa-atlist?,keep-isa-obj?): New procs.
4478 (common-arguments): New variable.
4479 (cgen-usage,getarg,catch-with-backtrace,option-arg): New procs.
4480 (-debug-repl,continue): New procs.
4481 (-cgen,cgen): New procs.
4482 * cgen-gas.scm: Rewrite.
4483 * cgen-opc.scm: Rewrite.
4484 * cgen-sim.scm: Rewrite.
4485 * cgen-stest.scm: Rewrite.
4487 * gas-test.scm (gas-test-init!): Call opcodes-init!.
4488 (gas-test-finish!): Call opcodes-finish!.
4489 (gas-test-analyze!): Call opcodes-analyze!.
4490 (<hw-asm>): New method test-data.
4491 (<operand>,testdata): Rewrite.
4492 * sim-test.scm (sim-test-init!): Call opcodes-init!.
4493 (sim-test-finish!): Call opcodes-finish!.
4494 (sim-test-analyze!): Call opcodes-analyze!.
4495 (<hw-asm>): New method test-data.
4496 (<operand>,testdata): Rewrite.
4498 1999-03-01 Doug Evans <devans@casey.cygnus.com>
4500 * fixup.scm (reverse!): Define if missing.
4501 * *.scm: Use reverse! instead of list-reverse!.
4503 * utils.scm (leading-id-char?): New proc.
4504 (id-char?): Rewrite.
4505 (chars-until-delimiter): New proc.
4506 * opc-itab.scm (extract-syntax-operands): Rewrite.
4507 (strip-mnemonic): Rewrite.
4508 (compute-syntax): Rewrite.
4510 * pmacros.scm (-pmacro-substr): New proc.
4511 (pmacros-init!): Add builtin .substr.
4513 1999-02-26 Doug Evans <devans@casey.cygnus.com>
4515 * thumb.cpu: New file.
4517 1999-02-24 Doug Evans <devans@casey.cygnus.com>
4519 * Makefile.am (CGENCFLAGS): New variable.
4520 (WITH_HOBBIT): Use automake conditional.
4521 (CGEN_HOB_SRC): New variable.
4522 (libcpu_a_SOURCES): Use $(CGEN_HOB_SRC).
4523 (*.o): Compile with CGENCFLAGS.
4524 (cgen-hob.c): Simplify.
4525 (cgen-nohob.c): New rule.
4526 (hobbit): Renamed from hob.x.
4527 (CLEANFILES): Add cgen-nohob.c.
4528 * Makefile.in: Rebuild.
4529 * doc/Makefile.in: Rebuild.
4530 * configure.in (AM_INIT_AUTOMAKE): Update CGEN version to 0.7.1.
4531 (WITH_HOBBIT): Use AM_CONDITIONAL.
4532 * configure: Rebuild.
4533 * aclocal.m4: Rebuild.
4535 * sim-arch.scm (-gen-arch-reg-access-defns): Replace string-map
4536 with string-write-map.
4538 * sim-cpu.scm (hw-need-storage?): New proc.
4539 (-gen-hardware-types): Use it.
4540 (gen-parallel-exec-elm): Call op-save-index?.
4542 * sim-decode.scm (cgen-decode.c): Call rtl-gen-init!.
4544 * sim.scm (-gen-ifld-extract-base): Use mode:class instead of
4546 (-gen-ifld-extract-beyond): Ditto.
4547 (<integer>): Delete all references.
4548 (<sim-hardware>): Delete.
4549 (hw-profilable?): New proc.
4550 (<hardware-base>): New methods gen-get-macro,gen-set-macro.
4551 (<hw-register>): Rename method get-index-mode to save-index?.
4552 (<hw-register>): New methods gen-get-macro,gen-set-macro.
4553 (<hw-register>,gen-sym-decl): Make virtual.
4554 (<hw-memory>,gen-sym-decl): Make virtual.
4555 (<hw-memory>): Rename method get-index-mode to save-index?.
4556 (<hw-address>,gen-sym-decl): Make virtual.
4557 (<operand>): New method save-index?.
4558 (sim-init!): Delete calls to sim-hw-init!,sim-hw-init-parsers!.
4560 * opc-itab.scm (opc-{parse,insert,extract,print}-handlers): opc-
4561 prefix added. All uses updated.
4563 * opc-opinst.scm (-gen-operand-instance): Output hw enum value
4564 rather than pointer to table entry.
4566 * opcodes.scm: Remove all attribute support, lives in desc.scm.
4567 Remove all hw-asm,op-asm support.
4568 (-gen-parse-number,-gen-parse-address): New procs.
4569 (<keyword>,gen-parse): Redo function name computation.
4570 (<keyword>,gen-print): Ditto.
4571 (<operand>,gen-function-name): Rewrite.
4572 (<operand>,gen-fget,gen-fset,gen-parse,gen-print): Ditto.
4573 (opcodes-init!): Delete call to add-parser!.
4575 * desc-cpu.scm (gen-hw-decls): Rename enum hw_type to cgen_hw_type.
4576 Define enum using hardware semantic name.
4577 (-gen-hw-decl,-gen-hw-defn): New procs.
4578 (gen-hw-table-decls): Use -gen-hw-decl.
4579 (gen-hw-table-defns): Use -gen-hw-defn. Rewrite generation of
4580 CGEN_HW_ENTRY structs.
4581 (gen-operand-table): Output hw's enum, not pointer to table entry.
4582 (-gen-cpu-open): Build table of selected hardware elements.
4584 * desc.scm (-hw-asm-specs,-parse-hw-asm): Delete.
4585 (<hardware> support): Delete.
4586 (<hw-asm>): Delete, moved to hardware.scm.
4587 (normal-hw-asm,hw-asm:parse,hw-asm:print): Delete.
4588 (<hw-asm>,gen-table-entry): New method.
4589 (<hw-asm>,parse!): Delete.
4590 (<keyword>,gen-table-entry): New method.
4591 (<keyword>,parse!): Delete.
4592 (<hw-{register,memory,immediate,address}>): Delete forwarding methods
4593 for gen-decl,gen-defn,gen-ref,gen-init.
4594 (desc-init!): Don't create parser for operand asm specs.
4596 * attr.scm (attr-builtin!): Delete UNSIGNED attribute.
4597 * ifield.scm (<ifield>): New member `mode'.
4598 (<ifield>,make!): New arg `mode'.
4599 (ifld-mode): Rewrite.
4600 (ifld-hw-type): Rewrite.
4601 (<ifield>,min-value): Rewrite.
4602 (<ifield>,max-value): Rewrite.
4603 (-ifield-parse): New arg `mode'.
4604 (-ifield-read): Update.
4605 (define-full-ifield): New arg `mode'.
4606 (define-full-multi-ifield): Ditto.
4607 (-multi-ifield-parse): Ditto.
4608 (-multi-ifield-read): Update.
4609 (define-full-multi-ifield): New arg `mode'.
4610 (ifield-builtin!): Update definition of f-nil.
4611 * simplify.inc (define-normal-ifield): Update call to
4613 (define-normal-multi-ifield): Update call to define-full-multi-ifield.
4614 (define-normal-hardware): Delete arg asm. New args indices, values,
4615 handlers. Update call to define-full-hardware.
4616 (define-simple-hardware,dsh): New pmacros.
4617 (define-normal-operand): Update call to define-full-operand.
4618 * fr30.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
4619 Specify INT/UINT mode instead.
4620 (h-gr,h-cr): Use "indices" instead of "asm".
4621 (h-dr,h-ps): Update keyword syntax.
4622 (h-r13,h-r14,h-r15): Ditto.
4623 (h-nbit,h-zbit,h-vbit,h-cbit): Use dsh instead of dnh.
4624 (h-d0bit,h-d1bit,h-ibit,h-sbit,h-tbit,h-ccr,h-scr,h-ilm): Ditto.
4625 (m4): Fix typo on HASH-PREFIX. Use "handlers" instead of "asm".
4626 (reglist_low_ld,reglist_hi_ld,reglist_low_st,reglist_hi_st): Ditto.
4627 * i960.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
4628 Specify INT/UINT mode instead.
4629 (h-gr): Use "indices" instead of "asm".
4630 (h-cc): Update keyword syntax.
4631 * m32r.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
4632 Specify INT/UINT mode instead.
4633 (h-hi16,h-slo16,h-ulo16): Update.
4634 (h-gr,h-cr): Use "indices" instead of "asm".
4635 (h-accum,h-cond,h-psw,h-bpsw,h-bbpsw,h-lock): Use dsh instead of dnh.
4636 (h-accums): Update keyword syntax.
4637 (hash,hi16,slo16,ulo16): Use "indices" instead of "asm".
4638 * sparc.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
4639 Specify INT/UINT mode instead.
4640 (h-gr-indices): New pmacro.
4641 (h-gr32,h-gr64): Split up from h-gr.
4642 (h-a): Update type spec. Use values instead of asm spec.
4643 (h-icc-[cnvz],h-xcc-[cnvz]): Use dsh instead of dnh.
4644 (h-y,h-annul-p): Ditto.
4645 (h-asr): Update keyword spec.
4646 (h-lo10,h-lo13,h-hi22): Update.
4647 (get-freg-spec,set-freg-spec): New pmacros.
4648 (h-fr32,h-fr64): Split up from h-fr.
4649 (rdd): Comment out get/set specs.
4650 (lo10,lo13,hi22): Use "handlers" instead of "asm".
4651 * sparc32.cpu (h-psr): Use dsh instead of dnh.
4652 (h-s,h-ps,h-pil,h-et,h-tbr,h-cwp,h-ag,h-ec,h-ef,h-fsr): Ditto.
4653 * sparc64.cpu (f-*): Delete UNSIGNED attribute. Default is now
4654 UNSIGNED. Specify INT/UINT mode instead.
4655 (h-*): Use dsh instead of dnh where appropriate.
4656 (h-ixcc): Update type spec. Use "values" instead of "asm".
4657 (h-p,h-membarmask): Ditto.
4658 (membarmask): Use "handlers" instead of "asm".
4660 * hardware.scm (<hardware-base>): New member sem-name,type,indices,
4661 values,handlers,getters,setters plus accessors.
4662 (hw-mode-ok?,hw-default-mode): New procs.
4663 (<hardware-base>): Rename method new-mode to mode-ok?
4664 (<hardware-base>): New method get-index-mode.
4665 (hw-index-mode): New proc.
4666 (pc?): Delete, moved to operand.scm.
4667 (address?): New proc.
4668 (<hardware>): Delete.
4669 (<hw-asm>): Definition moved here from desc.scm.
4670 (keyword-parse): New proc.
4671 (hardware-parsers): Delete.
4672 (-parse-hw-type,-parse-hw-asm,-parse-hw-profile): Delete.
4673 (-hw-parse-indices,-hw-parse-values,-hw-parse-handlers): New procs.
4674 (-hw-parse-get,-hw-parse-set): New procs.
4675 (-hw-parse): Delete args aasm,profile,extra. New args semantic-name,
4676 indices,values,handlers,get,set. Rewrite.
4677 (-hw-read-extra): Delete.
4679 (define-hardware): Don't add object if not selected.
4680 (define-full-hardware): Ditto.
4681 (current-hw-sem-lookup,current-hw-sem-lookup-1): New procs.
4682 (<hw-register>): Member `type' moved to baseclass. Delete member
4684 (<hw-register>,parse!): Rewrite.
4685 (<hw-register>): Delete methods get-rank,get-mode.
4686 (<hw-register>): Method new-mode renamed to mode-ok?
4687 (<hw-register>): New method get-index-mode.
4688 (<hw-pc>,parse!): Rewrite.
4689 (<hw-memory>): Member `type' moved to baseclass. Delete member hw-asm.
4690 (<hw-memory>,parse!): Rewrite.
4691 (<hw-memory>): Delete methods get-rank,get-mode.
4692 (<hw-memory>): Method new-mode renamed to mode-ok?
4693 (<hw-memory>): New method get-index-mode.
4694 (<hw-immediate>): Member `type' moved to baseclass. Delete member
4696 (<hw-immediate>,parse!): Rewrite.
4697 (<hw-immediate>): Delete methods get-rank,get-mode.
4698 (<hw-immediate>): Method new-mode renamed to mode-ok?
4699 (<hw-address>): Delete member hw-asm.
4700 (<hw-address>,parse!): Rewrite.
4701 (<hw-address>): Delete methods get-rank,get-mode.
4702 (<hw-address>): Method new-mode renamed to mode-ok?
4703 (hw-profilable?): Delete.
4704 (hardware-init!): Delete hardware-parsers reference.
4705 Update argument specs of command define-full-hardware.
4706 (hardware-builtin!): Update definitions of hardware builtins.
4707 * operand.scm (<operand>): New members hw-name,mode-name.
4708 Delete member op-asm. New member handlers.
4709 (<operand>,make!): Update.
4710 (op:hw-name,op:mode-name,op:handlers): New procs.
4713 (<operand>): New method get-index-mode.
4714 (<pc>,make!): Update.
4715 (op:new-mode): Rewrite.
4716 (operand-parsers): Delete.
4717 (-operand-parse): Rewrite. Return #f if insn not selected.
4718 (-op-read-extra): Delete.
4719 (-operand-read): Update.
4720 (define-operand,define-full-operand): Update.
4721 (operand-init!): Delete operand-parsers reference.
4722 Update syntax of define-full-operand command.
4724 * insn.scm (-insn-parse): Rewrite. Return #f if insn not selected.
4725 (define-full-insn): Update.
4726 * minsn.scm (-minsn-parse): Rewrite. Return #f if insn not selected.
4727 (define-full-minsn): Update.
4729 * mode.scm (<mode>): New member class.
4730 (mode:class): New proc.
4732 (-mode-parse): New arg class.
4733 (define-full-mode): Update.
4734 (mode-find): Rewrite.
4735 (mode-make-int,mode-make-uint): New procs.
4736 (mode-init!): Update syntax of define-full-mode command.
4737 (mode-builtin!): Update definitions of builtin modes.
4739 * model.scm (<profile>): Delete.
4741 * read.scm (keep-atlist?): New proc.
4742 (keep-multiple?): New proc.
4743 (<parser-list>): Delete.
4744 (add-parser!,parse-spec!): Delete.
4746 * rtl.scm (def-rtx-node): Prepend arg *tstate* to all handlers.
4747 (def-rtx-syntax-node): Ditto.
4748 (-rtx-traverse-debug?): New variable.
4749 (tstate-make): New proc.
4750 (tstate-expr-fn,tstate-op-fn,tstate-cond?,tstate-set?): New procs.
4751 (tstate-new-cond?,tstate-new-set?): New procs.
4752 (-rtx-traverse-normal): Delete args cond?,expr-fn,op-fn. New arg
4753 tstate. All callers updated.
4754 (-rtx-traverse-expr,-rtx-traverse-debug): Ditto.
4755 (-rtx-traverse-list,-rtx-traverse-operands): Ditto.
4756 (-build-operand!): Replace arg cond? with tstate.
4757 (-build-reg-operand!,-build-mem-operand!): Ditto.
4758 (-build-index-of-operand!): Update making of <operand> object.
4759 (s-ifield): New arg tstate. All callers updated.
4760 (hw:): New arg tstate. All callers updated. Replace call to
4761 current-hw-lookup with current-hw-sem-lookup-1.
4762 (s-index-of): New arg tstate. All callers updated.
4764 (-rtx-use-sem-fn?): New proc.
4765 (s-unop,s-binop,s-shop): Use it. Only use semantic mode when using
4767 (s-convop): Only use semantic mode when using semantic cover fns.
4768 (s-cmpop): Call -rtx-use-sem-fn?.
4769 (s-cond,s-case): New arg tstate. All callers updated.
4770 (s-parallel,s-sequence): Ditto.
4772 * rtx-funcs.scm (set,set-quiet:): Use SETRTX to mark the set dest.
4774 * types.scm (<scalar>): Rewrite implementation.
4775 (<integer>): Delete.
4776 (parse-type): Rewrite.
4778 * utils-cgen.scm (parse-handlers): New proc.
4780 * utils.scm (!=): New proc.
4782 Tue Feb 23 12:10:29 1999 Doug Evans <devans@canuck.cygnus.com>
4784 * pmacros.scm (-pmacro-expand): Fix typo.
4786 1999-02-12 Doug Evans <devans@casey.cygnus.com>
4788 * pmacros.scm (-pmacro-hex,-pmacro-upcase,-pmacro-downcase): New procs.
4789 (pmacros-init!): Install builtins .hex, .upcase, .downcase.
4790 * i960.cpu (build-hex2): New pmacro.
4791 (insn-opcode): Simplify.
4792 (insn-opcode2): Ditto.
4794 * cgen-sim.scm (catch-with-backtrace): Comment out debugging printf.
4795 * cgen-stest.scm (catch-with-backtrace): Ditto.
4797 1999-02-11 Doug Evans <devans@casey.cygnus.com>
4799 * pmacros.scm (-pmacro-lookup): Renamed from -pmacro-ref.
4800 All callers updated.
4801 (-pmacro-invoke): New proc.
4802 (-pmacro-sym,-pmacro-str): New procs.
4803 (-pmacro-iota,-pmacro-map,-pmacro-apply): New procs.
4804 (pmacros-init!): Install builtins .iota, .map, .apply.
4805 * sparc.cpu (cc-tests): Add CC_NZ,CC_Z,CC_GEU,CC_LU aliases.
4806 (h-fr): Simplify register name spec.
4807 * sparc64.cpu (cond-move-1): New arg mnemonic. All callers updated.
4808 * utils.scm (num-args-ok?): New proc.
4810 1999-02-10 Doug Evans <devans@casey.cygnus.com>
4812 * pmacros.scm (-pmacro-error): New proc.
4813 (-pmacro-expand): Use it.
4814 (-pmacro-splice): New proc.
4815 (pmacros-init!): Install new builtin .splice.
4817 * sparc.cpu: Include sparc64.cpu when appropriate.
4818 (f-mmask,f-simm11): Moved to sparc64.cpu.
4819 (insn-fmt2): Add FLUSH,FLUSHW,IMPDEP1,IMPDEP2,MEMBAR,MOVCC.
4820 (ANNUL attribute): Delete.
4821 (test-* pmacros): New arg cc, all callers updated.
4822 (uncond-br-sem,cond-br-sem): New arg cc, all callers updated.
4823 * sparc32.cpu (atom-op): Moved to sparccom.cpu and renamed to
4825 (ldstub,swap): Moved to sparccom.cpu.
4826 * sparc64.cpu: Add more insns.
4828 1999-02-09 Doug Evans <devans@casey.cygnus.com>
4830 * sim-cpu.scm (cgen-semantics.c): Replace CGEN_INSN_ATTR with
4832 (cgen-sem-switch.c): Ditto.
4833 * sim-decode.scm (-gen-idesc-decls): struct idesc definition
4834 moved to cgen-engine.h.
4835 (-gen-insn-sem-type): Delete, struct insn_sem mvoed to cgen-engine.h.
4836 (-gen-idesc-init-fn,init_idesc): Lookup insn table via descriptor, not
4837 global. Cache attributes and insn length in IDESC.
4838 * sim-model.scm (-gen-cpu-defns): Generate new func @cpu@_prepare_run.
4839 @cpu@_opcode renamed to @cpu@_get_idata.
4840 (-gen-mach-defns,@mach@_init_cpu): Don't initialize IDESC table here,
4841 done later underneath sim_resume.
4842 (@mach@_mach): Record @cpu@_prepare_run.
4843 * sim.scm (<hardware-base>,cxmake-get): New arg selector, all callers
4845 (-hw-gen-set-quiet-pc): Ditto.
4846 (-hw-cxmake-get,-hw-gen-set-quiet): Ditto.
4847 (<hw-memory>,cxmake-get,gen-set-quiet): Ditto.
4848 (<hw-addr>,cxmake-get): Ditto.
4849 (<hw-iaddr>,cxmake-get): Ditto.
4850 (<pc>,cxmake-get): Ditto.
4851 (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Ditto.
4852 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): Ditto.
4853 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
4854 (<hw-pc>,gen-write): Use hw-selector-default.
4855 (<hw-register>,gen-write): Ditto.
4856 (<hw-memory>,gen-write): Ditto.
4857 (-gen-hw-index-raw,-gen-hw-index): Handle selector.
4858 (-gen-hw-selector): New proc.
4860 * desc.scm: New file.
4861 * desc-cpu.scm: New file.
4862 * opcodes.scm: Split up into several smaller files.
4863 * opc-asmdis.scm: New file.
4864 * opc-ibld.scm: New file.
4865 * opc-itab.scm: New file.
4866 * opc-opinst.scm: New file.
4867 * Makefile.am (desc): New target.
4868 (opcodes): Update args to cgen-opc.scm.
4869 * Makefile.in: Rebuild.
4870 * aclocal.m4: Rebuild.
4871 * config.in: Rebuild.
4872 * configure.in: Update arg to AC_INIT.
4873 Update version number to 0.7.0. Change AM_EXEEXT to AC_EXEEXT.
4874 Update AC_PREREG arg to 2.13. Change AM_PROG_INSTALL to
4876 * configure: Rebuild.
4877 * cgen-gas.scm: Update files to load.
4878 * cgen-opc.scm: Ditto. Reorganize option letters.
4879 * cgen-sim.scm: Update files to load.
4880 * cgen-stest.scm: Ditto.
4881 * dev.scm (cload): New app "DESC".
4882 (load-opc): Update files to load.
4883 (load-gtest,load-sim,load-stest): Ditto.
4885 * attr.scm (bool-attr?): New proc.
4886 (attr-list-enum-list): New proc.
4887 (-attr-sort): Rewrite.
4888 (attr-builtin!): Give ALIAS attribute a fixed index.
4889 * utils-cgen.scm (gen-attr-enum-decl): Call attr-list-enum-list to
4890 calculate attribute enum list.
4891 (gen-attr-mask): Subtract CGEN_ATTR_BOOL_OFFSET from attribute's enum.
4893 * insn.scm (-insn-parse): Renamed from parse-insn.
4895 * hardware.scm (-hw-parse): New arg errtxt, all callers updated.
4898 * mode.scm (-mode-parse): Renamed from parse-mode.
4900 * operand.scm (<operand>): New member `selector'.
4901 (<operand>,make!): Use default selector.
4902 (hw-selector-default): New variable.
4903 (hw-selector-default?): New proc.
4905 * pmacros.scm (pmacros-init!): New proc.
4906 (-pmacro-{make,name,arg-spec,transformer,comment}): New procs.
4907 (-env-set!): Delete.
4908 (-pmacro-expand): New proc apply-macro.
4909 Use it in scan-list,scan. Scan list first, then see if macro
4911 (define-pmacro): Rewrite.
4912 * read.scm (-init-parse-cpu!): Call utils-init!,parse-init!.
4914 * rtl.scm (-simplify-for-compilation): Ensure at least one mach
4915 selected if (current-mach) seen.
4916 (rtx?): Renamed from rtx-uneval?, all callers updated.
4917 (<c-expr>,gen-set-quiet,gen-set-trace): New arg selector, all callers
4919 (<c-expr-temp>,cxmake-get,gen-set-quiet,gen-set-trace): New arg
4920 selector, all callers updated.
4921 (hw:): New arg selector, all callers updated. Delete old comments
4923 (reg:,mem:): Handle selectors
4924 * rtx-funcs.scm (reg:): Handle selectors.
4926 * read.scm: Renamed from cpu.scm.
4927 (<command>): New class.
4928 (<reader>): New member commands.
4929 (reader-add-command!): New proc.
4930 (reader-lookup-command): New proc.
4931 (reader-error,-reader-process-expanded,reader-process): New procs.
4932 (reader-read-file!): New proc.
4933 (include): Call reader-read-file!.
4935 (cpu-load): Call reader-read-file!.
4936 * utils.scm (num-args): New proc.
4937 * simplify.inc: New file.
4938 * *.scm: Delete def-foo procs. Rewrite define-foo/define-full-foo
4939 procs. Move define-normal-foo procs (and abbreviated forms) to
4940 simplify.inc. Install define-foo/define-full-foo commands in foo-init!
4942 * fr30.cpu: Include simplify.inc.
4943 * fr30.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
4944 * i960.cpu: Include simplify.inc.
4945 * m32r.cpu: Include simplify.inc.
4946 * m32r.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
4947 (CGEN_PRINT_NORMAL): Use CGEN_BOOL_ATTR.
4948 * sparc.cpu: Include simplify.inc.
4949 * sparc.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
4950 * utils-cgen.scm (parse-error): Moved to read.scm.
4951 (sanitize): Rewrite.
4952 (utils-init!): New proc.
4954 1999-02-02 Doug Evans <devans@casey.cygnus.com>
4956 * sparc.cpu: New file.
4957 * sparc32.cpu: New file.
4958 * sparc64.cpu: New file.
4959 * sparccom.cpu: New file.
4960 * sparc.opc: New file.
4962 1999-01-27 Frank Eigler <fche@cygnus.com>
4964 * utils.scm (gen-copyright): New proc.
4966 1999-01-27 Doug Evans <devans@casey.cygnus.com>
4968 Parameterize rtl parsing, rather than having lots of little handlers.
4969 * rtl.scm (<rtx-func>): New members arg-types,arg-modes.
4970 Delete member traverse.
4971 (rtx:set-traverse!): Delete.
4972 (-rtx-valid-types,-rtx-valid-matches): New variables.
4973 (-rtx-func-lookup): Take symbol or <rtx-func> object as argument
4974 instead of expression. All callers updated.
4975 (def-rtx-node): New args arg-types,arg-modes.
4976 (def-rtx-syntax-node): Ditto.
4977 (def-rtx-dual-mode): Ditto.
4978 (-rtx-macro-expand-list): Renamed from -rtx-macro-maybe-expand-list.
4979 All callers updated.
4980 (-rtx-macro-expand): Renamed from -rtx-macro-maybe-expand.
4981 All callers updated.
4982 (rtx-macro-expand): New proc.
4983 (-rtx-traverse-check-args): Delete.
4984 (-rtx-traverse-normal): Call -rtx-traverse-expr rather than calling
4985 an rtx specific traverser.
4986 (-rtx-any-mode?,-rtx-symornum?): New procs.
4987 (-rtx-traverse-rtx-list,-rtx-traverse-error): New proc.
4988 (-rtx-traverse-no-mode): Delete.
4989 (-rtx-traverse-syntax-expr,-rtx-traverse-syntax-no-mode): Delete.
4990 (-rtx-traverse-operands): Rewrite.
4991 (-rtx-traverse-expr): Rewrite.
4992 (rtx-traverse): Don't expand macros here, leave for caller to do.
4993 (rtx-simplify): Delete.
4994 (rtx-compile-time-constant?): Rewrite. Handle FALSE/TRUE for boolean
4996 (rtx-true?,rtx-false?): Ditto.
4997 (-rtx-ref-type): Set dest is operand 1 now.
4998 (-simplify-for-compilation): New proc.
4999 (semantic-in-out-operands): Recognize regno as an alias for index-of.
5000 Expand macros before calling rtx-traverse. Sort operands by name
5001 to avoid unnecessary semantic formats.
5002 (semantic-attrs): New proc.
5003 (rtx-uneval?): Handle (<rtx-func> ...).
5004 (s-boolifop): Delete arg mode. All callers updated.
5005 * rtx-funcs.scm (all non-macros): Add arg-type and arg-mode specs.
5006 (eq-attr): New arg obj.
5008 * m32r.cpu (rach): Update calls to andif.
5010 * minsn.scm (-minsn-parse-expansion): Renamed from
5011 parse-minsn-expansion.
5012 (-minsn-parse): Renamed from parse-minsn.
5013 (-minsn-read): Renamed from read-minsn.
5014 (def-minsn): Don't check APPLICATION here.
5015 (def-full-minsn): New proc.
5016 (define-macro-insn): Check APPLICATION here. Expand macros.
5017 (define-normal-macro-insn): Ditto.
5019 * utils.scm (word-value): New arg start-lsb?.
5020 (word-mask,word-extract): Ditto.
5021 (split-bits,powers-of-2): Use integer-expt instead of expt.
5022 (bit-set?): Handle 32 bit values (which are bignums).
5023 (cg-logand,cg-logxor): New functions.
5024 * ifield.scm (<ifield>,field-mask): Update call to word-mask.
5025 (<ifield>,field-value): Update call to word-value.
5026 (<ifield>,min-value): Use integer-expt instead of expt.
5027 (<ifield>,max-value): Ditto.
5029 * hardware.scm (<hw-register>,new-mode): Rename local mode to cur-mode.
5031 * insn.scm (def-full-insn): Discard ALIAS insns if simulator.
5033 Compute raw instruction format in addition to semantic based format.
5034 * iformat.scm: Delete members cti?,sem-in-ops,sem-out-ops.
5035 (<iformat> accessors): Rename accessors to ifmt-*.
5036 (<sformat>): New class.
5037 (fmt-enum): Renamed from fmt:enum.
5038 (-ifmt-search-key): Rewrite.
5039 (-sfmt-search-key): New proc.
5040 (ifmt-analyze): Rename arg include-sem-operands? to compute-sformat?
5041 Compute iformat and sformat search keys.
5042 (ifmt-build): Update.
5043 (sfmt-build): New proc.
5044 (-ifmt-lookup-ifmt!,-ifmt-lookup-sfmt!): New procs.
5045 (ifmt-compute!): Compute instruction format <iformat> based on
5046 instruction fields alone. Compute new semantic format <sformat>
5047 based on instruction fields and semantic information.
5048 (ifmt:lookup): Delete.
5049 * mach.scm (<arch>): New member sfmt-list, plus accessors.
5050 (current-sfmt-list): New proc.
5051 * insn.scm (<insn>): Rename member fmt-tmp to tmp.
5052 Rename member fmt to ifmt. New members fmt-desc, sfmt.
5053 (insn-length,insn-length-bytes): Update.
5054 (insn:mask-length,insn:mask): Update.
5055 (insn-lookup-op): Update.
5056 * gas-test.scm (gas-test-analyze!): Update.
5057 (gen-gas-test): Ditto.
5058 * sim-test.scm (sim-test-analyze!): Update.
5059 (gen-sim-test): Ditto.
5060 * opcodes.scm (gen-operand-instance-table): Update.
5061 (gen-operand-instance-ref): Ditto.
5062 (max-operand-instances): Use heuristic if semantics not parsed.
5063 (ifmt-opcode-operands): Renamed from fmt-opcode-operands.
5064 (opcodes-analyze!): Only scan semantics of building operand instance
5066 * sim-cpu.scm (*) Update calls to <iformat>/<sformat> accessors.
5067 (-gen-extract-ifmt-macro): Renamed from -gen-extract-fmt-macro.
5068 * sim-decode.scm (*) Update calls to <iformat>/<sformat> accessors.
5069 (gen-sfmt-argvars-defns): Renamed from gen-ifmt-argvars-defns.
5070 (gen-sfmt-argvars-assigns): Renamed from gen-ifmt-argvars-assigns.
5071 * sim-model.scm (*) Update calls to <iformat>/<sformat> accessors.
5072 * sim.scm (*) Update calls to <iformat>/<sformat> accessors.
5074 * sim-decode.scm (usable-decode-bit?): Rename from decode-bit?
5075 New arg lsb0? All callers updated.
5076 (decode-bits): New arg lsb0?. All callers updated.
5077 (opcode-slots): Update call to bit-set?. Call integer-expt instead
5079 (-gen-decode-bits): New arg lsb0?. All callers updated.
5080 (build-slots): Call integer-expt instead of expt.
5081 (build-decode-table-entry): Handle crossing word boundaries better.
5082 (-gen-decode-switch): New arg lsb0?. All callers updated.
5083 (-gen-extract-decls): Rename decode format entry from ifmt to sfmt.
5085 * enum.scm (define-enum): Rewrite.
5086 (define-normal-enum): Ditto.
5087 (def-full-insn-enum): New proc.
5088 (define-normal-insn-enum): Rewrite.
5090 * attr.scm (<bitset-attribute>,gen-value-for-defn): Ensure result is
5092 (<{integer,enum}-attribute>,gen-value-for-defn): Ditto.
5094 * dev.scm: Add sid support.
5096 * Makefile.am (opcodes,sim-arch,sim-cpu): New targets.
5097 (CLEANFILES): Add tmp-*.
5098 * Makefile.in: Rebuild.
5100 * doc/Makefile.am: New file.
5101 * doc/Makefile.in: New file.
5102 * doc/cgen.texi: New file.
5103 * Makefile.am (SUBDIRS): Define.
5104 * Makefile.in: Rebuild.
5105 * configure.in: Create doc/Makefile.
5106 * configure: Rebuild.
5108 1999-01-18 Doug Evans <devans@casey.cygnus.com>
5110 * insn.scm (insn:syn): Delete.
5112 1999-01-15 Doug Evans <devans@casey.cygnus.com>
5114 * fr30.cpu (model fr30-1): Add state variables load-regs,
5115 load-regs-pending. Delete h-gr. Clean up operand names of all units.
5116 * m32r.cpu (model m32r/d): Clean up operand names of u-exec.
5117 (model m32rx): Ditto.
5118 (addi): Simplify function unit usage spec.
5119 (ld-plus): Rewrite operand names in function unit usage spec.
5120 (mvtachi,mvtachi-a,mvtaclo,mvtaclo-a,st-plus,st-minus): Ditto.
5121 * sim.scm (<unit>,gen-profile-code): Redo how operand names are
5122 overridden. Allow operand to appear in input and output spec.
5123 (<insn>,gen-profile-code): string-append -> string-list.
5125 * ifield.scm (define-ifield): Call pmacro-expand.
5126 (define-full-ifield,define-normal-ifield): Ditto.
5127 (define-multi-ifield,define-normal-multi-ifield): Ditto.
5129 * sim.scm (gen-argbuf-type): Keep leading part of ARGBUF same for
5130 with-scache and without-scache cases.
5132 1999-01-14 Doug Evans <devans@casey.cygnus.com>
5134 * fr30.cpu (fr30-1): Add state variable h-gr.
5135 Add units u-cti, u-load, u-store, u-ldm, u-stm.
5136 (all insns): First pass at providing cycle counts.
5137 * sim.scm (<unit>,gen-profile-code): Only check for output operands
5138 when initializing unit output operands, ditto for input operands.
5140 * insn.scm (insn-length,insn-length-bytes): New procs.
5141 * mach.scm (-adata-set-derived!): Use them.
5142 * sim-cpu.scm (-gen-sem-case): Ditto.
5144 * sim-cpu.scm (-gen-trace-record-type): PCADDR->IADDR.
5145 (-gen-write-case): Ditto.
5146 (gen-semantic-fn): Ditto. Split into two:
5147 -gen-scache-semantic-fn and -gen-no-scache-semantic-fn. Fix bitrot
5149 (-gen-all-semantic-fns): Renamed from -gen-all-semantics. Handle
5150 scache/no-scache appropriately. All callers updated.
5151 (-gen-sem-case): PCADDR->IADDR.
5152 * sim.scm (gen-argbuf-type): PCADDR->IADDR.
5154 * sim-decode.scm (*): Replace string-append,string-map with
5155 string-list,string-list-map where the result is sufficiently large.
5156 (-gen-decode-insn-table): Go back to simple version for non-scache
5157 case: just record IDESC in decoder tables and leave field extraction
5159 (-gen-decode-switch): Ditto.
5160 (-gen-decode-fn): Ditto.
5161 (-gen-extract-decls): Only emit format enum if with-scache?.
5162 * sim-model.scm (-gen-model-insn-fn): Extract ifields here in
5164 (-gen-model-insn-fns): Don't emit model fns for virtual insns.
5165 (-gen-insn-timing): Ditto.
5166 * sim.scm (gen-argbuf-type): Only output sem_fields union in
5169 * sim.scm (-hw-gen-fun-get): Use GET_<H-NAME> macro.
5170 (-hw-gen-fun-set): Use SET_<H-NAME> macro.
5172 1999-01-12 Doug Evans <devans@casey.cygnus.com>
5174 * cpu.scm (keep-mach-validate!): New proc.
5175 (include): New proc.
5177 * mach.scm (current-arch-mach-name-list): New proc.
5178 (-parse-arch-machs): Always return canonical form.
5179 (def-arch): Validate user specified machs to be kept.
5180 (def-mach-attr!): Simplify.
5182 * opcodes.scm (-opcodes-build-operand-instance-table?): New global.
5183 (option-init!): Initialize it.
5184 (option-set!): Set it.
5185 (gen-insn-table-entry): Emit 0 for operand instance ref if not
5186 output operand instance tables.
5187 (cgen-opc.in): Only output operand instance tables if asked to.
5189 * sim.scm (option-init!,option-set!): Clarify returned value.
5191 * sim.scm (gen-mach-bfd-name): Move from here.
5192 * utils-cgen.scm: To here.
5194 1999-01-11 Doug Evans <devans@casey.cygnus.com>
5196 * fr30.cpu (ilm): Fix comment field.
5197 (cond-branch): Remove explicit setting of COND-CTI, let cgen
5200 * rtl.scm (rtx-simplify,rtx-compile-time-constant?): New procs.
5201 (rtx-true?, rtx-false?): New procs.
5202 * rtx-funcs.scm (annul): Rename vpc to pc.
5203 (-rtx-traverse-if): Improve determination of whether then/else parts
5204 are conditionally executed.
5206 * sim.scm (-gen-argbuf-fields-union): Move definition of union to
5208 (gen-argbuf-type): Simplify generated definition (big sem_fields
5209 union moved outside).
5211 1999-01-11 Ben Elliston <bje@cygnus.com>
5213 * doc/porting.texi: New file.
5215 * doc/intro.texi: New file.
5216 (Layout): Use @example to insert preformatted ASCII text (such as
5217 diagrams). @code is inappropriate here.
5219 1999-01-06 Doug Evans <devans@casey.cygnus.com>
5221 * ifield.scm (-multi-ifield-read): Fix handling of insert/extract.
5223 * m32r.opc (print_hash): Cast dis_info.
5225 * sim-cpu.scm (-gen-hardware-types): Sanitize get/set macros.
5226 * sim.scm (<sim-hardware>,make!): Emit a comment for user-written
5229 1999-01-05 Doug Evans <devans@casey.cygnus.com>
5231 * i960.cpu (f-br-disp): Remove RELOC attribute.
5232 (f-ctrl-disp): Ditto.
5233 (callx-disp): set-quiet -> set for (reg h-gr 2).
5234 (callx-indirect,callx-indirect-offset): Ditto.
5236 * Makefile.am (gas-test): Fix dependencies.
5237 * Makefile.in: Rebuild.
5238 * cgen-gas.asm: File creation args are -<uppercase-letter>.
5239 * gas-test.scm (break-out-syntax,make-file-name): Delete.
5240 (gas-test-analyze!): Use syntax-break-out.
5241 * sim-test.scm (break-out-syntax,make-file-name): Delete.
5242 (sim-test-analyze!): Use syntax-break-out.
5243 (cgen-build.sh): Use gen-file-name.
5244 (cgen-allinsn.exp): Compute and pass all machs to run_sim_test.
5245 * insn.scm (syntax-break-out): New proc.
5246 * utils.scm (gen-file-name): New proc.
5248 * fixup.scm (nil,<?,<=?,>?): Delete.
5250 * utils.scm (count-true): Rewrite.
5252 * slib/sort.scm: Move sort.scm to slib directory.
5255 * iformat.scm (ifmt-compute!): Record empty format.
5257 * rtl.scm (semantic-in-out-operands): Simplify by moving several
5258 internal procs outside. Handle expression register numbers.
5261 * rtx-funcs.scm (annul): Rename new_pc to vpc.
5263 * sim-cpu.scm (-gen-cpu-reg-access-defns): Define access fns for
5265 (-gen-write-case): Pass vpc to SEM_BRANCH_FINI.
5266 (gen-semantic-fn,-gen-sem-case): Ditto.
5267 (cgen-cpu.c): Define WANT_CPU to @cpu@.
5268 (cgen-semantics.c): Ditto.
5269 * sim-decode.scm (-gen-extract-decls): Handle non-with-scache case.
5270 (gen-ifmt-argvars-defns): New proc.
5271 (gen-ifmt-argvars-assigns): New proc.
5272 (-gen-all-extractors): Delete FMT_EMPTY case, now handled like others.
5273 (-gen-decode-fn): Handle non-with-scache case.
5274 (cgen-decode.c): Define WANT_CPU to @cpu@.
5275 * sim-models.scm (-gen-mach-defns): Emit bfd name.
5276 (cgen-model.c): Define WANT_CPU to @cpu@.
5277 * sim.scm (gen-ifld-extract-argvar): New proc.
5278 (<sim-hardware>,make!): Don't emit [GS]ET_H_FOO macros for elements
5279 with FUN-ACCESS specified.
5280 (hw-fun-access?): New proc, as <hardware-base>:fun-access? method.
5281 (<hw-register>,gen-extract): New arg local?.
5282 (<hw-address>,gen-extract): Ditto.
5283 (-hw-cxmake-get): Handle non-with-scache case.
5284 (-hw-gen-set-quiet): Ditto.
5285 (<hw-address>,cxmake-get): Handle non-with-scache case.
5286 (gen-op-extract-argvar): New proc.
5287 (<operand>,gen-record-profile): Rewrite.
5288 (<operand>,gen-profile-code): Rewrite.
5289 (<unit>,gen-profile-code): Use -gen-argfld-ref.
5290 (gen-argbuf-fields-union): New proc.
5291 (gen-argbuf-type): Use it. Handle non-scache case.
5293 * *.scm: class:foo procs renamed to class-foo.
5294 * attr.scm (<attribute>): New member `for'.
5295 (-attr-parse): New first value in list for default if
5297 (non-bool-attr-list,attr:add!): Delete.
5298 (def-attr): Use current-attr-add!.
5299 (atlist-attr-value-no-default): New proc.
5300 (attr-lookup-default): Handle boolean attributes.
5301 (gen-attr-enum): New proc.
5302 (-attr-remove-meta-attrs-alist): New proc.
5303 (attr-nub): New proc.
5304 (current-attr-list-for): New proc.
5305 (current-{ifld,hw,op,insn}-attr-list): New procs.
5306 (attr-builtin!): New proc.
5307 * cpu.scm (keep-obj?): Rewrite.
5308 (-init-parse-cpu!): Call arch-init!.
5309 (-install-builtin!): Call {attr,mode,ifield,insn}-builtin!.
5310 (-finish-parse-cpu!): Call arch-finish!.
5311 * enum.scm (enum-list,enum:add,enum:lookup): Delete.
5312 (def-enum,def-full-enum): Use current-enum-add!.
5313 (gen-obj-list-enums): New proc.
5314 * hardware.scm (hw:add!,hw:lookup): Delete.
5315 (def-hardware,def-hardware-ext): Use current-hw-add!.
5316 (hw:std-attrs,hw:attr-list): Delete.
5317 (hardware-builtin!): Define builtin hardware attributes.
5318 * ifield.scm (ifld:add!,ifld:lookup): Delete.
5319 (def-ifield,def-full-ifield): Use current-ifld-add!.
5320 (ifld:std-attrs,ifld:attr-list): Delete.
5321 (ifield-builtin!): New proc.
5322 * insn.scm (insn:add!,insn:lookup): Delete.
5323 (def-full-insn): Use current-insn-add!.
5324 (insn:std-attrs): Delete.
5325 (insn-builtin!): New proc.
5326 * mach.scm (<arch>): New members attr-list,enum-list,op-list,
5328 (<arch-data>): New member machs.
5329 (current-attr-list,current-enum-list): New procs.
5330 (current-op-list,current-minsn-list): New procs.
5331 (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-add!): Ditto.
5332 (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-lookup):
5334 (-parse-arch-machs): New proc.
5335 (-arch-parse): New arg machs, all callers updated.
5336 (-arch-read): Handle machs spec.
5337 (def-arch): Define MACH attribute here.
5338 (mach-init!,mach-finish!): Not here.
5339 (cpu:add!,cpu:lookup): Delete.
5340 (def-cpu): Use current-cpu-add!.
5341 (<mach>): New member bfd-name.
5342 (-mach-parse): New arg bfd-name, all callers updated.
5343 (-mach-read): Handle bfd-name spec.
5344 (mach:add!,mach:lookup): Delete.
5345 (def-mach): Use current-mach-add!.
5346 (def-mach-attr!): New proc.
5347 (arch-init!): New proc.
5348 (arch-finish!): New proc. Reverse all object lists here.
5349 * minsn.scm (minsn-list,minsn-add!,minsn:lookup): Delete.
5350 (def-minsn): Use current-minsn-add!. Ignore minsn if mach not kept.
5351 (define-normal-macro-insn): Ignore minsn if mach not kept.
5352 * mode.scm (mode-builtin!): New proc.
5353 * model.scm (model:add!,model:lookup): Delete.
5354 (def-model): Use current-model-add!.
5355 * opcodes.scm (insn:attr-list): Delete.
5356 (attr-bool-gen-decl,attr-bool-gen-defn): New procs.
5357 (gen-attr-table-defn): Emit value for default.
5358 (gen-attr-table-defns): Emit bool_attr. Emit ifield attr table.
5359 (op:attr-list): Delete.
5360 (gen-operand-decls,gen-insn-decls): New proc.
5361 (compute-insn-attr-list): Delete.
5362 (cgen-opc.h): Reorganize and simplify.
5363 * operand.scm (-operand-list,operand-list,op:add,op:lookup): Delete.
5364 (def-operand,def-full-operand): Use current-op-add!.
5365 (op:std-attrs): Delete.
5366 (operand-enum): Delete.
5367 (operand-builtin!): Define builtin operand attrs.
5368 * utils-cgen.scm (sanitize): Update calls to lookup procs.
5369 (gen-attr-enum-decl): Use gen-obj-list-enums.
5370 (gen-obj-attr-defn): Renamed from gen-attr-defn, all callers updated.
5372 * fr30.cpu (define-arch): Add machs spec.
5373 (f-i4): SIGNED attribute -> !UNSIGNED.
5374 (f-disp8,f-disp9,f-disp10,f-s10,f-rel9,f-rel12): Ditto.
5375 (HASH-PREFIX): Define operand attribute.
5376 (NOT-IN-DELAY-SLOT): Define insn attribute.
5377 * i960.cpu (define-arch): Add machs spec.
5378 * m32r.cpu (define-arch): Add machs spec.
5379 (h-hi16): Remove UNSIGNED,SIGN-OPT attributes.
5380 (HASH-PREFIX): Define operand attribute.
5381 (FILL-SLOT): Define insn attribute.
5383 Thu Dec 17 17:15:06 1998 Dave Brolley <brolley@cygnus.com>
5385 * fr30.cpu (stilm): Correct mask for and operation.
5387 1998-12-17 Doug Evans <devans@casey.cygnus.com>
5389 * sim-test.scm (cgen-build.sh): Use `mach' to specify machs, not `cpu'.
5390 Replace START/EXIT with start/pass.
5391 (gen-sim-test): Delete ".text".
5393 Wed Dec 16 16:16:39 1998 Dave Brolley <brolley@cygnus.com>
5395 * fr30.cpu (cond-branch): Conditional branches not allowed in delay slots.
5397 Tue Dec 15 17:30:01 1998 Dave Brolley <brolley@cygnus.com>
5399 * fr30.cpu: Add NOT-IN-DELAY-SLOT as appropriate.
5400 (h-sbit): Make it FUN-ACCESS.
5401 (h-gr): Reorder so that general regs are always printed by number.
5403 1998-12-14 James E Wilson <wilson@wilson-pc.cygnus.com>
5405 * i960.cpu (flushreg): Use nop.
5407 1998-12-14 Doug Evans <devans@casey.cygnus.com>
5409 * m32r.cpu (default-alignment): Specify.
5410 * mach.scm (<arch-data>): New member default-alignment.
5411 (adata:default-alignment): New proc.
5412 (current-arch-default-alignment): New proc.
5413 (-arch-parse): New arg default-alignment.
5414 (parse-alignment): New proc.
5415 (-arch-read): Handle default-alignment spec.
5417 * rtx-funcs.scm (attr:): Pass attr-name through gen-c-symbol.
5419 * insn.scm (f-%): Delete.
5420 * sim-cpu.scm (gen-define-fields): Delete support for f-%. Can
5421 be readded if proved useful.
5422 (gen-extract-fields): Ditto. Use gen-ifetch.
5423 * sim.scm (<hw-memory>,cxmake-get): Pass pc to GETMEM*.
5424 (<hw-memory>,gen-set-quiet): Pass pc to SETMEM*.
5426 Mon Dec 14 16:20:59 1998 Dave Brolley <brolley@cygnus.com>
5428 * fr30.cpu (div2): Set zbit properly when remainder not zero.
5430 1998-12-14 Dave Brolley <brolley@cygnus.com>
5432 * fr30.cpu: Remove stub macros.
5433 (div1): Shift bits from mdl into mdh. Don't use addc/subc.
5434 (div2): Don't use addc/subc.
5436 1998-12-11 Doug Evans <devans@casey.cygnus.com>
5438 * utils-cgen.scm (gen-obj-sanitize): Only catch spelling errors
5441 Thu Dec 10 18:37:34 1998 Dave Brolley <brolley@cygnus.com>
5443 * fr30.cpu (div0s,div0u,div1,div2,div3,div4s): Implemented.
5445 Thu Dec 10 12:28:53 1998 Doug Evans <devans@canuck.cygnus.com>
5447 * cpu.scm (keep-all?): New proc.
5448 (assert-keep-all): Use it.
5449 * opcodes.scm (gen-ifmt-table-1): Use gen-obj-sanitize.
5450 * utils-cgen.scm (gen-obj-sanitize): Handle macro-insns.
5451 Check for spelling errors.
5453 1998-12-09 Doug Evans <devans@casey.cygnus.com>
5455 * rtl.scm (s-convop): Call -rtx-sem-mode.
5457 Tue Dec 8 10:58:38 1998 Doug Evans <devans@canuck.cygnus.com>
5459 * hardware.scm (-parse-hw-type): parse! no longer returns a result.
5460 (-parse-hw-profile): Ditto.
5461 (<hw-register>, parse!): Return `void' result.
5462 (<hw-pc>, parse!): Ditto.
5463 (<hw-memory>, parse!): Ditto.
5464 (<hw-immediate>, parse!): Ditto.
5465 (<hw-address>, parse!): Ditto.
5467 * ifield.scm (-ifield-parse): Validate encode/decode fields.
5468 (-ifld-parse-encode-decode): New proc.
5469 (-ifld-parse-encode,-ifld-parse-decode): New proc.
5470 (-multi-ifield-parse): Set encode/decode to #f.
5471 (ifld:decode-mode): New proc.
5472 * utils.scm (nub): Rewrite.
5473 * operand.scm (op-nub): Rewrite.
5474 * sim.scm (<ifield>, gen-type): Rewrite.
5475 (-gen-ifld-argbuf-defn): New proc.
5476 (gen-ifld-extract,gen-ifld-trace-extract): New procs.
5477 (<sim-hardware>): Forward gen-trace-extract onto `type'.
5478 Ditto for needed-iflds. gen-argbuf-defn renamed from gen-argbuf-elm.
5479 (<hardware-base>): New method needed-iflds. gen-argbuf-defn
5480 renamed from gen-argbuf-elm, return "". Rewrite gen-extract.
5481 New method gen-trace-extract.
5482 (<hw-register>): New method needed-iflds. gen-argbuf-defn renamed
5483 from gen-argbuf-elm, return "" if not caching register address.
5484 Rewrite gen-extract. New method gen-trace-extract.
5485 (<hw-address>): New methods needed-iflds, gen-argbuf-defn,
5486 gen-extract, gen-trace-extract, cxmake-get.
5487 (<hw-iaddress>): New method cxmake-get.
5488 (op-needed-iflds): New proc.
5489 (<operand>): Delete methods gen-argbuf-elm, gen-extract.
5490 (-gen-op-argbuf-defn): New proc.
5491 (gen-op-extract): Renamed from op:extract.
5492 (gen-op-trace-extract): Renamed from op:trace-extract.
5493 (fmt-extractable-operands): Renamed from fmt-semantic-operands
5495 (gen-argbuf-elm): Rewrite.
5496 * sim-decode.scm (-gen-record-args): Update.
5498 * sim.scm (c-cpu-macro): Renamed from cpu-deref. All uses changed.
5500 * pmacros.scm (-pmacro-expand): Handle procedural macros in
5501 argument position. Flag symbolic macros in function position as
5503 (define-pmacro): Handle quoting in definition of symbolic macros.
5504 (pmacro-trace): Call -pmacro-expand, not -pmacro-ref.
5506 Tue Dec 8 13:06:44 1998 Dave Brolley <brolley@cygnus.com>
5508 * fr30.opc (parse_register_list): Account for reverse masks
5510 (print_register_list): Ditto.
5511 (parse_low_register_list_ld): New function.
5512 (parse_hi_register_list_ld): New function.
5513 (parse_low_register_list_st): New function.
5514 (parse_hi_register_list_st): New function.
5515 (print_hi_register_list_ld): New function.
5516 (print_hi_register_list_st): New function.
5517 (print_low_register_list_ld): New function.
5518 (print_low_register_list_st): New function.
5519 * fr30.cpu (ldr15dr): Implement workaround.
5520 (ldm0,ldm1,stm0,stm1): Implemented.
5522 1998-12-08 Doug Evans <devans@casey.cygnus.com>
5524 * configure.in: Rename --with-hobbit to --with-cgen-hobbit.
5525 * configure: Regenerate.
5526 * Makefile.am (WITH_HOBBIT): Update.
5527 (cgen-hob.c): Remove Makefile dependency.
5528 (cgen.o): Depend on cgen-gh.h, config.h.
5529 * Makefile.in: Regenerate.
5530 * aclocal.m4: Regenerate.
5532 1998-12-07 James E Wilson <wilson@wilson-pc.cygnus.com>
5534 * i960.cpu, i960.opc: New files.
5536 Mon Dec 7 14:30:24 1998 Dave Brolley <brolley@cygnus.com>
5538 * fr30.opc (parse_register_number): New function.
5539 (parse_register_list): New function.
5540 (parse_low_register_list): Use parse_register_list.
5541 (parse_hi_register_list): Use parse_register_list.
5542 * fr30.cpu (sth): Fix assembler syntax. Implement more
5545 Fri Dec 4 16:07:13 1998 Doug Evans <devans@canuck.cygnus.com>
5547 * sim-cpu.scm (cgen-sem-switch.c): Update definition of TRACE_RESULT.
5548 * sim-decode.scm (-gen-record-args): Update call to TRACE_EXTRACT.
5549 * sim.scm (-op-gen-set-trace): Update call to TRACE_RESULT.
5550 (-op-gen-set-trace-parallel): Ditto.
5551 (gen-argbuf-type): New ARGBUF members trace_p,profile_p;
5553 * fr30.cpu (call,calld): Fix setting of pc.
5554 (f-op5): Fix start bit number.
5556 Fri Dec 4 17:06:28 1998 Dave Brolley <brolley@cygnus.com>
5558 * fr30.cpu (st): Fix operand ordering. Implement more
5561 Thu Dec 3 23:59:40 1998 Doug Evans <devans@canuck.cygnus.com>
5563 * ifield.scm (ifld:mode,ifld:hw-type): New procs.
5564 * iformat.scm (fmt-opcode-operands): Move to opcodes.scm.
5565 (fmt-semantic-operands): Move to sim.scm.
5566 * opcodes.scm (fmt-opcode-operands): Moved here from iformat.scm.
5567 * operand.scm (<hw-index>): New member `name'. All builders updated.
5568 (<hw-index>): New method get-name.
5569 (op-profilable?): Moved to sim.scm.
5571 * sim.scm (fmt-semantic-operands): Moved here from iformat.scm.
5572 (op-profilable?): Moved here from operand.scm.
5573 (gen-extract-type): Delete.
5574 (c-argfld-macro): Renamed from c-ifield-macro. All uses updated.
5575 (-gen-argfld-ref): New proc.
5576 (-gen-ifld-argfld-name): New proc.
5577 (gen-ifld-argfld-ref): Renamed from -gen-ifld-ref. All uses updated.
5578 (-gen-ifld-decoded-val): Renamed from -gen-ifld-raw-val.
5579 (-gen-hw-index-argfld-name,-gen-hw-index-argfld-ref): New procs.
5580 (<hardware-base>): Delete method gen-extract-type. New method
5582 (<hw-register): Ditto. Update method gen-extract.
5583 (<operand>, method gen-argbuf-elm): Rewrite.
5584 * rtl.scm (semantic-in-out-operands): Handle (ifield f-name).
5585 (s-cmpop): Fix handling of eq,ne for unsigned modes.
5586 * rtx-funcs.scm (eq,ne,lt,le,gt,ge,ltu,leu,gtu,geu): Update.
5588 * sim-decode.scm (-gen-record-args): Tweak.
5590 * sim.scm (gen-argbuf-elm): Handle case of all constant opcode fields.
5592 Thu Dec 3 14:23:27 1998 Dave Brolley <brolley@cygnus.com>
5594 * doc/porting: Fix typo: gas->sim.
5595 * fr30.opc (print_m4): New function.
5596 * fr30.cpu: Implemented many insns.
5598 Thu Dec 3 00:03:16 1998 Doug Evans <devans@canuck.cygnus.com>
5600 * rtl.scm (build-reg-operand!): Remove redundant setting of hw-name.
5602 * fr30.cpu (f-rel9): Delete RELOC attribute.
5603 (f-rel12): Add PCREL-ADDR attribute.
5604 (label9): Make an h-iaddr, not h-uint. Delete asm print spec.
5605 (label12): Delete PCREL-ADDR attribute. Make an h-iaddr, not h-sint.
5606 * fr30.opc (print_label9): Delete.
5608 * iformat.scm (ifmt-analyze): Check attributes derived from semantic
5609 code for CTI indicators.
5610 * insn.scm (insn-cti?): Simplify.
5611 * utils-cgen.scm (atlist:cti?): New proc.
5613 1998-11-30 Doug Evans <devans@casey.cygnus.com>
5615 * fr30.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
5616 (f-i20-4,f-i20-16,f-i20): New fields.
5622 * fr30.opc (CGEN_DIS_HASH_SIZE,CGEN_DIS_HASH): Define in opc.h.
5623 * m32r.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
5624 * mach.scm (arch-data): Ditto.
5625 (current-arch-default-insn-word-bitsize): Renamed from
5626 current-arch-default-insn-bitsize [ya, that's a pretty long name].
5627 (-arch-read): Update.
5629 * hardware.scm (hw:attr-list): Move here ...
5630 * opcodes.scm: ... from here.
5632 * ifield.scm (fld:bitrange): Delete.
5633 (fld:word-offset,fld:word-length): New procs.
5634 (ifield?): Use class-instance.
5635 (<ifield>, method field-start): Rewrite.
5636 (ifld:enum): New proc.
5637 (<ifield>, methods field-mask,field-value): Rewrite.
5638 (-ifield-parse): Rewrite.
5639 (<multi-ifield> support): Rewrite.
5640 (ifld-beyond-base?): Rewrite.
5641 (ifld:std-attrs): New variable.
5642 (ifld:attr-list): New proc.
5643 * iformat.scm (-compute-insn-mask): Rewrite.
5644 * insn.scm (-parse-insn-format): New arg errtxt, all callers updated.
5646 (-parse-insn-format-symbol,-parse-insn-format-list): New procs.
5647 * opcodes.scm (<hardware>): No longer forward gen-insert,gen-extract
5649 (<operand>): Ditto. Forward onto index instead.
5650 (gen-ifld-decls,gen-ifld-defns): New procs.
5651 (ifld:insert,ifld:extract): New procs.
5652 (<ifield>): New methods gen-insert, gen-extract.
5653 (<multi-ifield>): Ditto.
5654 (<hw-index>): Forward gen-insert,gen-extract onto value.
5655 (<hw-asm>): Delete insert/extract support.
5656 (<hw-register,hw-memory,hw-immediate>): Ditto.
5657 (gen-hash-defines): Use string-list.
5658 Define CGEN_MAX_IFMT_OPERANDS.
5659 (gen-switch): Use string-list,string-list-map.
5660 (gen-fget-switch,gen-fset-switch): Use string-list.
5661 (gen-parse-switch,gen-insert-switch): Ditto.
5662 (gen-extract-switch,gen-print-switch): Ditto.
5663 (gen-insert-switch,gen-extract-switch): New local `total_length'.
5664 (gen-ifmt-table-1,gen-ifmt-table): New procs.
5665 (gen-ifmt-entry): Renamed from gen-iformat-entry, rewrite.
5666 (gen-ivalue-entry): New proc.
5667 (gen-insn-table-entry): Use string-list. Update iformat,ivalue
5668 computation. Use 0 for operand ref table if ALIAS insn.
5669 (gen-minsn-table-entry): Use string-list.
5670 (gen-macro-insn-table): Temporarily emit format tables for ALIAS insns.
5671 (gen-opcode-open): Record address of ifield table.
5672 (cgen-opc.h): Call gen-ifld-decls.
5673 (cgen-opc.in): Call gen-ifld-defns, gen-ifmt-table.
5674 * types.scm (<bitrange>): New members word-offset,word-length.
5675 Delete member total-length. Delete methods start,mask,value.
5676 (bitrange:word-offset,bitrange:word-length): New procs.
5677 * sim-cpu.scm (gen-define-fields): Simplify.
5678 (gen-extract-fields): Simplify.
5679 * sim.scm (<ifield>, gen-ifld-extract): Rewrite.
5680 (<ifield>): New methods gen-ifld-extract-decl.
5681 Delete method gen-ifld-extract-beyond.
5682 (<multi-ifield>): New methods gen-ifld-extract-decl.
5683 (<multi-ifield>, method gen-ifld-extract): Implement.
5684 (-gen-ifld-extract-base,-gen-ifld-extract-beyond): New procs.
5685 (gen-ifld-exttact,gen-ifld-extract-beyond): Delete.
5687 * rtl.scm (-rtx-traverse-no-mode): Process operands.
5688 (-rtx-traverse-syntax-no-mode): New proc.
5689 (semantic-in-out-operands): Watch for `delay' and add DELAY-SLOT attr.
5690 (s-ifield): New proc.
5691 (s-shop): Don't prepend `unsigned' for unsigned modes.
5692 * rtx-funcs.scm (ifield): New rtx function.
5693 (ref,symbol): Use standard -rtx-traverse-syntax-no-mode.
5694 (delay): New rtx function.
5695 * insn.scm (insn:std-attrs): Add DELAY-SLOT.
5697 * cos.scm (-elm-make-method-getter): Fix typo.
5699 * utils.scm (backslash): Handle lists of strings.
5701 Thu Nov 26 11:47:29 1998 Dave Brolley <brolley@cygnus.com>
5703 * fr30.cpu (f-rel9): Correct for pc+2.
5704 (label9): Use print_label9.
5705 * fr30.opc (print_label9): New function.
5707 Tue Nov 24 11:19:35 1998 Dave Brolley <brolley@cygnus.com>
5709 * fr30.cpu: Change $r13,$r14,$r15 to uppercase.
5710 * fr30.opc (parse_low_register_list): Renamed.
5711 (parse_hi_register_list): Renamed.
5712 (print_hi_register_list): Renamed.
5713 (print_low_register_list): Renamed.
5715 Mon Nov 23 18:26:36 1998 Dave Brolley <brolley@cygnus.com>
5717 * fr30.cpu (f-rel9): Now a pc relative offset.
5719 1998-11-23 Doug Evans <devans@casey.cygnus.com>
5721 * opcodes.scm (op-asm): Move to here, from operands.scm.
5722 (<op-asm>, method parse!): Validate arguments.
5723 (<operand>, method gen-function-name): Fix thinko.
5724 * operand.scm (<operand>, method make!): Don't set op-asm here.
5725 * utils.scm (list-elements-ok?): New proc.
5727 * opcodes.scm: Clean up pass.
5729 1998-11-20 Doug Evans <devans@tobor.to.cygnus.com>
5731 * fr30.cpu (int): Defer saving of ps,pc and setting ibit,sbit to
5732 the fr30_int function.
5733 (h-cr): Remove PROFILE,CACHE-ADDR attributes.
5734 (h-dr): Add FUN-ACCESS attribute.
5736 1998-11-20 James E Wilson <wilson@wilson-pc.cygnus.com>
5738 * sim-model.scm (-gen-mach-defns): Use gen-sym instead of obj:name
5739 for C symbol for models array.
5741 Thu Nov 19 15:57:45 1998 Dave Brolley <brolley@cygnus.com>
5743 * fr30.opc (parse_reglist_low): New function.
5744 (parse_reglist_hi): New function.
5745 (print_reglist_low): New function.
5746 (print_reglist_hi): New function.
5747 * fr30.cpu: Finish remaining insn stubs.
5749 1998-11-19 Doug Evans <devans@tobor.to.cygnus.com>
5751 * sim.scm (-gen-extract-word): Handle fields shorter than entire word.
5753 * fr30.cpu (ldi32m): Don't use for disassembly.
5755 Wed Nov 18 21:34:41 1998 Dave Brolley <brolley@cygnus.com>
5757 * fr30.cpu (int): Implement it.
5759 1998-11-18 Doug Evans <devans@casey.cygnus.com>
5761 * rtx-funcs.scm (nop): Fix C code.
5763 * rtl.scm (semantic-in-out-operands): Fix setting of sem-attrs.
5765 * fr30.cpu (f-i32): New ifield.
5768 (ldi32m): New macro insn.
5769 (inte): Provide simple version for now.
5771 * sim-arch.scm: New file.
5772 * sim.scm: Move architecture support generation to sim-arch.scm.
5773 * cgen-sim.scm: Load sim-arch.scm.
5776 * hardware.scm (pc?) New proc.
5777 (class <hardware-base>): Rewrite method 'pc?.
5778 (class <hardware>): Forward 'pc? to the hardware type.
5779 (class <hw-pc>): New method 'pc?.
5781 Add support for variable length ISAs.
5782 * ifield.scm (ifld-beyond-base?): New proc.
5783 * m32r.cpu: Remove integral-insn? spec.
5784 * mach.scm (arch:derived,arch:set-derived!): New procs.
5785 (arch:app-data,arch:set-app-data!): New procs.
5786 (class <arch>): New members derived, app-data.
5787 (class <cpu>): Delete member integral-insn?.
5788 (cpu:integral-insn?): Delete.
5789 (-cpu-parse): Delete arg integral-insn?. All callers updated.
5790 (-cpu-read): Delete integral-insn? support.
5791 (state:decode-assist): Delete.
5792 (state:int-insn?): Delete.
5793 (<derived-arch-data>): New class.
5794 (-adata-set-derived!): New proc.
5795 (mach-finish!): Call it.
5796 * opcodes.scm (<hw-asm>, method gen-extract): Pass pc to C handler.
5797 (gen-operand-instance): Add COND_REF support.
5798 (gen-operand-instance-table): Ditto.
5799 (gen-hash-defines): Update.
5800 (gen-extract-switch): Update type of `insn_value' arg.
5801 (gen-opcode-open): Update type of `value' arg of dis_hash_insn.
5802 * rtl.scm (-rtx-ref-type): Renamed from -rtx-set?. All callers
5804 (semantic-in-out-operands): Compute UNCOND-CTI,COND-CTI from rtl.
5805 * sim-cpu.scm (gen-define-fields): Create vars to hold insn value
5806 beyond the base insn (for large insns).
5807 (-gen-extract-beyond-var-list): New proc.
5808 (gen-extract-fields): Handle large insns.
5809 (-gen-write-case): Update sem_arg computation.
5810 Update initial vpc computation.
5811 (gen-semantic-fn): Ditto. Update type of `insn'.
5812 (-gen-sem-case): Update sem_arg computation.
5813 Update initial vpc computation.
5814 * sim.scm (<ifield>, gen-ifld-extract): Renamed from `extract'.
5815 (-gen-extract-word): New proc.
5816 (<ifield>): New method gen-ifld-extract-beyond.
5817 (gen-ifld-extract-beyond): New proc.
5818 * types.scm (bitrange-overlap?): New proc.
5820 * utils.scm (bits->bytes): New proc.
5821 (bytes->bits): New proc.
5823 Move extraction support into decoder.
5824 * sim-cpu.scm (-gen-record-args,-gen-record-profile-args,
5825 -gen-extractor,-gen-all-extractors,cgen-extract.c): Move extraction
5826 support to sim-decode.scm.
5827 * sim-decode.scm (-gen-decode-insn-table): Change decoder data to
5828 be array of IDESC,FMT entries. Make the array const.
5829 (-gen-gcc-label-table): Make array const.
5830 (-gen-decode-switch): Branch to extraction code after insn has been
5832 (-gen-decode-insn-globals): Delete extract handler from
5834 (gen-decode-fn): Add extraction support.
5835 (-gen-sem-fn-decls): Delete extraction fn decls.
5836 (-gen-idesc-decls): Update @cpu@_decode decl.
5837 (-gen-idesc-init-fn): Delete extraction support.
5838 (-gen-extract-decls): New proc.
5840 * sim-cpu.scm (cgen-sem-switch.c): Update switch test.
5841 (sim-finish!): Surround pbb only code with #if WITH_SCACHE_PBB.
5843 * sim-decode.scm (build-decode-table-entry): New arg invalid insn.
5844 All callers updated.
5845 (table-entry:make): Record insn value as insn object, not name.
5848 * hobbit.scm (path_basename): Renamed from `basename' to avoid
5849 collision with C function.
5850 (path_dirname): Similarily.
5851 * hobbit.c,hobbit.h: Rebuild.
5853 Wed Nov 18 11:26:17 1998 Dave Brolley <brolley@cygnus.com>
5855 * fr30.cpu (dir2r15-predec-stub): Reference to R15 must be indirect.
5857 Mon Nov 16 19:19:50 1998 Dave Brolley <brolley@cygnus.com>
5859 * fr30.cpu: Implement more instruction stubs.
5861 Thu Nov 12 19:20:28 1998 Dave Brolley <brolley@cygnus.com>
5863 * fr30.cpu: Implement more instruction stubs.
5865 Tue Nov 10 10:53:55 1998 Doug Evans <devans@canuck.cygnus.com>
5867 * rtl.scm (-rtx-expr-mode-name): Handle sequence locals.
5869 * rtx-funcs.scm (zflag:,zflag,nflag:,nflag): New rtx fns.
5871 * operand.scm (<pc>, method make!): FAKE renamed to SEM-ONLY.
5872 (op:std-attrs): Ditto.
5873 * opcodes.scm (gen-operand-instance): Ditto.
5874 (gen-switch): Ditto.
5875 * m32r.cpu (condbit,accum): Update.
5876 * fr30.cpu (nbit,vbit,zbit,cbit): Update.
5878 Mon Nov 9 14:30:51 1998 Doug Evans <devans@seba.cygnus.com>
5880 * enum.scm (-enum-read): Fix typo.
5882 * iformat.scm (-ifmt-search-key): Simplify a little.
5884 Mon Nov 9 12:07:56 1998 Dave Brolley <brolley@cygnus.com>
5886 * doc/porting: semantics.c -> sem.c.
5887 * Makefile.in: Regenerate.
5888 * fr30.cpu (add): Change ADD to add. Add more registers and set
5889 status bits on 'add' instruction.
5891 Fri Nov 6 18:15:05 1998 James E Wilson <wilson@wilson-pc.cygnus.com>
5893 * sim.scm (-gen-arch-model-decls): Default MAX_UNITS to 1 instead
5896 Fri Nov 6 17:43:16 1998 Doug Evans <devans@seba.cygnus.com>
5898 * minsn.scm (minsn:enum): Update, call current-arch-name.
5900 * pmacros.scm (-pmacro-expand): Make `cep' a variable.
5902 * Makefile.am (CGEN_HOB_INPUT_FILES): Add pmacros.scm,enum.scm,
5903 mach.scm,model.scm,types.scm,ifield.scm,minsn.scm.
5904 (ARCH,CGEN,CGENFLAGS): New variables.
5905 (gas-test,sim-test): New rules.
5906 * Makefile.in: Rebuild.
5907 * configure.in (arch): Define.
5908 * configure: Rebuild.
5910 * cgen-hob.scm (*UNSPECIFIED*): Renamed from UNSPECIFIED.
5911 * All .scm files: Ditto.
5913 * dev.scm: Fix gas-test call to cpu-load.
5914 * gas-test.scm: Clean up pass to remove bit-rot.
5915 * sim-test.scm: Ditto.
5917 * enum.scm (read-enum): Fix typo in `vals' handling.
5919 * hardware.scm (-parse-hw-type): Fix typo.
5920 (parse-hardware): Rename `asm' to `aasm' to avoid GCC reserved word.
5921 (def-hardware,define-normal-hardware): Ditto.
5923 * hobbit.scm (*case-sensitive-flag*): New configuration variable.
5924 (display-var): Use it.
5925 * hobbit.c: Rebuild.
5926 * hobbit.h: Rebuild.
5928 * ifield.scm (-ifield-read): Rename local `length' to `length-' to
5929 avoid hobbit problem.
5930 * mach.scm (-cpu-read): Rename local `parallel-insns' to
5931 `parallel-insns-' to avoid hobbit problem.
5933 Fri Nov 6 17:19:12 1998 Doug Evans <devans@canuck.cygnus.com>
5935 * m32r.opc (parse_hi16): Fix call to cgen_parse_address.
5936 (parse_slo16,parse_ulo16): Ditto.
5937 * opcodes.scm (<hw-address>, method gen-parse): Ditto.
5939 Thu Nov 5 13:04:53 1998 Doug Evans <devans@canuck.cygnus.com>
5941 * Makefile.am (GUILELDFLAGS,GUILELDADD): New variables.
5942 (cgen_LDFLAGS,cgen_LDADD,hob.x): Use them.
5943 * Makefile.in: Rebuild.
5944 * insn.scm (define-normal-insn): Expand pmacros.
5945 * mode.scm (<mode>): New member `host?'. All uses updated.
5946 (mode:host?): New proc.
5947 * rtl.scm (define-rtx-node): Make a syntax proc, not a macro.
5948 (define-rtx-syntax-node,define-rtx-macro-node): Ditto.
5949 (define-rtx-dual-mode): Ditto.
5950 (s-index-of): New proc.
5951 (s-unop): Use plain C for host mode operations.
5952 (s-binop,s-shop,s-boolifop,s-cmpop): Ditto.
5953 * rtx-funcs.scm (index-of): New rtx function.
5954 * sim.scm (<hw-index>): New method cxmake-get.
5956 Wed Nov 4 23:58:08 1998 Doug Evans <devans@seba.cygnus.com>
5958 * sim-cpu.scm (-gen-engine-decls): Delete.
5960 Wed Nov 4 18:40:47 1998 Dave Brolley <brolley@cygnus.com>
5962 * doc/rtl (Example): Correct Typo.
5963 * doc/porting: Add 'make dep' step to opcodes port instructions.
5964 * fr30.opc: New file.
5965 * fr30.cpu: New file.
5967 Wed Oct 28 13:36:15 1998 Doug Evans <devans@canuck.cygnus.com>
5969 * configure.in: Handle guile $exec_prefix = $prefix/foo.
5970 * Makefile.am (GUILEINCDIR): New variable.
5972 * configure: Regenerate.
5973 * Makefile.in: Ditto.
5974 * aclocal.m4: Ditto.
5976 Mon Oct 19 13:19:34 1998 Doug Evans <devans@seba.cygnus.com>
5978 * sim-cpu.scm (cgen-extract.c): Delete #include cpu-sim.h
5979 (cgen-semantics.c): Ditto.
5980 * sim-decode.scm (cgen-decode.c): Delete #include cpu-sim.h,cpu-opc.h.
5981 * sim-model.scm (cgen-model.c): Ditto.
5982 * sim.scm (cgen-arch.h): Delete #include @arch@-opc.h.
5983 (cgen-arch.c): Delete #include cpu-sim.h,cpu-opc.h.
5985 * opcodes.scm (read-cpu.opc): Handle empty file.
5987 * cos.scm (-elm-make-method-setter): Fix typo.
5989 * cpu.scm (-init-parse-cpu!): Call types-init!.
5990 (-finish-parse-cpu!): Call types-finish!.
5991 * ifield.scm (<ifield>): Delete members start,length.
5992 New member bitrange.
5993 (<ifield>, methods field-start,field-length): Update.
5994 (fld:start): New arg insn-len. All callers updated.
5995 (<ifield>, methods field-mask,field-value): Update.
5996 (-ifield-parse): Update.
5997 (ifield-init!): Update.
5998 * iformat.scm (compute-insn-length): Simplify.
5999 (compute-insn-mask): Update.
6000 * insn.scm (insn:value): Update.
6001 * mach.scm (<arch-data>): New members default-insn-bitsize,insn-lsb0?.
6002 (current-arch-default-insn-bitsize): New proc.
6003 (current-arch-insn-lsb0?): New proc.
6004 (-arch-parse,-arch-read): Update.
6005 (<cpu>): New member file-transform.
6006 (-cpu-parse,-cpu-read): Update.
6007 * opcodes.scm (<hw-asm>, method gen-extract): Pass ex_info to handler.
6008 (gen-hash-defines): Define CGEN_INSN_LSB0_P.
6009 (CGEN_INT_INSN_P): Renamed from CGEN_INT_INSN.
6010 (gen-insert-switch): Update args of @arch@_cgen_insert_operand.
6011 (gen-extract-switch): Update args of @arch@_cgen_extract_operand.
6012 (gen-opcode-open): Set CGEN_OPCODE_INSN_ENDIAN.
6013 * operand.scm (op:start): Update call to field-start method.
6014 * sim-decode.scm (opcode-slots): New arg lsb0?.
6015 (fill-slot!,build-slots): Ditto.
6016 (build-decode-table-entry,build-decode-table-guts): Ditto.
6017 (gen-decoder-table,gen-decoder-switch,gen-decoder): Ditto.
6018 (gen-decode-fn): Ditto.
6019 (cgen-decode.c): Update call to gen-decode-fn.
6020 * sim.scm (gen-argbuf-type): Move `semantic' to cpu specific part.
6021 (-gen-cpu-header,-gen-cpuall-includes): New procs.
6022 (cgen-cpuall.h): Call -gen-cpuall-includes.
6023 * types.scm (<bitrange>): New class.
6024 (types-init!,types-finish!): New procs.
6025 * utils-cgen.scm (parse-number): New proc.
6026 (parse-boolean): New proc.
6027 * utils.scm (word-value): Renamed from shift-bits, rewrite.
6028 (word-mask): Rewrite.
6029 * m32r.cpu (define-arch): New fields default-insn-bitsize,insn-lsb0?.
6030 (m32rxf): New field `file-transform'.
6031 * m32r.opc (my_print_insn): print_int_insn -> print_insn.
6033 * hobbit.h: Fix include file name.
6035 Fri Oct 9 16:58:10 1998 Doug Evans <devans@seba.cygnus.com>
6037 * slib: New directory of slib files used by cgen/hobbit.
6038 * hobbit.scm: New file.
6039 * hobbit.c: New file.
6040 * hobbit.h: New file.
6041 * hobscmif.h: New file.
6042 * hob-main.c: New file.
6043 * hobslib.scm: New file.
6045 * Makefile.am: Add support for compiling hobbit, and using compiled
6046 version of hobbit to compile cgen.
6047 * Makefile.in: Regenerate.
6048 * configure.in: Support --with-hobbit.
6049 * configure: Regenerate.
6050 * acconfig.h (WITH_HOBBIT): Add.
6051 * config.in: Regenerate.
6053 * rtl.scm: New file, was cdl-c.scm.
6054 Definition of rtx funcs moved to rtx-funcs.scm.
6055 (semantic-in-out-operands): Rewrite to compute object form of
6057 * rtx-funcs.scm: New file.
6059 * cgen-gh.c: #include "config.h".
6060 (gh_cadddr,gh_cddddr): New fns.
6061 (cgh_vector_to_list): New fn.
6062 (cgh_map1,cgh_map2,cgh_map1_fn2): Rewrite.
6063 (cgh_init): Prefix qsort procs with "cgh-".
6064 * cgen-gh.h (gh_cadddr,gh_cddddr,cgh_vector_to_list): Declare.
6065 * cgen.c: #include "config.h".
6067 * attr.scm (bitset-attr?): New proc.
6068 (<bitset-attribute>, method parse-value): Value syntax changed from
6069 (val1 val2 ...) to val1,val2,....
6070 (<bitset-attribute>): New method gen-value.
6071 (<integer-attribute>): New method gen-value.
6072 (<enum-attribute>): New method gen-value.
6073 * cpu.scm: Disable debugging evaluator if (not (defined? 'DEBUG-EVAL)).
6074 (<reader>): New class.
6075 (CURRENT-ARCH,CURRENT-READER): New globals.
6076 (keep-mach?): Move here from mach.scm.
6077 * mach.scm (arch,arch-comment,arch-default-mach): Delete.
6078 (<arch>): New class.
6079 (<arch-data>): New class.
6080 (<cpu>): Make subclass of <ident>.
6081 (*ENDIAN* variables): Delete.
6082 (process-state-vars): Delete.
6083 (mach-finish!): Add `base' value to MACH attribute.
6084 * hardware.scm (<hardware>): Make subclass of <ident>.
6085 (hw:std-attrs): New global.
6086 (hw-profilable?): New proc.
6087 * ifield.scm (<ifield>): Make subclass of <ident>.
6088 (sort-ifield-list): Move here from iformat.scm.
6089 * iformat.scm (<iformat>): Renamed from <insn-format>.
6090 Make subclass of <ident>.
6091 (-ifmt-search-key): Include cti? in categorization of formats.
6092 (ifmt-analyze): Compile semantics (turn to object form).
6093 * insn.scm (<insn>): Make subclass of <ident>.
6094 New member compiled-semantics.
6095 (insn:std-attrs): Add SKIP-CTI, VIRTUAL.
6096 * mode.scm (<mode>): Make subclass of <ident>.
6098 * model.scm (<unit>): Make subclass of <ident>.
6099 New members inputs,outputs.
6100 (<model>): Make subclass of <ident>. New member state.
6101 (-unit-parse): Parse inputs,outputs.
6102 (<iunit>): New class.
6103 (-insn-timing-parse-model): New proc.
6104 (parse-insn-timing): Function unit spec rewritten.
6105 * operand.scm (<operand>): Make subclass of <ident>.
6106 New members sem-name,num,cond? New method gen-pretty-name.
6107 (hw-index-scalar): New global.
6108 (op-nub-hw): Move here from rtl.scm.
6109 (op:lookup-sem-name,op-profilable?): New procs.
6110 * pmacros.scm: Rewrite to pass through hobbit.
6111 * utils-cgen.scm (gen-attr-defn): Simplify using new gen-value method.
6112 * utils.scm (logit): Make a macro.
6113 (bit-set?): Rewrite.
6114 (high-part): Rewrite.
6116 * m32r.cpu (define-arch): Move to top of file.
6117 (cpu family m32rbf): Renamed from m32rb.
6118 (model m32r/d): Function unit spec rewritten.
6119 (all insns): Ditto. Replace UBI with BI.
6121 * opcodes.scm (gen-attr-table-decls): Declare
6122 @arch@_cgen_hw_attr_table.
6123 (gen-attr-table-defns): Generate hw attribute table.
6125 * sim-cpu.scm (-gen-engine-decls): New proc.
6126 (-gen-model-decls): New proc.
6127 (gen-parallel-exec-type): Add new member `written' to struct parexec.
6128 (-gen-record-args): Add SEM_BRANCH_INIT_EXTRACT if cti insn.
6129 (-gen-record-profile-args): Simplify.
6130 (-gen-parallel-sem-case): Delete.
6131 (gen-semantic-fn): Emit SEM_BRANCH_{INIT,FINI} if cti insn.
6132 New local `written'. Delete profiling code.
6133 (-gen-sem-case): Ditto.
6134 (-uncond-written-mask,-any-cond-written?): New procs.
6135 (cgen-sem-switch.c): Include duplicates of insns that can be executed
6136 parallelly or serially, and write-back handlers for all parallel insns.
6137 * sim-decode.scm (-gen-decode-insn-globals): Add parallel write-back
6138 support to initialization of struct insn_sem.
6139 (-gen-idesc-decls): Add parallel write-back support to struct idesc.
6140 (-gen-insn-sem-type): Add parallel write-back support to struct
6142 (-gen-idesc-init-fn): Add support for virtual insns.
6143 Add parallel write-back support.
6144 * sim-model.scm (gen-model-profile-fn): Delete
6145 (-gen-model-fn-decls): New proc.
6146 (-gen-model-insn-fn,-gen-model-insn-fns): New procs.
6147 (-gen-model-init-fn): New proc.
6148 (-gen-mach-defns): Initialize insn-name lookup and fast/full engine_fn
6149 members in @mach@_init_cpu.
6150 (cgen-model.c): Generate model handlers for each insn.
6151 * sim.scm (gen-define-field-macro): Cti insns handled differently.
6152 (<hw-pc>): New method gen-write.
6153 (<hw-register>, method gen-write): New arg `mode'.
6154 (<hw-register>): Delete method gen-record-profile!.
6155 New method gen-profile-index-type.
6156 (<hw-memory>, method gen-write): New arg `mode'.
6157 (<hw-address>, method gen-extract): Delete.
6158 (<hw-address>, method gen-write): New arg `mode'.
6159 (<hw-index>, method get-write-index): Rewrite.
6160 (<pc>, method cxmake-get-direct): Delete.
6161 (<pc>): New method cxmake-get. Comment out methods
6162 gen-set-quiet,gen-set-trace.
6163 (<operand>): New methods gen-argbuf-elm,gen-profile-argbuf-elm,
6164 gen-profile-index-type,gen-profile-code.
6165 Delete method gen-pretty-name. Rewrite method gen-write.
6166 Delete method cxmake-get-direct.
6167 (-op-gen-set-trace): Update `written'.
6168 (-op-gen-set-trace-parallel): Ditto.
6169 (-gen-hw-index-raw,-gen-hw-index): Handle strings.
6170 (gen-cpu-insn-enum-decl): Add extra entries for parallel
6171 insns and their write-back handlers.
6172 (insn-op-lookup): New proc.
6173 (<unit>): New method gen-profile-code.
6174 (<iunit>): New method gen-profile-code.
6175 (gen-argbuf-elm): Add profiling elements.
6176 (gen-argbuf-type): Define cti insns separately in their own struct.
6177 Add member `addr_cache' to this struct. Add entries for pbb virtual
6178 insns. Move semantic entries here from struct scache.
6179 Delete everything from struct scache except argbuf.
6180 (<insn>, method gen-profile-locals): Rewrite.
6181 (<insn>, method gen-profile-code): Rewrite.
6182 (sim-finish!): Create virtual pbb insns.
6184 Tue Sep 15 15:22:02 1998 Doug Evans <devans@canuck.cygnus.com>
6186 * m32r.cpu (h-cr): Add bbpc,bbpsw.
6187 (h-sm,h-bsm,h-ie,h-bie,h-bcond,h-bpc): Delete.
6188 (h-psw,h-bpsw,h-bbpsw): Define.
6189 (rte,trap): Handle bbpc,bbpsw.
6190 * opcodes.scm (max-operand-instances): Fix typo.
6191 * sim.scm (<hardware-base>, method 'fun-access?): Don't force virtual
6192 hardware elements to be fun-access.
6193 (-hw-gen-fun-get,-hw-gen-fun-set): Fix handling of scalars.
6195 Wed Sep 9 15:28:55 1998 Doug Evans <devans@canuck.cygnus.com>
6197 * m32r.cpu (trap): Pass `pc' to m32r_trap.
6199 Mon Aug 10 14:29:33 1998 Doug Evans <devans@canuck.cygnus.com>
6201 * opcodes.scm (gen-insn-table-entry): Comment out generation of cdx.
6203 Mon Aug 3 11:51:04 1998 Doug Evans <devans@seba.cygnus.com>
6205 * m32r.cpu (cpu m32rb): Renamed from m32r to distinguish from
6207 (mach m32r): Update.
6209 * mach.scm (mach:supports?): New proc.
6210 * sim-cpu.scm (gen-cpu-reg-access-{decls,defns}): Renamed from
6211 gen-reg-access-{decls,defns}.
6212 * sim.scm (gen-reg-access-{decl,defn}): New procs.
6213 (gen-mach-bfd-name): New proc.
6214 (gen-arch-reg-access-{decls,defns}): New procs.
6215 (cgen-arch.[ch]): Output register access cover fns.
6217 * hardware.scm (hardware-builtin!): Set print handlers for
6219 * m32r.opc (parse_hash,parse_hi16,parse_slo16,parse_ulo16): New arg
6221 (CGEN_PRINT_NORMAL,print_hash): Ditto.
6222 (my_print_insn): Ditto. Delete args buf, buflen.
6223 * opcodes.scm: Pass `od' (opcode-descriptor) to all C handlers.
6224 (-hw-asm-specs): Add `handlers' spec.
6225 (-parse-hw-asm): Lookup class at runtime. If no asm-spec, use
6227 (<hw-asm>): Renamed from <opval>. New elements parse,insert,extract,
6229 (<hw-asm>, gen-insert,gen-extract,gen-print): Use them.
6230 (<hw-asm>, parse!): New method.
6231 (gen-insn-table-entry): Print semantics.
6232 (gen-opcode-open): Renamed from gen-opcode-table.
6234 * utils.scm (string-write): No longer a macro.
6235 (-string-write): Handle procedure args.
6236 * opcodes.scm: Update all calls to string-write.
6237 * sim-cpu.scm: Ditto.
6238 * sim-decode.scm: Ditto.
6239 * sim-model.scm: Ditto.
6242 Fri Jul 31 14:40:38 1998 Doug Evans <devans@seba.cygnus.com>
6244 * opcodes.scm (cgen-ibd.h,gen-extra-ibd.h): New procs.
6245 (-gen-insn-builders,-gen-insn-builder): New procs.
6247 Fri Jul 24 11:38:59 1998 Doug Evans <devans@canuck.cygnus.com>
6249 * opcodes.scm (gen-syntax-entry): Fix bracketing for -Wall.
6250 (gen-opcode-table): Properly terminate comment.
6252 Tue Jul 21 10:51:42 1998 Doug Evans <devans@seba.cygnus.com>
6255 Clean up pass over everything, so starting fresh.