1 2005-07-05 Nick Clifton <nickc@redhat.com>
3 * cpu/iq2000.opc (parse_lo16, parse_mlo16): Make value parameter
4 unsigned in order to avoid compile time warnings about sign
7 2005-07-01 Nick Clifton <nickc@redhat.com>
9 * desc-cpu.scm: Update to ISO C90 function declaration style.
10 * opc-asmdis.scm: Likewise.
11 * opc-ibld.scm: Likewise.
12 * opc-itab.scm: Likewise.
13 * cpu/fr30.opc: Likewise.
14 * cpu/i960.opc: Likewise.
15 * cpu/ip2k.opc: Likewise.
16 * cpu/iq2000.opc: Likewise.
17 * cpu/m32r.opc: Likewise.
18 * cpu/openrisc.opc: Likewise.
19 * cpu/sh.opc: Likewise.
20 * cpu/sparc.opc: Likewise.
21 * cpu/xstormy16.opc: Likewise.
23 2005-06-15 Dave Brolley <brolley@redhat.com>
25 * sid-cpu.scm (-gen-hw-stream-and-destream-fns): New function.
26 (cgen-cpu.h): Call it.
28 Contributed on behalf of Graydon Hoare
29 2001-06-05 graydon hoare <graydon@redhat.com>
31 * utils.scm (foldl): Define.
35 (intersection): Simplify.
36 * sid.scm : Set APPLICATION to SID-SIMULATOR.
37 (-op-gen-delayed-set-maybe-trace): Define.
38 (<operand> 'gen-set-{quiet,trace}): Delegate to
39 op-gen-delayed-set-quiet etc. Note: this is still a little tangled
40 up and needs cleaning.
41 (-with-parallel?): Hardwire with-parallel to #t.
42 (<operand> 'cxmake-get): Replace with lookahead-aware code
43 * sid-decode.scm: Remove per-insn writeback fns.
44 (-gen-idesc-decls): Redefine sem_fn type.
45 * sid-cpu.scm (gen-write-stack-structure): Replace parexec stuff
46 with write stack stuff.
47 (cgen-write.cxx): Replace per-insn writebacks with single write
48 stack writeback. Add write stack reset function.
49 (-gen-scache-semantic-fn insn): Replace parexec stuff with write
51 * rtl-c.scm (xop): Clone operand into delayed operand if #:delayed
53 (delay): Set #:delayed attribute to calculated delay, update
54 maximum delay of cpu, check (delay ...) usage.
55 * operand.scm (<operand>): Add delayed slot to <operand>.
56 * mach.scm (<cpu>): Add max-delay slot to <cpu>.
57 * dev.scm (load-sid): Set APPLICATION to SID-SIMULATOR.
58 * doc/rtl.texi (Expressions): Add section on (delay ...).
60 2005-06-13 Jim Blandy <jimb@redhat.com>
62 * pmacros.scm (-pmacro-upcase, -pmacro-downcase): Handle symbols
65 2005-06-07 Zack Weinberg <zack@codesourcery.com>
67 * doc/porting.texi: Change all mention of md_apply_fix3 and
68 gas_cgen_md_apply_fix3 to md_apply_fix and gas_cgen_md_apply_fix
71 2005-05-18 Dave Brolley <brolley@redhat.com>
73 * utils-sim.scm (-gen-decode-default-entry): New function.
74 (-gen-decode-insn-entry): Now takes 'invalid-insn' argument. Generate
75 code to check that all opcodes bits match.
76 (-gen-decoder-switch): Use -gen-decode-default-entry.
78 2005-05-16 Jim Blandy <jimb@redhat.com>
80 * sid.scm (gen-ifetch): Require BITSIZE to be exactly the size
81 fetched by one of our GETIMEM* methods.
82 * utils-gen.scm (-extract-chunk-specs): Always fetch full
83 base-insn-sized chunks.
85 2005-05-10 Nick Clifton <nickc@redhat.com>
87 * Update the address and phone number of the FSF organization in
88 the GPL notices in the following files:
89 COPYING.CGEN, utils.scm, cpu/iq2000m.cpu, cpu/openrisc.cpu,
90 cpu/powerpc.cpu, slib/random.scm
92 2005-05-06 Jim Blandy <jimb@redhat.com>
94 * pprint.scm, cos-pprint.scm: Add documentation.
96 * pprint.scm (pprint): Don't wipe out elide-table after each call.
98 * pprint.scm, cos-pprint.scm: New files.
100 2005-04-04 Nick Clifton <nickc@redhat.com>
102 * opcodes.scm (-gen-parse-address): Initialise value to zero to
103 avoid a compile time warning.
105 2005-03-18 Nick Clifton <nickc@redhat.com>
107 * cpu/ip2k.opc (parse_lit8): Change wording of error message to
108 "percent-operand" from "%operand" as the latter confuses xgettext
109 into thinking that it is a C printf formating directive, which
110 prevents proper translation.
112 2005-02-23 Nick Clifton <nickc@redhat.com>
114 * opcodes.scm (gen-parse-number): Add a cast to the desired
115 pointer signed'ness in order to prevent compile time warnings.
116 * cpu/ip2k.opc: Fixed compile time warnings about differing
117 signed'ness of pointers passed to functions.
118 * cpu/iq2000.opc: Likewise.
119 * cpu/m32r.opc: Likewise.
120 * cpu/openrisc.opc: Likewise.
121 * cpu/xstormy16.opc: Likewise.
123 2005-02-22 Alan Modra <amodra@bigpond.net.au>
125 * desc-cpu.scm (gen-ifld-decls): Move cgen_ifld_table from here..
126 (cgen-desc.h): ..to here, after opcode/cgen.h include.
128 2005-02-16 Dave Brolley <brolley@redhat.com>
130 * utils.scm: Update copyright years.
131 * utils-gen.scm (gen-ifld-extract): Pass base-length to -gen-ifld-extract-base.
132 * sid.scm (gen-ifetch): Handle the case where bitsize == 24.
133 * operand.scm (-derived-operand-parse): Move logit message from level 1
136 2005-02-15 Nick Clifton <nickc@redhat.com>
138 * opc-itab.scm (-gen-ifmt-table-1): Add an ATTRIBUTE_UNUSED to
139 prevent compile time warning messages.
140 * opc-opinst.scm (-gen-operand-instance-table): Likewise.
141 * utils-gen.scm (attr-int-gen-defn): Likewise.
142 (attr-gen-defn): Likewise.
143 * cpu/ip2k.opc (parse_addr16_p): Remove unused function.
144 (print_dollarhex16): Remove unused function.
146 2005-02-15 Jim Blandy <jimb@redhat.com>
148 * guile.scm (cgen-call-with-debugging): Doc fix.
150 Make backtraces work more reliably.
151 * guile.scm: Set up debugging parameters, and enable debugging and
152 source positions while loading.
153 (cgen-call-with-debugging, cgen-debugging-stack-start): New
155 * read.scm: Don't set debugging parameters here.
156 (catch-with-backtrace): Function deleted.
157 (-cgen): Simply note the presence or absence of the -b option.
158 Pass the flag to cgen-call-with-debugging, so debugging is turned
159 off here if the user didn't request it, for faster computation.
160 (cgen): Call cgen-debugging-stack-start here, instead of
161 catch-with-backtrace.
163 * Makefile.am (GUILE): Explicitly load guile.scm here, and leave a
165 (desc, html, opcodes, sim-arch, sim-cpu, gas-test, sim-test):
166 Don't write out the trailing -s here.
167 * Makefile.in: Regenerated.
168 * cgen-doc.scm, cgen-gas.scm, cgen-stest.scm): Don't load
169 fixup.scm here; let the caller decide which Scheme's customization
171 * dev.scm: Load guile.scm, not fixup.scm.
172 * fixup.scm: Deleted; contents have all moved to guile.scm.
175 * guile.scm (debug-write): New function.
177 2005-02-14 Jim Blandy <jimb@redhat.com>
179 * pmacros.scm (pmacros-init!): For .eval macros, use eval1 as the
180 transformer procedure, not eval. Transformer procedures take one
183 2005-02-11 Nick Clifton <nickc@redhat.com>
185 * cpu/iq2000.opc (parse_jtargq10): Change type of valuep argument
186 to 'bfd_vma *' in order avoid compile time warning message.
188 2005-02-09 Jim Blandy <jimb@redhat.com>
190 * cgen-sim.scm (load-files): Don't load fixup.scm. (See
191 corresponding change in the sim/common directory.)
193 2005-02-07 Jim Blandy <jimb@redhat.com>
195 * cgen-opc.scm: Don't load fixup.scm here. (See corresponding
196 changes in the opcodes directory.)
198 * guile.scm: New file, containing Guile-specific definitions and
199 adaptations. This is loaded by the app-specific shell scripts.
200 Initially identical to fixup.scm.
201 * cgen-sid.scm: Don't load fixup.scm here.
203 * cos.scm: Profile elm-xset! when requested, not elm-set!; the
206 2005-01-27 Jim Blandy <jimb@redhat.com>
208 * utils.scm (string/symbol->append): Renamed from 'concat'.
209 * opcodes.scm (gen-switch): Use new name.
210 * insn.scm (-sub-insn-make!): Same.
211 * rtl.scm (rtx-dump): Same.
212 * semantics.scm (semantic-compile): Same.
214 2005-01-20 Jim Blandy <jimb@redhat.com>
216 * opcodes.scm (gen-switch): Use concat instead of string-map.
218 * utils.scm (concat): New function.
219 * insn.scm (-sub-insn-make!): Use concat instead of string-map.
220 * rtl.scm (rtx-dump): Same.
221 * semantics.scm (semantic-compile): Same.
223 2004-12-16 Jim Blandy <jimb@redhat.com>
225 * utils-cgen.scm (parse-name): Don't assume that string-map can be
226 applied to symbols. Process everything as strings, and then
227 convert to a symbol at the end.
229 * read.scm (debug-repl): Temporarily redirect input and output to
230 /dev/tty while we debug, so we don't interfere with whatever CGEN
231 is reading or writing.
232 * utils.scm (setter-getter-fluid-let, with-input-and-output-to):
235 2004-11-15 Michael K. Lechner <mike.lechner@gmail.com>
237 * cpu/iq2000.cpu: Added quotes around macro arguments so that they
238 will work with newer versions of guile.
240 2004-10-27 Nick Clifton <nickc@redhat.com>
242 * cpu/iq2000m.cpu: Import latest version from cpu/ directory.
243 * cpu/iq2000.cpu: Likewise.
245 2004-07-21 DJ Delorie <dj@redhat.com>
247 * cpu/xstormy16.cpu (movhmemgr): Use hmem8, not lmem8.
249 2003-03-14 Frank Ch. Eigler <fche@redhat.com>
251 * cpu/iq2000.opc (parse_jtargq10): Add ATTRIBUTE_UNUSED on unused args.
252 (parse_jtargq10, iq2000_cgen_isa_register, parse_mlo16): Declare.
254 2004-03-30 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
256 * cpu/m32r.opc (parse_hi16): Fixed shigh(0xffff8000) bug.
258 2004-03-22 Dave Brolley <brolley@redhat.com>
260 * utils.scm (copyright-fsf): Update copyright years.
261 (copyright-red-hat): Ditto.
262 * sid.scm (-op-gen-set-trace): Generate trace code before semantic
264 (-op-gen-set-trace-parallel): Ditto.
266 2004-02-10 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.dot.com>
268 * cpu/m32r.opc (my_print_insn): Fixed incorrect output when
269 disassembling codes for 0x*2 addresses.
271 2004-01-29 Dave Brolley <brolley@redhat.com>
273 * decode.scm (-opcode-slots): For short insns, generate 'opcode' with
274 zeroes in the extra bit positions and generate 'opcode-mask' with ones
275 in the extra bit positions.
277 2003-12-15 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
279 * cpu/m32r.cpu: Add PIPE_O attribute to "pop" instruction.
281 2003-12-04 Alan Modra <amodra@bigpond.net.au>
283 * cpu/openrisc.opc (openrisc_sign_extend_16bit): Don't rely on
284 "short" being 16 bit.
285 (parse_hi16): Likewise. Fix type-punned pointer warnings too, and
286 internationalize error message.
287 (parse_lo16): Likewise. Remove useless code.
289 2003-12-03 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
291 * cpu/m32r.cpu : Add new model m32r2.
292 Add new instructions.
293 Replace occurrances of 'Mitsubishi' with 'Renesas'.
294 Changed PIPE attr of push from O to OS.
295 Care for Little-endian of M32R.
296 * cpu/m32r.opc (CGEN_DIS_HASH, my_print_insn):
297 Care for Little-endian of M32R.
298 (parse_slo16): signed extension for value.
300 2003-10-26 Dave Brolley <brolley@redhat.com>
302 * sid-decode.scm (-gen-record-profile-args): Test trace_counter_p
303 and final_insn_count_p. Don't test WITH_PROFILE_MODEL_P.
304 (-gen-extract-fn): Call -gen-record-profile-args.
306 2003-10-21 Dave Brolley <brolley@redhat.com>
308 * sid-model.scm (-gen-model-class-decls): Generate MAX_UNITS as
310 * decode.scm (-opcode-slots): Correct typo in logit call.
312 2003-10-09 Jim Blandy <jimb@redhat.com>
314 * desc-cpu.scm (gen-hw-table-decls): Emit an 'extern' declaration
315 for @arch@_cgen_hw_table. GDB needs to be able to find this.
317 * mach.scm (def-isa-attr!): hardware can have ISA attributes, too.
319 2003-10-06 Dave Brolley <brolley@redhat.com>
321 * gen-all-doc: Add fr550.
323 2003-09-11 Doug Evans <dje@sebabeach.org>
325 * Makefile.am (ARCHFILE): New var.
326 (desc): Pass $(ARCHFILE) for -a parm, not $(ARCH).
327 (html,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Ditto.
328 * Makefile.in: Regenerate.
330 2003-09-08 Dave Brolley <brolley@redhat.com>
332 On behalf of Doug Evans <dje@sebabeach.org>
333 Pass in paths to input files, instead of assuming they live in
334 $srcdir/cpu. Plus misc. option processing cleanup.
335 * cgen-doc.scm (doc-arguments): Make options strings not symbols.
336 Add pre-process pass to all options.
337 * cgen-gas.scm (gas-arguments): Ditto.
338 * cgen-sid.scm (sim-arguments): Ditto.
339 * cgen-sim.scm (sim-arguments): Ditto.
340 * cgen-stest.scm (stest-arguments): Ditto.
341 * cgen-opc.scm (opc-arguments): Ditto. New argument -OPC.
342 (-opc-file-path): New global.
343 (opc-file-path): New fn.
344 * opcodes.scm (read-cpu.opc): Replace srcdir,cpu args with opc-file.
346 (gen-extra-cpu.h,gen-extra-cpu.c,gen-extra-opc.h,gen-extra-opc.c,
347 gen-extra-asm.c,gen-extra-dis.c,gen-extra-ibld.h,gen-extra-ibld.c):
348 Replace srcdir arg with opc-file. All callers updated.
349 * read.scm (-opt-spec-update): Delete.
350 (opt-get-first-pass,opt-get-second-pass): New fns.
351 (-cgen): Process application-specific arguments in two passes.
353 2003-08-29 Dave Brolley <brolley@redhat.com>
355 * cpu/frv.cpu: Removed.
356 * cpu/frv.opc: Removed.
358 2003-08-21 Nick Clifton <nickc@redhat.com>
360 * cpu/frv.cpu (mbtoh): Replace input parameter to
361 u-media-dual-expand and u-media-dual-btoh with output parameter.
362 (cmbtoh): Add profiling hack.
364 2003-08-19 Michael Snyder <msnyder@redhat.com>
366 * cpu/frv.cpu: Fix typo, Frintkeven -> FRintkeven
368 2003-08-07 Michael Meissner <gnu@the-meissners.org>
370 * opc-opinst.scm (-gen-operand-instance-table): Initialize all of
371 the elements for the END record of CGEN_OPINST, silencing warnings.
373 2003-07-15 Doug Evans <dje@sebabeach.org>
375 Add guile 1.6.4 support.
376 - empty list must be quoted
377 - string functions have stricter type checking
378 - eval now takes a second argument
379 - symbol-bound? is deprecated
380 * attr.scm (-attr-parse): Use stringsym-append to build errtxt.
381 (bitset-attr->list): Ensure arg to string-cut is a string.
382 (attr-parse): Ensure args to string-ref and string-drop1 are strings.
383 (<enum-attribute>,gen-value-for-defn): Fetch string name of self.
384 * cos.scm (-class-list): Must quote empty list.
385 (-class-parent-classes,-class-compute-class-desc): Ditto.
386 (class-make,make,object-reset!): Ditto.
387 (method-make-make!): Call eval1 instead of eval.
388 (method-make-forward!,method-make-virtual-forward!): Ditto.
389 * decode.scm (subdtable-add): Use stringsym-append instead of
391 (-gen-exprtable-name): Fetch string name of exprtable-entry-insn.
392 (-build-decode-table-entry): Fetch string name of insn.
393 * desc-cpu.scm (-gen-isa-table-defns): Fetch string name of isa.
394 (-gen-mach-table-defns): Ditto for mach.
395 (gen-ifld-defns): Ditto for ifld.
396 (gen-hw-table-defns): Ditto for hw.
397 (gen-operand-table): Ditto for op.
398 (gen-insn-table-entry): Ditto for insn.
399 * desc.scm (gen-attr-table-defn): Ditto for attr.
400 (<keyword>,gen-defn): Don't pass symbols to string-append.
401 * enum.scm (parse-enum-vals): Use symbolstr-append instead of
403 (enum-vals-upcase): Use symbol-upcase to build result.
404 (-enum-parse): Use stringsym-append to build errtxt.
405 * fixup.scm (*guile-major-version*,*guile-minor-version*): New globals.
406 (eval1): New function.
407 (symbol-bound?): Provide own version if >= guile 1.6.
408 * hardware.scm (define-keyword): Use string-append instead of
410 * html.scm (gen-html-header,gen-table-of-contents,gen-arch-intro,
411 cgen.html,cgen-insn.html): Convert current-arch-name to a string
413 (gen-list-entry): Handle either symbol or string `name' arg.
414 (gen-obj-doc-header): Fetch string name of `o' arg.
415 (define-cpu-intro): Ditto for cpu.
416 (gen-mach-intro): Ditto for mach.
417 (gen-model-intro): Ditto for model.
418 (gen-isa-intro): Ditto for isa.
419 (gen-machine-doc-1): Ditto for isa.
420 (gen-reg-doc-1): Convert mach to string first.
421 (gen-insn-doc-1): Ditto. Convert model/unit names to strings first.
422 (gen-insn-doc-list): Fetch string name of mach. Convert insn name
424 (gen-insn-categories): Fetch string name of mach. Convert
425 enum-val-name to string first.
426 (gen-insn-docs): Fetch string name of mach.
427 * ifield.scm (ifld-ilk): Result is a string.
428 * iformat.scm (-ifmt-search-key): Convert attr value to string first.
429 Fetch string name of ifld.
430 (-sfmt-search-key): Similarily for ifld and op.
431 * insn.scm (syntax-make): Fetch string name of syntax element.
432 * mach.scm (-cpu-parse): Use stringsym-append to build errtxt.
433 * minsn.scm (minsn-make-alias): Fetch string name of minsn.
434 * mode.scm (mode:c-type): Result is a string.
435 (mode:enum): Fetch string name of mode.
436 (-mode-parse): Use stringsym-append to build errtxt.
437 * model.scm (model:enum): Fetch string name of model.
438 (-model-parse): Use stringsym-append to build errtxt.
439 (parse-insn-timing): Must quote empty list.
440 * opc-itab.scm (-gen-minsn-table-entry): Fetch string name of minsn.
441 (-gen-minsn-opcode-entry): Ditto.
442 * opcodes.scm (<operand>,gen-function-name): `what' arg is a symbol,
444 (read-cpu.opc): Convert current-arch-name to a string before using.
445 * operand.scm (<operand>,gen-pretty-name): Ensure `name' is a string.
446 (<derived-operand>): Must quote empty list.
447 (op-sort): Simplify, call alpha-sort-obj-list to do sort.
448 * pgmr-tools.scm (pgmr-pretty-print-insn-value): Fetch string name
450 * pmacros.scm (-pmacro-build-lambda): Use eval1 instead of eval.
451 (-pmacro-sym): Must convert symbols to strings before passing to
453 (-pmacro-str): Ditto.
454 (pmacros-init!): Use eval1 instead of eval.
455 * read.scm (keep-mach-atlist?): Simplify, use bitset-attr->list.
456 (keep-isa-atlist?): Ditto.
457 (cmd-if): Use eval1 instead of eval.
458 * rtl-c.scm (<c-expr>,get-name): Fetch string name of self.
459 (-rtl-c-get): Fetch string name of src.
460 (s-unop): Ditto for mode.
461 (s-binop,s-binop-with-bit,s-shop,s-convop,s-cmpop): Ditto.
462 (-gen-par-temp-defns,subword): Ditto.
463 (join): Use stringsym-append instead of string-append.
464 * rtl-traverse.scm (rtx-option?): Convert option to string first.
465 (rtx-traverse-debug): Fetch string name of rtx-obj.
466 * rtl.scm (def-rtx-node): Use eval1 instead of eval.
467 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
468 (rtx-pretty-name): Result is a string.
469 (-rtx-hw-name): Use symbolstr-append instead of symbol-append.
470 * semantics.scm (semantic-compile): Simplify, use alpha-sort-obj-list.
471 * sid-cpu.scm (cgen-write.cxx): Convert current-arch-name to a string
473 (-gen-sfrag-case): Fetch string name of user.
474 * sid-model.scm (unit:enum): Fetch string name of unit.
475 * sid.scm (<hw-memory>,cxmake-get): Fetch string name of mode.
476 (<hw-memory>,gen-set-quiet): Ditto.
477 (gen-mode-defs): Ditto.
478 (sim-finish!): Convert current-arch-name to a string before using.
479 * sim-cpu.scm (-gen-scache-semantic-fn): Fetch string name of insn.
480 (-gen-no-scache-semantic-fn): Ditto.
481 (cgen-defs.h): Fetch string name of isa.
482 (cgen-read.c): Convert current-arch-name to a string before using.
483 (cgen-write.c): Ditto.
484 * sim-model.scm (unit:enum): Fetch string name of unit.
485 (gen-model-fn-decls): Use stringsym-append instead of string-append.
486 (-gen-model-timing-table): Fetch string name of model.
487 (-gen-mach-model-table): Ditto.
488 (-gen-mach-defns): Fetch string name of mach.
489 * sim.scm (gen-reg-access-defn): Fetch string name of hw.
490 (<hw-memory>,cxmake-get): Fetch string name of mode.
491 (<hw-memory>,gen-set-quiet): Ditto.
492 (gen-mode-defs): Ditto.
493 (sim-finish!): Must quote empty list.
494 * utils-cgen.scm (<ident>): Must quote empty list.
495 (obj:str-name): New fn.
496 (parse-comment): Result is a string.
497 (parse-symbol): Result is a symbol.
498 (parse-string): Result is a string.
499 (keyword-list?): Convert arg to string before calling string-ref.
500 (keyword-list->arg-list): Ditto.
501 (gen-attr-name): Convert attr-name to string first.
502 (alpha-sort-obj-list): Use symbol<? instead of string<?.
503 * utils-gen.scm (attr-gen-decl): Fetch string name of attr.
504 (gen-define-ifmt-ifields): Ditto for fld.
505 * utils.scm (gen-c-symbol): Ensure str is a string before calling
507 (gen-file-name): Ditto.
508 (symbol-downcase,symbol-upcase,symbol<?): New fns.
509 (stringsym-append,symbolstr-append,->string,->symbol): New fns.
510 (reduce): Call eval1 instead of eval.
511 * cpu/m32r.cpu (addi): Don't use `#.'.
513 * gen-all-sim: Fix some typos.
515 2003-07-08 Doug Evans <dje@sebabeach.org>
517 * gen-all-doc: Ensure run from cgen src dir.
518 * gen-all-opcodes: Build in ./tmp-opcodes. Don't delete dir when done.
519 * gen-all-sid: Similarily, in ./tmp-sid.
520 * gen-all-sim: Similarily, in ./tmp-sim.
522 2003-06-20 Doug Evans <dje@sebabeach.org>
524 * gen-all-sim: Add fr30,sh64 support. Only generate m32r by default.
526 2003-06-19 Doug Evans <dje@sebabeach.org>
528 * mach.scm (-ifld-already-defined?): New proc.
529 (current-ifld-add!): Use it.
530 (-op-already-defined?): New proc.
531 (current-op-add!): Use it.
532 (-insn-already-defined?): New proc.
533 (current-insn-add!): Use it.
534 (-minsn-already-defined?): New proc.
535 (current-minsn-add!): Use it.
536 (obj-isa-list): New proc.
537 (isa-supports?): Use it.
539 2003-06-10 Doug Evans <dje@sebabeach.org>
541 * insn.scm (insn-builtin!): RELAX renamed to RELAXABLE.
542 * cpu/m32r.cpu (all insns): Ditto.
544 * mach.scm (current-*-add!): Disallow redefinition. Make result
547 * gen-all-doc: Split arm and frv docs up a bit.
549 * cpu/arm.cpu: Add IDOC attribute.
550 * cpu/frv.cpu: Ditto.
551 * cpu/i960.cpu: Ditto.
552 * cpu/openrisc.cpu: Ditto.
553 * cpu/xstormy16.cpu: Ditto.
554 * cpu/m32r.cpu: Ditto.
555 (all insns): Explicitly specify IDOC attribute.
557 * Makefile.am (MACH,ISAS,INSN_FILE_NAME): New vars.
558 (desc,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Use MACH,ISAS.
559 (html): Use MACH,ISAS,INSN_FILE_NAME. Generate insn.html separately.
560 * Makefile.in: Regenerate.
561 * attr.scm (<integer-attribute>:parse-value-def): Implement.
562 (-attr-read): Defer computing default value until we know the type.
563 (attr-has-attr?): Delete, move contents to <attr-list>:has-attr?.
564 (<attr-list>:attr-present?): New method.
565 (atlist-attr-present?,obj-attr-present?): New fns.
566 (obj-has-attr-value?,obj-has-attr-value-no-default?): New fns.
567 (attr-builtin!): New insn attr IDOC.
568 * cgen-doc.scm (doc-arguments): New args -I,-N.
569 * enum.scm (parse-enum-vals): New arg errtxt, all callers updated.
570 Support comment as fourth element of enum value.
571 (enum-val-name,enum-val-value,enum-val-attrs,enum-val-comment): New fns.
572 * html.scm (gen-html-header): New arg kind, all callers updated.
573 (gen-table-of-contents): New arg insn-file, all callers updated.
574 (gen-list-entry,gen-doc-header): New fn.
575 (get-operands): Delete.
576 (gen-iformat-table): Rewrite.
577 (gen-insn-doc-1): Print constant-folded and trimmed semantics.
578 (gen-insn-doc-list): New args name, comment, insns. All callers updated.
579 (get-insn-properties,guess-insn-idoc-attr!): New fn.
580 (insn-sets-pc?,insn-refs-mem?,insn-uses-fpu?): New fns.
581 (get-insns-for-category,gen-categories-insn-lists): New fns.
582 (gen-insn-docs): Simplify each insn's semantics first.
583 Print insn tables sorted by IDOC categories.
584 (*insn-html-file-name*): New global.
585 (cgen-insn.html): New fn.
587 * insn.scm (<insn>): Create a setter for the `tmp' member.
588 * semantics.scm (insn-build-known-values): Renamed from
589 -build-known-values. All callers updated.
591 * rtl.scm: Move traveral/evaluation support to ...
592 * rtl-traverse.scm: New file.
593 * read.scm: Maybe-load rtl-traverse.scm.
595 * rtl.scm (-rtx-valid-types): Add SETRTX.
597 * rtx-funcs.scm (nop,parallel): Fix mode.
599 * utils.scm (eqv-lookup-index): New fn.
600 (assq-lookup-index): Renamed from lookup-index. All callers updated.
602 * dev.scm (load-doc): Set APPLICATION.
604 2003-06-10 Dave Brolley <brolley@redhat.com>
606 * sid-cpu.scm: Generate #include of config.h into @prefix@-sem.cxx.
607 * sid-decode.scm: Generate #include of config.h into
609 * sid-model.scm: Generate #include of config.h into @prefix@-model.cxx.
611 2003-06-07 Doug Evans <dje@sebabeach.org>
613 * gen-all-sid: New file.
614 * gen-all-opcodes: New file.
616 2003-06-05 Nick Clifton <nickc@redhat.com>
618 * cpu/frv.cpu (FRintieven): New operand. An even-numbered only
619 version of the FRinti operand.
620 (FRintjeven): Likewise for FRintj.
621 (FRintkeven): Likewise for FRintk.
622 (mdcutssi, media-dual-word-rotate-r-r, mqsaths,
623 media-quad-arith-sat-semantics, media-quad-arith-sat,
624 conditional-media-quad-arith-sat, mdunpackh,
625 media-quad-multiply-semantics, media-quad-multiply,
626 conditional-media-quad-multiply, media-quad-complex-i,
627 media-quad-multiply-acc-semantics, media-quad-multiply-acc,
628 conditional-media-quad-multiply-acc, munpackh,
629 media-quad-multiply-cross-acc-semantics, mdpackh,
630 media-quad-multiply-cross-acc, mbtoh-semantics,
631 media-quad-cross-multiply-cross-acc-semantics,
632 media-quad-cross-multiply-cross-acc, mbtoh, mhtob-semantics,
633 media-quad-cross-multiply-acc-semantics, cmbtoh,
634 media-quad-cross-multiply-acc, media-quad-complex, mhtob,
635 media-expand-halfword-to-double-semantics, mexpdhd, cmexpdhd,
636 cmhtob): Use new operands.
637 * cpu/frv.opc (CGEN_VERBOSE_ASSEMBLER_ERRORS): Define.
638 (parse_even_register): New function.
640 2003-06-04 Doug Evans <dje@sebabeach.org>
642 Better handling of 64 bit and mixed 32/64 bit architectures.
643 * hardware.scm (hw-update-word-modes!): New fn.
644 * mach.scm (define-cpu)): Call mode-set-word-modes!,
645 hw-update-word-modes!.
646 (state-word-bitsize): Replace FIXME with requested check.
647 (arch-analyze-insns!): Call mode-ensure-word-sizes-defined.
648 * mode.scm (mode-find): Ignore INT,UINT.
649 (-mode-word-sizes-kind): New global.
650 (mode-set-word-modes!,mode-set-identical-word-bitsizes!,
651 mode-set-biggest-word-bitsizes!,mode-ensure-word-sizes-defined): New fns.
652 (mode-init!): Initialize -mode-word-sizes-kind. Move initialization
654 (mode-builtin!): ... here. Initialize WI/UWI/AI/IAI to something
655 unusable, correct values set later.
656 (mode-finish!): Remove cruft.
657 * html.scm (doc-init!): Call mode-set-biggest-word-bitsizes!.
658 * opcodes.scm (opcodes-init!): Ditto.
659 * rtx-funcs.scm (annul): Fix mode of pc.
660 * cpu/ia64.cpu: Remove cruft that sets word modes.
661 * cpu/xstormy16.cpu (define-cpu): Set word-bitsize.
663 2003-06-03 Nick Clifton <nickc@redhat.com>
665 * cpu/frv.cpu (media-dual-word-rotate-r-r): Use a signed 6-bit
666 immediate value not unsigned.
668 2003-05-21 J"orn Rennecke <joern.rennecke@superh.com>
670 * cpu/sh.cpu: Amend comments to refer to SuperH.
671 * cpu/sh64-compact.cpu: Change comment to refer to SuperH.
672 * cpu/sh64-media.cpu: Likewise.
673 (Saturation): Update manual reference.
675 2003-05-15 Doug Evans <dje@sebabeach.org>
677 * Makefile.am (srcroot): New var.
679 * Makefile.in: Regenerate.
680 * cgen-doc.scm: New file.
681 * html.scm: New file.
682 * gen-all-doc: New file.
683 * dev.scm (cload): Handle DOC application.
685 * machs.scm (machs-for-cpu): New fn.
686 * model.scm (models-for-cpu): New fn.
687 * utils.scm (gen-c-copyright): Renamed from gen-copyright.
689 (iota): Rewrite to be identical to pmacro version. All uses updated.
690 * utils-cgen.scm (alpha-sort-obj-list): New fn.
692 * utils-sim.scm (-gen-decoder-switch): Back out patch of 2003-01-09.
693 (-gen-decode-bits): Instead put in better fix here.
695 * cpu/i960.cpu (index): Rename to indx. All uses updated.
697 2003-05-01 DJ Delorie <dj@redhat.com>
699 * cpu/xstormy16.cpu (alignfix-mem): Correct logic for unaligned
701 (set-alignfix-mem): Likewise.
703 2003-04-16 Dave Brolley <brolley@redhat.com>
705 * doc/rtl.texi (Iiming): Correct example to use 'model-name'.
706 * utils.scm (copyright-fsf): Update generate copyright years.
707 (copyright-cygnus): Ditto.
708 * sid.scm (-op-gen-set-trace): Generate code to fill in bitmask of modified
710 (-gen-arch-model-decls): Don't generate unit enum declaration or MAX_UNITS
712 (<operand>'gen-profile-code): New parameter 'when'.
713 (<iunit>'gen-profile-code): Ditto.
714 (<insn>'gen-profile-code): Ditto.
715 (<unit>'gen-profile-code): Ditto. Only generate 'referenced' and
716 'insn_reference' for the 'after' function.
717 * model.scm (unit:enum): Moved to sim-model.scm.
718 * sim-model.scm (unit:enum): Moved from model.scm.
719 * sid-decode.scm (-gen-scache-decls): Generate the 'written' field.
720 * cgen-sid.scm (sim-arguments): Document the generation of model.h.
721 * sid-model.scm (unit:enum): New version for sid.
722 (gen-model-class-name): New function.
723 (gen-model-unit-fn-decl): New function.
724 (gen-model-fn-decls): Call gen-model-unit-fn-decl.
725 (gen-model-unit-fn-name): New parameter 'when'.
726 (-gen-model-insn-fn-name): Ditto.
727 (-gen-model-insn-qualified-fn-name): New function.
728 (-gen-model-insn-fn-decl): New function.
729 (-gen-model-insn-fn-decls): New function.
730 (-gen-model-insn-fn): New parameter 'when'. Call
731 -gen-model-insn-qualified-fn-name.
732 (-gen-model-insn-fns): Generate the constructor for the model. Generate
733 functions for modelling insn before and after execution.
734 (-gen-model-class-decls): New function.
735 (" (gen-model-class-name model) "): New function.
736 (gen-model-classes): New function.
737 (-gen-insn-timing): Generate functions for modelling insn before and after
739 (-gen-insn-unit-timing): Generate class-qualified names.
740 (-gen-model-timing-table): Ditto.
741 (cgen-model.cxx): Generate #include for @cpu@.h. Omit generation of code
742 not needed (yet) by sid.
743 (cgen-model.h): New function.
745 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
747 * cpu/sh.cpu: Replace occurrances of 'Hitachi' with 'Renesas'.
748 * cpu/sh64-compact.cpu: Likewise.
749 * cpu/sh64-media.cpu: Likewise.
751 2003-03-21 DJ Delorie <dj@redhat.com>
753 * cpu/xstormy16.cpu (basic-psw): New argument ws (wordsize),
754 which indicates if the sign flag is set from bit 15 or 7.
756 (set-psw): New argument ws, propogate it.
757 (set-psw-nowrite): Likewise.
758 (set-mem-psw): Likewise.
759 (set-psw-carry): Likewise. Use temporaries to prevent
760 prematurely overwriting needed inputs.
761 (set-psw-rrotate17): Fix logic.
762 (shrgrgr): Preserve carry for zero-bit shifts.
763 (shrgrimm): Likewise.
765 (shlgrimm): Likewise.
767 (asrgrimm): Likewise.
770 2003-03-12 Frank Ch. Eigler <fche@redhat.com>
772 * sid.scm: Set APPLICATION to SID-SIMULATOR.
774 2002-03-05 DJ Delorie <dj@redhat.com>
776 * cpu/xstormy16.cpu (set-psw-add): Use temporaries to prevent
777 prematurely overwriting needed inputs.
778 (set-psw-sub): Likewise.
780 Fri Feb 21 19:48:19 2003 J"orn Rennecke <joern.rennecke@superh.com>
782 * cpu/sh64-media.cpu (make-mextr): Fix setting of count.
784 2003-02-18 DJ Delorie <dj@redhat.com>
786 * xstormy16.cpu (set-mem-alignfix-psw): Remove.
787 (movlmemimm): Just mask the address.
788 (movhmemimm): Likewise.
789 (movlmemgr): Likewise.
790 (movhmemgr): Likewise.
791 (set-psw): Always set the psw last.
792 (set-psw-carry): Likewise.
793 (set-psw-add): Likewise.
794 (set-psw-sub): Likewise.
796 * xstormy16.cpu (set-psw-rrotate17): New. Choose the correct set
797 of 16 patterns from the set-psw-rotate17 function.
798 (movgrigr, movgripostincgr, movgripredecgr, movgriigr,
799 movgriipostincgr, movgriipredecgr): Set psw correctly.
800 (movfgrigr, movfgripostincgr, movfgripredecgr, movfgriigr,
801 movfgriipostincgr, movfgriipredecgr): Fix semantics.
802 (rrcgrgr, rrcgrimm4): Use new set-psw-rrotate17 function.
804 2003-02-11 Dave Brolley <brolley@redhat.com>
806 * desc-cpu.scm (gen-ifld-defns): Add all ifields to the
807 @arch@_cgen-ifld_table.
808 (gen-maybe-multi-ifld): Use the ifield enumerators to index the
809 @arch@_cgen-ifld_table.
811 2003-02-03 Frank Ch. Eigler <fche@redhat.com>
813 * sid-cpu.scm (-gen-sfrag-engine-fn): Generate more hygienic C++.
815 2003-01-09 Graydon Hoare <graydon@redhat.com>
817 * utils-sim.scm (-gen-decoder-switch): Fix edge condition for
820 2003-01-07 Graydon Hoare <graydon@redhat.com>
822 * utils-gen.scm (attr-int-gen-defn): Define.
824 2002-12-21 Doug Evans <dje@sebabeach.org>
826 * ifield.scm (-ifield-parse): Rewrite <bitrange> computation.
827 (-get-ifld-word-offset,-get-ifld-word-length): New fns.
829 * dev.scm (cload): Update location of .cpu files.
831 2002-12-19 Doug Evans <dje@sebabeach.org>
833 * utils-sim.scm (gen-profile-sym): New fn.
834 (<operand>,sbuf-profile-sym): New method.
835 (<operand>,sbuf-profile-elm): Use it.
836 * sim.scm (<operand>,gen-record-profile): Use sbuf-profile-sym instead
837 of hardcoding symbol name.
838 (<operand>,gen-profile-code): Ditto.
839 (<unit>,gen-profile-code): Use gen-profile-sym instead of hardcoding
842 * mode.scm (mode-sem-mode): New fn.
843 * operand.scm (op:new-mode): Update. mode-name.
844 (op-natural-mode?) New fn.
845 * rtl.scm (hw): Set hw-name,mode-name.
847 Back out sim*.scm changes of 2001-04-02 Ben Elliston <bje@redhat.com>
849 * sim-decode.scm (-gen-decode-insn-globals): Use @PREFIX@_INSN__MAX
850 as size of IDESC-TABLE-VAR.
851 (@prefix@_init_idesc_table): Ditto.
852 * sim-model.scm (-gen-mach-defns): Ditto.
853 * sim.scm (gen-cpu-insn-enum-decl): Rename last elm from max to -max.
855 * utils-sim.scm (-gen-decode-insn-entry): Fix some spacing in output.
857 * insn.scm (-parse-insn-format-symbol): Improve error message.
858 (-parse-insn-format): Ditto.
860 * gen-all-sim: New script.
862 2002-12-16 DJ Delorie <dj@delorie.com>
864 * cpu/xstormy16.opc (parse_immediate16): Add prototype.
866 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
868 * cpu/xstormy16.cpu (imm16): Call handler immediate16.
869 * cpu/xstormy16.opc (parse_small_immediate): Return on '@'.
870 (parse_immediate16): Handle immediate16 values, which now include
871 @hi(label) and @lo(label)
873 2002-12-03 Alan Modra <amodra@bigpond.net.au>
875 * desc-cpu.scm (gen-maybe-multi-ifld): Remove superfluous parens.
876 Add braces and cast for union field.
877 (gen-multi-ifield-nodes): Add braces and cast for union field.
878 (cgen_operand_table): Similarly fix sentinel.
879 (cgen_cpu_close): Constify "insns". Formatting.
880 (cgen-desc.c): Include xregex.h.
881 * cpu/ip2k.opc (ip2k_cgen_insn_supported): Move to opc.c section.
883 <opc.c>: Include safe-ctype.h.
884 (ip2k_asm_hash): Use ISSPACE and TOLOWER.
885 (PARSE_FUNC_DECL): Declare. Use to prototype parse_fr, parse_addr16,
886 parse_addr16_p, parse_addr16_cjp, parse_lit8 and parse_bit3.
887 (parse_fr): Constify "old_strp". Correct type of "tempvalue".
888 Don't test it for >= 0. Use ISSPACE rather than isspace. Formatting.
889 (parse_addr16): Correct type of "value". Formatting.
890 (parse_addr16_p): Likewise.
891 (parse_addr16_cjp): Likewise.
892 (parse_lit8): Likewise.
893 (parse_bit3): Formatting.
894 (PRINT_FUNC_DECL): Define. Use to prototype print_fr, print_dollarhex,
895 print_dollarhex8, print_dollarhex16, print_dollarhex_addr16h,
896 print_dollarhex_addr16l, print_dollarhex_p, print_dollarhex_cj and
898 (print_fr): Add ATTRIBUTE_UNUSED on unused args. Formatting.
899 (print_dollarhex): Add ATTRIBUTE_UNUSED on unused args.
900 (print_dollarhex8): Likewise.
901 (print_dollarhex16): Likewise.
902 (print_dollarhex_addr16h): Likewise.
903 (print_dollarhex_addr16l): Likewise.
904 (print_dollarhex_p): Likewise.
905 (print_dollarhex_cj): Likewise.
906 (print_decimal): Likewise.
907 * cpu/xstormy16.opc (parse_mem8): Use ISALNUM rather than isalnum.
909 2002-11-30 Hans-Peter Nilsson <hp@axis.com>
911 * doc/rtl.texi (Model variants): Mention current limitations for
912 unit inputs and outputs.
913 (Hardware elements) <attribute PROFILE>: Be slightly more
915 (Instructions) <timing>: input/output overrides have a direction
918 2002-11-25 DJ Delorie <dj@redhat.com>
920 * xstormy16.cpu (sdiv, divlh, sdivlh): Fix sdivlh/divlh encodings.
922 2002-11-21 Jeff Johnston <jjohnstn@redhat.com>
924 * cpu/iq10.cpu: New file.
925 * cpu/iq2000.cpu: Likewise.
926 * cpu/iq2000.opc: Likewise.
927 * cpu/iq2000m.cpu: Likewise.
929 2002-11-19 DJ Delorie <dj@redhat.com>
931 * cpu/xstormy16.cpu (sdiv, divlh, sdivlh): New.
933 2002-11-05 Frank Ch. Eigler <fche@redhat.com>
935 * dev.scm: Call getenv with a string, not a symbol.
937 2002-10-08 Doug Evans <dje@transmeta.com>
938 Hans-Peter Nilsson <hp@axis.com>
940 * types.scm (bitrange-overlap?): Handle lsb0?.
942 2002-09-07 Frank Ch. Eigler <fche@redhat.com>
944 From Robert Cragie <rcc@jennic.com>:
945 * cpu/arm7.cpu (ldm*-sw*, stm*-sw*): New instructions.
947 2002-07-17 Frank Ch. Eigler <fche@redhat.com>
948 Ben Elliston <bje@redhat.com>
949 John Healy <jhealy@redhat.com>
950 Jeff Johnston <jjohnstn@redhat.com>
951 Alan Lehotsky <alehotsky@redhat.com>
952 Ubicom Inc. <SupportDesk@ubicom.com>
954 * cpu/ip2k.cpu: New file.
955 * cpu/ip2k.opc: Likewise.
957 2002-07-01 Hans-Peter Nilsson <hp@axis.com>
959 * utils-gen.scm (-gen-extract-word): Handle lsb0?.
961 2002-06-25 J"orn Rennecke <joern.rennecke@superh.com>
963 * cpu/sh64-compact.cpu (movw5): Use Correct operand field for reg.
964 * cpu/sh64-media.cpu (-ldhi-byte, -ldhi-word, -ldhi-long): New macros.
965 (-ldlo-byte, -ldlo-word, -ldlo-long): Likewise.
966 (-sthi-word, -sthi-long -stlo-byte, -stlo-word, -stlo-long): Likewise.
967 (ldhil, ldhiq, ldlol, ldloq, stlol, stloq): Implement.
968 (mshfhib, mshfhil, mshfhiw, mshflob, mshflol, mshflow): Fix indices.
969 (-sthi-byte): If there is a single byte to store, store it at
971 (sthil, sthiq): Fix big-endian behaviour.
972 (mcnvslw, mcnvswb, mcnvswub, mmacfxwl, mmacnfx.wl): Fix indices.
973 (mmulfxl, mmulfxw, mmulfxrpw, mmulhiwl, mmullowl): Likewise.
974 (saturate): Use Dimode to check if saturation operation is required.
975 (usaturate): Likewise.
977 (-maddsl, -maddsub): Compute to-be-saturated value in wider mode.
978 (-maddsw, mmacfxwl, mmacnfx.wl, -mshaldsl, -mshaldsw): Likewise.
979 (-mshardl, -mshardw, -msubsl, -msubsub, -msubsw): Likewise.
980 (msadubq): Fix subword index in second operand of first subtraction.
982 2002-06-20 Hans-Peter Nilsson <hp@axis.com>
984 * sim-cpu.scm (gen-semantic-code): Prepend with setup-semantics
987 2002-06-18 Dave Brolley <brolley@redhat.com>
989 * cpu/frv.cpu: New cpu description.
990 * cpu/frv.opc: New cpu support code.
992 2002-05-21 Dave Brolley <brolley@redhat.com>
994 * decode.scm (-opcode-slots): Don't consider bits beyond the
997 2002-05-17 Johan Rydberg <jrydberg@rtmk.org>
999 * cpu/powerpc.cpu: New file.
1001 2002-05-01 Graydon Hoare <graydon@redhat.com>
1003 * desc-cpu.scm (@arch@_cgen_cpu_close): Fix memory leaks.
1005 2002-03-20 Hans-Peter Nilsson <hp@axis.com>
1007 * doc/pmacros.texi (Symbol concatenation): Mention that .sym
1008 results are expanded recursively.
1010 2002-03-19 Hans-Peter Nilsson <hp@axis.com>
1012 * pmacros.scm (-pmacro-expand,scan): If result is a symbol,
1013 call scan-symbol on it, to enable recursive macro-expansion.
1015 2002-01-25 Frank Ch. Eigler <fche@redhat.com>
1017 * sid-cpu.scm (-gen-hardware-types): Generate single hardware union
1018 for multiple-isa configurations.
1019 * sid-decode.scm (-gen-decode-fn): Tolerate empty insn list.
1021 2002-02-04 Ben Elliston <bje@redhat.com>
1023 * cpu/sh.cpu, cpu/sh.opc: New files.
1024 * cpu/sh64-comact.cpu, cpu/sh64-media.cpu: Likewise.
1026 2002-01-29 Hans-Peter Nilsson <hp@axis.com>
1028 * doc/rtl.texi: Fix typo: define-attr, not define-attribute.
1029 (Enumerated constants): Mention that an ifield must not specify a
1031 (Instruction operands): Ditto for index.
1032 (Expressions) <parallel>: Remove misplaced mention of local
1034 <if>: Mention that mode must be specified and non-VOID when the
1037 2002-01-28 Hans-Peter Nilsson <hp@axis.com>
1039 * doc/porting.texi: When referring to *.opc, mention they are in
1040 the cpu subdir. Call top-level directory toplevel, not devo.
1041 Close string in define-normal-insn example.
1043 * doc/pmacros.texi: Fix .substr typo to .substring.
1044 Mention that .sym expansions are not further expanded.
1046 2002-01-22 Graydon Hoare <graydon@redhat.com>
1048 * desc-cpu.scm (ifld-number-cache): Add.
1050 (gen-maybe-multi-ifld-of-op): Add.
1051 (gen-maybe-multi-ifld): Add.
1052 (gen-multi-ifield-nodes): Add.
1053 (cgen-desc.c): Add call to gen-multi-ifield-nodes.
1055 2002-01-10 matthew green <mrg@redhat.com>
1057 * cpu/xstormy16.cpu (gr-Rbj-names): Rename this ...
1058 (gr-Rb-names): ... to this.
1059 (h-Rb): New hardware piece.
1060 (h-Rbj): Use gr-Rb-names.
1062 (holdx): New instruction.
1064 2002-01-07 Ben Elliston <bje@redhat.com>
1066 * utils.scm (package-cygnus-simulators): Rename from this ..
1067 (package-red-hat-simulators): .. to this.
1068 * opcodes.scm (option-set!): Use package-red-hat-simulators.
1069 * sid-cpu.scm (cgen-desc.h): Likewise.
1070 (cgen-cpu.h): Likewise.
1071 (cgen-defs.h): Likewise.
1072 (cgen-write.cxx): Likewise.
1073 (cgen-semantics.cxx): Likewise.
1074 (cgen-sem-switch.cxx): Likewise.
1075 * sid-decode.scm (cgen-decode.h): Likewise.
1076 (cgen-decode.cxx): Likewise.
1077 * sid-model.scm (cgen-model.cxx): Likewise.
1078 * sid.scm (option-set!): Likewise.
1079 * sim.scm (option-set!): Likewise.
1081 2002-01-07 Ben Elliston <bje@redhat.com>
1083 * utils.scm (copyright-fsf): Add 2002.
1084 (copyright-cygnus): Rename to copyright-red-hat.
1085 (copyright-red-hat): Add 2002.
1086 (CURRENT-COPYRIGHT): Update comment.
1087 * opcodes.scm (option-set!): Update callers.
1088 * sid-model.scm (cgen-model.cxx): Likewise.
1089 * sid-cpu.scm: Likewise.
1090 * sid-decode.scm: Likewise.
1091 * sid.scm (option-set!): Handle "redhat" as an option for
1092 "copyright"; use copyright-red-hat.
1093 * sim.scm (option-set!): Likewise.
1095 2002-01-03 Dave Brolley <brolley@redhat.com>
1097 * decode.scm (-distinguishing-bit-population): Compute num-insns, the
1098 number of insns in the list. Update the population count function to
1099 identify and prioritize 3 catgories of useful bits.
1100 (-population-top-few): Don't consider bits with a population count of
1102 (-build-decode-table-entry): Don't call
1103 filter-harmlessly-ambiguous-insns. Filter out non-specialized and
1104 identical insns at the next tree level.
1105 * insn.scm (filter-harmlessly-ambiguous-insns): Note in a comment that
1106 this function is no longer used.
1107 (filter-non-specialized-ambiguous-insns): New function.
1108 (filter-identical-ambiguous-insns): New function.
1109 (find-identical-insn): New function.
1110 (filter-harmlessly-ambiguous-insns): Removed.
1112 2001-11-26 Geoffrey Keating <geoffk@redhat.com>
1113 matthew green <mrg@redhat.com>
1114 Frank Ch. Eigler <fche@redhat.com>
1115 Nick Clifton <nickc@cambridge.redhat.com>
1117 * cpu/xstormy16.cpu: New file.
1118 * cpu/xstormy16.opc: New file.
1120 2001-11-26 Frank Ch. Eigler <fche@redhat.com>
1122 * doc/sim.texi, rtl.texi, porting.texi: Correct texinfo markup typos.
1124 2001-11-14 Dave Brolley <brolley@redhat.com>
1126 * utils-gen.scm (-gen-extract-word): Correct computation of the length
1127 of the field being extracted.
1129 2001-10-29 Johan Rydberg <johan@rydberg.com>
1131 * doc/rtl.texi (Expressions): Document the (error ..), (sqrt ..),
1132 (cos ...) and (sin ..) rtx.
1134 2001-10-13 Nick Clifton <nickc@cambridge.redhat.com>
1136 * desc-cpu.scm: Do not include ctype.h in generated desc
1137 files. They will inherit safe-ctype.h instead.
1139 2001-10-08 Nick Clifton <nickc@cambridge.redhat.com>
1141 * desc-cpu.scm: Add missing function prototypes (for generated
1142 C files). Fix compile time warning messages about unused
1143 parameters (for generated C files).
1144 * opc-asmdis.scm: The same.
1145 * opc-ibld.c: The same.
1146 * opc-itab.scm: The same.
1147 * cpu/fr30.opc: The same.
1148 * cpu/m32r.opc: The same.
1149 * cpu/openrisc.opc: The same.
1151 2001-09-17 graydon hoare <graydon@redhat.com>
1153 * insn.scm (syntax-break-out): Correct logic in handling escaped
1156 2001-07-12 Jeff Johnston <jjohnstn@redhat.com>
1158 * opc-itab.scm (@arch@_cgen_init_opcode_table): Unconditionally
1159 call @arch@_cgen_build_insn_regex now that regex support is in
1162 2001-07-12 Frank Ch. Eigler <fche@redhat.com>
1164 * insn.scm (filter-harmlessly-ambiguous-insns): Fix msg typo.
1165 (mask-superset?): Look for strict supersets to allow rejection of
1168 2001-07-11 Frank Ch. Eigler <fche@redhat.com>
1170 * sid-cpu.scm (-gen-mach-params): New proc to emit ...CHUNK_BITSIZE...
1171 (cgen-desc.h): Call it.
1172 * sid-decode.scm (-gen-decode-fn): Use base-insn-bitsize as
1174 * utils-sim.scm (-gen-decode-insn-entry): For SID only, prepare
1175 entire_insn for extraction, if it's shorter than base-insn-bitsize.
1177 2001-07-11 Frank Ch. Eigler <fche@redhat.com>
1179 * desc-cpu.scm (-gen-mach-table-defns): Emit fourth field: the
1180 mach->cpu insn-chunk-bitsize.
1181 (-gen-cpu-open): In @arch@_cgen_rebuild_tables, process above new
1182 field toward CGEN_CPU_TABLE->insn_chunk_bitsize.
1183 * mach.scm (<cpu>): New field insn-chunk-bitsize.
1184 (-cpu-parse, -cpu-read): Parse/initialize it.
1185 * doc/rtl.texi (define-cpu): Document it.
1187 2001-07-09 Geoffrey Keating <geoffk@redhat.com>
1189 * ifield.scm (<ifield> 'field-start): Don't look at word-len.
1191 2001-07-06 Ben Elliston <bje@redhat.com>
1193 * opcodes.scm (read-cpu.opc): Read .opc files from subdir/cpu.
1195 2001-07-05 Ben Elliston <bje@redhat.com>
1199 * read.scm (include): Include files from srcdir/cpu.
1200 (-cgen): Likewise for loading .cpu files.
1201 * sid.scm (sim-finish!): Read .sim files from srcdir/cpu.
1202 * *.cpu: Move all cpu descriptions into cpu subdirectory.
1204 * simplify.inc: Likewise.
1206 2001-07-04 Ben Elliston <bje@redhat.com>
1208 * read.scm (include): Log "Including file" message at level 1,
1209 rather than outputting it with (display).
1210 (cpu-load): Log "Loading cpu description" and "Processing cpu
1211 description" messages at levels 1 and 2, respectively, rather than
1214 2001-06-14 Geoffrey Keating <geoffk@redhat.com>
1216 * desc.scm (<keyword> 'gen-defn): Add extra zero into
1217 CGEN_KEYWORD_ENTRY initializers.
1219 * gas-test.scm (gen-gas-test): Create 8 testcases, not just 5.
1220 (<operand> 'test-data): Involve both the index and the hardware
1221 in testcase generation.
1222 (<hw-indx> 'test-data): Generate test data from the underlying
1224 (<ifield> 'test-data): Generate test data by computing bit
1225 patterns for the field, then decoding them.
1226 (<hw-address> 'test-data): Allow for new calling convention.
1227 (<hw-iaddress> 'test-data): Likewise.
1228 (<keyword> 'test-data): Convert index values into keywords.
1229 (<hw-asm> 'test-data): Convert index values into integer strings.
1231 * gas-test.scm (cgen-build.sh): Escape '.' as well.
1233 2001-06-01 Frank Ch. Eigler <fche@redhat.com>
1235 * rtl.scm (hw): Encode hw access mode into <operand> name, since this
1236 is required for multi-mode hw types (memory).
1238 2001-05-11 Ben Elliston <bje@redhat.com>
1240 * gas-test.scm (cgen-build.sh, gentest): Escape $ with a backslash
1241 when generating allinsn.d from objdump output. Without it, the
1242 testsuite will treat $ as the regular expression for end of line.
1244 2001-05-09 Ben Elliston <bje@redhat.com>
1246 * doc/porting.texi (Doing a GAS port): Replace `cgen_opcode_open'
1247 with `cgen_cpu_open'; documentation had become out of date.
1248 * doc/rtl.texi (Instruction operands): Likewise.
1250 2001-05-07 Frank Ch. Eigler <fche@redhat.com>
1252 * iformat.scm (compute-insn-base-mask-length): Rewrite to tolerate
1253 various-base-length instruction sets.
1255 2001-04-02 Ben Elliston <bje@redhat.com>
1257 * sid-cpu.scm (-last-insn): New function.
1258 (-gen-sem-switch-engine): Loop through idesc while less than or
1259 equal to the last instruction enum, not less than the MAX enum.
1260 (-gen-sfrag-engine-fn): Clean up frag_label_table initialisation.
1261 * sid-decode.scm (-gen-decode-insn-globals): Define the idesc
1262 table's size to be the last instruction enum plus one, not
1264 * sid.scm (gen-cpu-insn-enum-decl): Do not append a dummy `max'
1265 instruction onto the instruction list.
1267 * sim-decode.scm (@prefix@_init_idesc_table): Compute tabsize
1268 using the size of the table and its elements.
1269 (-gen-decode-insn-globals): Define the idesc table's size to be
1270 the last instruction enum plus one, not @PREFIX@_INSN_MAX.
1271 * sim-model.scm (-gen-mach-defns): Define CPU_MAX_INSNS as the
1272 last instruction enum plus one, not @CPU@_INSN_MAX.
1274 2001-03-28 Ben Elliston <bje@redhat.com>
1276 * doc/version.texi (UPDATED, EDITION): Update.
1277 * doc/stamp-vti: Likewise.
1279 2001-03-26 Ben Elliston <bje@redhat.com>
1281 * doc/credits.texi (Credits): Update.
1283 * gas-test.scm (<keyword>,test-data): Prefix keywords by their
1284 specified prefix and, if necessary, escape `$' in gas-build.sh to
1285 prevent unwanted shell variable expansion.
1287 2001-03-24 Ben Elliston <bje@redhat.com>
1289 * gas-test.scm (<hw-asm>,test-data): Choose pseudo-random data.
1290 (<keyword>,test-data): Likewise.
1291 (<hw-address>,test-data): Likewise.
1292 (<hw-iaddress>,test-data): Likewise.
1293 (-collate-test-set): New function.
1294 (build-test-set): Use it.
1295 (gen-gas-test): Generate five test cases per instruction.
1296 (cgen-allinsn.exp): Include "-*- Tcl -*-" in DejaGNU test file.
1298 * read.scm: Load "slib/random" if random is not defined.
1299 * slib/random.scm: New file.
1301 * utils.scm: Remove comments about the Hobbit compiler.
1302 (copyright-cygnus): Add 2001.
1303 (package-cygnus-simulators): Replace "Cygnus" with "Red Hat".
1304 (package-gnu-simulators): Tidy.
1306 2001-03-23 Ben Elliston <bje@redhat.com>
1308 * cgen-gas.scm: Inline documentation improvements.
1310 2001-03-21 Ben Elliston <bje@redhat.com>
1312 * opc-itab.scm (compute-syntax): Emit a parse error if an operand
1313 given in a syntax string is undefined.
1315 * opc-itab.scm (compute-syntax): Emit a parse error if an operand
1316 name is empty or invalid -- eg. "$(rs)" instead of "($rs)".
1318 2001-03-20 Patrick Macdonald <patrickm@redhat.com>
1320 * desc-cpu.scm (@arch@_cgen_cpu_open): Correct machine calculation
1321 for arg_type CGEN_CPU_OPEN_BFDMACH.
1323 2001-03-20 Ben Elliston <bje@redhat.com>
1325 * opc-itab.scm (-gen-insn-enum): Do not append a dummy `max'
1326 instruction onto the instruction list. Define MAX_INSNS to be the
1327 value of the last instruction enum plus one.
1329 2001-03-14 Nick Clifton <nickc@redhat.com>
1331 * utils.scm (copyright-fsf): Add 2001. Remove (C).
1333 2001-03-05 Dave Brolley <brolley@redhat.com>
1335 * sim-decode.scm (-gen-extract-case): Generate declaration of "insn"
1336 if the number of ifields is greater than zero.
1338 2001-03-01 Frank Ch. Eigler <fche@redhat.com>
1340 * sid.cpu (-op-gen-set-trace[-parallel], -create-virtual-insns!):
1341 Emit LIKELY/UNLIKELY branch probability hints.
1342 * sid-decode.cpu (-gen-record-args): Ditto.
1344 2001-02-02 Patrick Macdonald <patrickm@redhat.com>
1346 * desc-cpu.scm (-gen-hash-defines): Rename
1347 CGEN_ACTUAL_MAX_SYNTAX_BYTES to CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS.
1349 2001-01-26 Frank Ch. Eigler <fche@redhat.com>
1351 * sid-cpu.scm (gen-parallel-exec-type): Use unsigned long long for
1353 (-gen-write-fn, -gen-sem-case, -gen-sfrag-case): Ditto.
1354 * sid-decode.scm (-gen-scache-decls): Exclude writeback tracking field
1356 * sid.scm (<operand> gen-write): Use unsigned long long expression
1358 (-op-gen-set-trace, -op-gen-set-trace-parallel): Ditto.
1359 (<unit> gen-profile-code): Ditto.
1361 2001-01-23 Johan Rydberg <jrydberg@opencores.org>
1363 * doc/rtl.texi (Expressions): Document the (index-of ...) and
1366 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
1368 * operand.scm (<operand> pretty-sem-name): New field.
1369 (<operand> make): Initialize it from hw-name.
1370 (op:set-pretty-sem-name!): New function.
1371 (<operand> gen-pretty-name): Default to fetching new field.
1372 * rtl.scm (hw): Copy hw-name to pretty-sem-name instead. Restore
1373 sem-name setting from -rtx-hw-name.
1375 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
1377 * rtl.scm (hw): Copy hw-name to new operand's sem-name, to simplify
1378 its subsequent gen-pretty-name.
1380 * read.scm: Increase thread working stack limit and backtrace
1383 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
1385 * doc/rtl.texi: Deprecate and depreciate the decode-assist construct.
1387 2001-01-06 Johan Rydberg <jrydberg@opencores.org>
1389 * openrisc.cpu (or32): Setup semantics for h-delay-insn to
1390 current insn plus 4.
1391 (h-delay-insn): New hardware register.
1392 (l-jal): Uses h-delay-insn instead of pc when setting link register.
1396 * openrisc.opc (parse_hi16): Sign extend value.
1397 (parse_lo16): Likewise.
1399 2001-01-06 Ben Elliston <bje@redhat.com>
1401 * utils-gen.scm (gen-sfmt-enum-decl): Use @prefix@ and @PREFIX@
1402 instead of @cpu@ and @CPU@ to generically prefix symbol names.
1403 * sim-cpu.scm (-gen-sem-fn-table-entry): Likewise.
1404 (-gen-semantic-fn-table): Likewise.
1405 (-gen-scache-semantic-fn): Likewise.
1406 (-gen-no-scache-semantic-fn): Likewise.
1407 (cgen-read.c): Likewise.
1408 (cgen-sem-switch.c): Likewise.
1409 * desc-cpu.scm (cgen-desc.c): Use @arch@, not @prefix@, since this
1410 is a filename prefix.
1411 * sim-decode.scm (IDESC-TABLE-VAR): Use @prefix@, et al.
1412 (-gen-decode-insn-globals): Likewise.
1413 (-gen-idesc-decls): Likewise.
1414 (cgen-decode.h): Likewise.
1415 (cgen-decode.c): Likewise.
1416 * sim.scm (gen-cpu-insn-enum-decl): Likewise.
1417 (gen-cpu-insn-enum): Likewise.
1418 (sim-finish!): Likewise.
1420 2001-01-05 Johan Rydberg <jrydberg@opencores.org>
1422 * openrisc.cpu: New file.
1423 * openrisc.opc: Likewise.
1425 2000-12-12 Ben Elliston <bje@redhat.com>
1427 * doc/rtl.texi (Expressions): Document the (delay ..) rtx.
1429 2000-12-07 Ben Elliston <bje@redhat.com>
1431 * sim-decode.scm (-gen-extract-case): Do not emit a definition for
1432 "insn" when there are zero ifields to extract.
1434 2000-12-04 Frank Ch. Eigler <fche@redhat.com>
1436 * utils-sim.scm (gen-define-argbuf-macro): Handle sfmt=#f case, to be
1437 used by simple/non-scache simulators.
1438 * sim-cpu.scm (-gen-read-case): Call gen-define/undef-field-macro
1439 regardless of with-scache?.
1440 (-gen-write-case, -gen-no-scache-semantic-fn, -gen-sem-case): Ditto.
1442 2000-12-03 Ben Elliston <bje@redhat.com>
1444 * desc-cpu.scm (cgen-desc.h): Clarify generated filenames.
1445 (cgen-desc.c): Likewise.
1447 2000-12-01 Greg McGary <greg@mcgary.org>
1449 * desc.scm (<keyword>,gen-defn): Prepend prefix to keyword names.
1451 2000-12-01 Ben Elliston <bje@redhat.com>
1453 * sim-cpu.scm (cgen-cpu.h): Only emit argbuf, scache and extract
1454 definitions if run without with-multipla-isa?.
1455 (cgen-defs.h): New function. Emit an ISA-specific defs file.
1456 * cgen-sim.scm (sim-arguments): Accept -G option to generate defs.
1458 2000-11-24 Ben Elliston <bje@redhat.com>
1460 * sim-cpu.scm (-gen-hardware-struct): New function.
1461 (-gen-hardware-types): If with-multiple-isa is specified, emit all
1462 hardware elements wich have share one or more ISAs with the ISAs
1465 * sim.scm (-with-multiple-isa?): New symbol.
1466 (with-multiple-isa?): New function.
1467 (option-init!): Initialise -with-multiple-isa?.
1468 (option-set!): Handle with-multiple-isa option.
1470 2000-11-21 Ben Elliston <bje@redhat.com>
1472 * utils.scm (copyright-fsf): Add the year 2000.
1474 2000-11-20 Frank Ch. Eigler <fche@redhat.com>
1476 * opc-itab.scm (-gen-ifmt-table, -gen-macro-insn-table: Remove
1477 unneeded "\n\n" from F() macro definition.
1479 2000-11-15 Greg McGary <greg@mcgary.org>
1481 * utils-cgen.scm (gen-define-with-symcat): New function.
1482 * desc-cpu.scm (gen-ifld-defns): Use it.
1483 (gen-hw-table-defns): Use it.
1484 (-gen-hash-defines): Use it.
1485 (gen-operand-table): Use it.
1486 (gen-insn-table): Use it. Remove spurious `#undef MNEM'.
1487 * opc-itab.scm (-gen-ifmt-table): Use it.
1488 (-gen-insn-opcode-table): Use it.
1489 (-gen-macro-insn-table): Use it.
1490 * opc-opinst.scm (-gen-operand-instance-tables): Use it.
1491 * sim-cpu.scm (cgen-semantics.c): Use it.
1492 (cgen-sem-switch.c): Use it.
1494 2000-11-10 Frank Ch. Eigler <fche@redhat.com>
1496 * utils-sim.scm (-gen-decode-insn-entry): Add fn? parameter to signal
1497 request to emit calls to insn extractors as functions rather than
1498 branches to inline blocks.
1499 (-gen-decode-expr-set-itype, -gen-decode-expr-entry): Ditto.
1500 (-gen-decode-table-entry, -gen-decoder-switch, gen-decoder): Ditto.
1502 * sim-decode.c (-gen-decode-fn): Tell (gen-decode) to emit branches
1503 to extractor clauses.
1505 2000-11-10 Frank Ch. Eigler <fche@redhat.com>
1507 * decode.scm (-distinguishing-bit-population): Significantly
1508 improve popularity heuristic. Renamed from
1509 (-mask-bit-population): Gone.
1510 (-population-above-threshold): Sort new bit numbers in order of
1512 (-population-top-few): Allow up to three more bits to be selected
1513 than requested. Correct selection order to prefer better bits.
1514 Correct bug in fewer-than-requested case. Keep threshold as
1516 (decode-best-get-bits): Pass also the insn-values.
1518 * utils-sim.scm (-gen-decoder-switch): Add comment suggesting a
1519 future optimization.
1521 * utils.scm (message): Format nested lists better.
1523 2000-11-09 Doug Evans <dje@casey.transmeta.com>
1525 * dev.scm: Add srcdir to %load-path.
1527 * rtx-funcs.scm (subword): Mode of argument can be different
1528 than mode of result, so don't use OP0 to specify argument's mode.
1530 2000-11-02 Ben Elliston <bje@redhat.com>
1532 * doc/porting.texi (Building a GAS test suite): Document my change
1535 2000-11-01 Ben Elliston <bje@redhat.com>
1537 * sim-test.scm (cgen-build.sh): Include "-*- Asm -*-" in test cases.
1539 2000-10-31 Ben Elliston <bje@redhat.com>
1541 * gas-test.scm (cgen-build.sh): Allow the generated script to run
1542 with no command line arguments if the gas build directory can be
1545 2000-10-26 Doug Evans <dje@casey.transmeta.com>
1547 * insn.scm (-parse-insn-format-symbol): Fix spelling error,
1548 op-ifld -> op-ifield.
1550 2000-10-23 Frank Ch. Eigler <fche@redhat.com>
1552 * thumb.scm (cc-tests): Add (ISA thumb) attribute.
1554 2000-10-13 matthew green <mrg@cygnus.com>
1556 * utils-cgen.scm (get-ifetch): Move from here ...
1557 * sim.scm (get-ifetch): ... to here.
1558 * sid.scm (get-ifetch): Copy and port to c++.
1560 2000-10-06 Dave Brolley <brolley@redhat.com>
1562 * utils-gen.scm (-gen-ifld-extract-base): Compute start position as
1563 ifld-start + ifld-word-offset.
1564 (gen-ifld-extract): Check adata-integral-insn? before checking whether
1565 the field is beyond the base number of bits.
1566 (gen-define-ifields): Use a base-length of 32 if adata-integral-insn?.
1567 (gen-extract-ifields): Ditto.
1568 * gas-test.scm (gentest): Generate backslashes before '[' and ']'
1569 characters in the regular expression.
1571 2000-10-02 Frank Ch. Eigler <fche@redhat.com>
1573 * desc-cpu.scm: (gen-operand-decls): Emit MAX_OPERANDS as a
1574 preprocessor constant.
1576 2000-09-21 Frank Ch. Eigler <fche@redhat.com>
1578 * slib/logical.scm: New file from slib. Provides robust bitwise
1579 logical operations for large integers.
1580 * read.scm: maybe-load it.
1582 2000-09-15 Frank Ch. Eigler <fche@redhat.com>
1584 * enum.scm (define-full-insn-enum): Filter with keep-isa predicate.
1585 * ifield.scm (-ifield-parse, -multi-ifield-parse): No longer assert
1586 single-isa predicate, but support keep-isa filtering.
1588 2000-09-08 Frank Ch. Eigler <fche@redhat.com>
1590 * rtl-c.scm (s-sequence): Handle nested c-calls in both
1591 statement-expression and comma-expression contexts.
1592 (s-c-call, s-c-raw-call): Add warning comment about bad assumption.
1594 2000-09-08 Frank Ch. Eigler <fche@redhat.com>
1596 * decode.scm (-population-top-few): Signal error gracefully if
1597 decoding is about to become ambiguous.
1599 2000-09-06 Frank Ch. Eigler <fche@redhat.com>
1601 * doc/rtl.texi (decode-assist): Describe this field as optional.
1603 2000-09-06 Frank Ch. Eigler <fche@redhat.com>
1605 * utils-gen.scm (gen-multi-ifld-extract): Handle case of multi-ifield
1608 2000-09-05 Dave Brolley <brolley@redhat.com>
1610 * sim.scm (sim-finish!): Honour the definition of FAST_P when calling
1611 @cpu@_pbb_begin. Use 0 if FAST_P is not defined.
1613 2000-08-29 Dave Brolley <brolley@redhat.com>
1615 * utils-gen.scm (gen-ifld-extract): Pass total-len if
1616 adata-integral-insn is true for this architecture.
1618 2000-08-24 Frank Ch. Eigler <fche@redhat.com>
1620 * hardware.scm (<hw-immediate> get-index-mode): Define method.
1621 * operand.scm (<operand> gen-pretty-name): Tolerate no op:sem-name.
1622 * rtl-c.scm (-c-rtl-get): Improve an error message.
1623 * sim.scm (-op-gen-set-trace): Support <derived-operand> lvalues.
1625 2000-08-22 Frank Ch. Eigler <fche@redhat.com>
1627 * Makefile.in (DIST_COMMON): Regenerated.
1628 * ifield.scm (<derived-ifield> needed-iflds): New method.
1629 * iformat.scm (-ifmt-lookup-sfmt!): Use base ifields for
1630 sfmts built from <derived-ifield>s.
1631 * operand.scm (-derived-parse-encoding): Give <derived-ifield> a fixed
1632 type symbol 'derived-ifield, not an unparseable string.
1633 * utils-sim.scm (op-needed-iflds) Handler 'derived-ifield case.
1634 (-sfmt-contents): Add tracing.
1636 From Doug Evans <dje@transmeta.com>:
1637 * sim.scm (<operand> cxmake-get): Result is a <c-expr>, not a string of
1640 2000-08-20 Doug Evans <dje@casey.transmeta.com>
1642 * rtl-c.scm (rtl-c-expr-with-estate): New fn.
1643 (rtl-c-expr-parsed,rtl-c-expr): New fns.
1644 (-rtl-c-get): Rename from rtl-c-get.
1645 (rtl-c-get): New fn for getter logging.
1647 2000-07-28 Ben Elliston <bje@redhat.com>
1651 2000-07-25 Ben Elliston <bje@redhat.com>
1653 * doc/credits.texi (Credits): Add Frank Eigler.
1655 2000-07-24 Dave Brolley <brolley@redhat.com>
1657 * opc-itab.scm (gen-insn-opcode-table): Initialize the first element
1659 * desc.scm (gen-attr-table-defn): Initialize all elements fully.
1660 (<keyword>): Initialize all elements fully.
1661 * desc-cpu.scm (-gen-isa-table-defns): Initialize the last element
1663 (-gen-mach-table-defns): Ditto.
1664 (-gen-ifld-defns): Ditto.
1665 (-gen-operand-table): Ditto.
1666 (-gen-insn-table): Ditto.
1667 (-gen-cpu-open): Nothing to do for the mach table.
1669 2000-07-13 Ben Elliston <bje@redhat.com>
1671 * doc/version.texi (UPDATED): Update.
1673 2000-07-05 Ben Elliston <bje@redhat.com>
1675 * configure.in (AC_PATH_PROG): Remove.
1676 * configure: Regenerate.
1677 * Makefile.am (GUILE): Locate guile dynamically.
1678 * Makefile.in: Regenerate.
1679 * doc/Makefile.in: Likewise.
1681 2000-07-03 Ben Elliston <bje@redhat.com>
1683 * desc-cpu.scm (cgen-desc.c): Include "libiberty.h".
1684 * opc-itab.scm (cgen-opc.c): Likewise.
1686 2000-06-28 Frank Ch. Eigler <fche@redhat.com>
1688 * rtl.scm (-rtx-traverse-locals): Correct call to `symbol?' for
1689 guile 1.4 compatibility.
1690 (rtx-env-dump): Comment out buggy display calls.
1692 2000-06-15 matthew green <mrg@redhat.com>
1694 * opc-itab.scm (-gen-ifmt-table-1): Add extra braces to pacify GCC.
1696 2000-06-14 Frank Ch. Eigler <fche@redhat.com>
1698 * Makefile.in: Regenerated.
1700 * desc-cpu.scm (gen-ifld-decls): Exclude derived ifields.
1701 (gen-ifld-defns): Ditto.
1702 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
1703 * rtl.c (rtl-finish!): Ditto.
1704 * opc-itab.scm (-gen-ifield-decls): Ditto.
1705 * opcodes.scm (gen-switch): Exclude derived operands.
1706 * operand.scm (op-iflds-used): Expand derived operands.
1707 (hw-index-derived): New dummy function to create dummy object.
1708 (-derived-operand-parse): Fix mode arg passed to <derived-operand>
1709 constructor. Set object's hw-name and index fields.
1710 (-anyof-merge-subchoices): Set instance object's index also.
1711 (-anyof-name): New helper function.
1712 (anyof-merge-semantics): Correct replacement of operand names in
1714 (op-ifield): Tolerate derived-operands and their funny indices better.
1715 * ifield.scm (ifld-known-values): Expand derived ifields.
1716 (non-multi-ifields, non-derived-ifields): New utility functions.
1717 (ifld-decode-mode): Tolerate objects with unbound decode field.
1718 * iformat.scm (compute-insn-length): Expand derived ifields.
1719 (compute-insn-base-mask): Ditto.
1720 * insn.scm (insn-base-ifields): Remove.
1721 (<insn>): Add iflds-values entry to cache ifld-base-ifields values.
1722 (insn-value): Call ifld-base-ifields and ifld-constant? instead.
1723 * mach.scm (arch-analyze-insns!): Exclude multi-insns.
1724 * sem-frags.scm (sim-sfrag-analyze-insns!): Ditto.
1725 (-frag-test-data): Ditto.
1726 * sid-cpu.scm (cgen-write.cxx,-gen-sem-switch): Ditto.
1727 (-gen-sem-switch-engine); Ditto.
1728 * sid-model.scm (-gen-model-insn-fns, -gen-model-timing-table): Ditto.
1729 * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
1730 (-gen-record-args): Tolerate unbound op-ifield.
1731 * sid.scm (<derived-operand> cxmake-get): New sketch implementation.
1732 (-gen-arch-model-decls, scache-engine-insns, pbb-engine-insns):
1733 Exclude multi-insns.
1734 * sim-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
1735 * utils-sim.scm (op-extract?): Handle derived operands.
1737 * gas-test.scm (cgen-build.sh): Quote '*' chars printed by objdump.
1738 * semantics.scm (-build-operand!): Handle 'DFLT case during parsing.
1739 * hardware.scm (hardware-for-mode): New function.
1741 * insn.scm (filter-harmlessly-ambiguous-insns): New function for
1742 cleaning up decode tables.
1743 (mask-superset?): Little helper function for above.
1744 * decode.scm (-build-decode-table-entry): Call it.
1745 (-opcode-slots): Add some more tracing.
1746 * arm.cpu: Disable decode-splits construct due to implementation
1747 conflict with `filter-harmlessly-ambiguous-insns'
1749 * decode.scm (-population-top-few): New function for better decode
1750 bit generation. Includes minor helper functions.
1751 (decode-get-best-bits): Call it instead.
1752 (OLDdecode-get-best-bits): Renamed previous version of above.
1755 2000-06-13 Ben Elliston <bje@redhat.com>
1757 * configure.in: Use AC_EXEEXT with Cygnus mode. Remove AC_ARG_WITH
1758 for the Guile library directory.
1759 * configure: Regenerate.
1760 * Makefile.in, doc/Makefile.in: Regenerate.
1762 * Makefile.in, doc/Makefile.in: Regenerate.
1763 * configure.in: Remove unnecessary tests. Move to version 1.0.
1764 * acconfig.h, config.in: Remove.
1765 * configure, aclocal.m4: Regenerate.
1766 * doc/stamp-vti, doc/version.texi: Likewise.
1767 * AUTHORS: New file.
1769 2000-06-07 Ben Elliston <bje@redhat.com>
1771 * fixup.scm (symbol-bound?): Reduce debugging output.
1773 2000-06-02 matthew green <mrg@redhat.com>
1775 * insn.scm (insn-base-ifields): Returns all the instruction fields for
1776 a given instruction, replacing derived fields with their subfields.
1777 (insn-value): Use `insn-base-ifields' to find all constant values.
1778 (multi-insn-instantiate!): Comment some debug messages.
1780 2000-06-01 Ben Elliston <bje@redhat.com>
1782 * doc/rtl.texi (Expressions): Document a hazard with the choice of
1783 symbol names used in a (c-call ..) rtx.
1785 * sim-test.scm (build-test-set): Return (()) for an instruction
1786 with no operands, so it too is included in the generated test set.
1788 2000-05-31 Ben Elliston <bje@redhat.com>
1790 * Makefile.am (gas-test): Ensure $(ISA) is not empty.
1791 (sim-test): Likewise.
1792 * Makefile.in: Regenerate.
1794 2000-05-30 Frank Ch. Eigler <fche@redhat.com>
1796 * read.scm (-cgen): In debugging mode (-b), ask guile for untruncated
1797 stack traceback, in an order that resembles gdb's `bt'.
1799 2000-05-24 Frank Ch. Eigler <fche@redhat.com>
1801 * desc-cpu.scm (-gen-hash-defines): Use ifmt-ifields again.
1802 * opc-itab.scm (-gen-ifmt-table-1): Ditto.
1803 * gas-test.scm (gas-test-analyze!, cgen-build.sh): Filter out
1805 * ifield.scm (multi-ifield): Define workable field-mask and field-value
1807 (ifld-base-ifields): New routine to replace ifmt-expanded-ifields.
1808 * iformat.scm (ifmt-expanded-ifields): Gone.
1809 (ifields-base-ifields): New function. Call ifld-base-ifields for real
1811 (-ifmt-lookup-ifmt!): Use it to expand derived/multi combos in new
1814 * opcodes.scm (multi-ifield gen-extract): Correct spacing in generated
1817 2000-05-23 Frank Ch. Eigler <fche@redhat.com>
1819 * sid.scm (with-any-profile?): New function clone.
1821 2000-05-19 Frank Ch. Eigler <fche@redhat.com>
1823 * utils-gen.scm (gen-multi-ifld-extract): Fix decode hook for sim.
1825 2000-05-18 Frank Ch. Eigler <fche@redhat.com>
1827 * ifield.scm (-multi-ifield-parse): Add encode/decode args.
1828 (-multi-ifield-read): Parse them.
1829 (define-full-multi-ifield): Pass #f/#f as defaults for them.
1830 * opcodes.scm (multi-ifield gen-insert): Add encode hook.
1831 (multi-ifield gen-extract): Add decode hook.
1832 * utils-gen.scm (gen-multi-ifld-extract): Add decode hook for sim.
1834 * insn.scm (syntax-break-out): More correctly handle \-escaped
1836 (syntax-make-elements): Ditto.
1837 * opc-itab.scm (compute-syntax): Ditto.
1839 2000-05-17 Ben Elliston <bje@redhat.com>
1841 * gas-test.scm (cgen-build.sh): Log the correct script filename.
1843 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
1845 * gas-test.scm (build-test-set): Return (()) for an instruction
1846 with no operands, so it too is included in the generated test set.
1848 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
1850 * desc-cpu.scm (-gen-hash-defines): Define CGEN_ACTUAL_MAX values for
1851 IFMT_OPERANDS and SYNTAX_BYTES.
1853 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
1855 * sim.scm (with-any-profile?): New function.
1856 * utils-sim.scm (-sfmt-contents): Use above instead of `with-profile?'
1857 to decide whether or not to include profiling counters.
1859 2000-05-10 Frank Ch. Eigler <fche@redhat.com>
1861 Fuller derived-operand support for opcodes.
1862 * insn.scm (non-multi-insns): New filter to oppose `multi-insns'.
1863 * desc-cpu.scm (-define-hash-defines): Compute CGEN_MAX_SYNTAX_BYTES.
1864 Correctly compute ..._IFMT_OPERANDS. Omit useless ..._INSN_OPERANDS.
1865 (gen-operand-table): Omit derived- and anyof- operands from table.
1866 (gen-insn-table): Omit multi-insns from table.
1867 * iformat.scm (ifmt-expanded-fields): New function to expand
1868 subfields of derived-ifields.
1869 (ifmt-compute!): Ignore remaining multi-insns.
1870 * mach.scm (isa-min-insn-bitsize, isa-max-insn-bitsize): Ignore
1872 * opc-itab.scm (-gen-ifmt-table-1): Use ifmt-expanded-ifields.
1873 (-gen-insn-enum, -gen-insn-opcode-table): Ignore multi-insns.
1874 * opcodes.scm (derived-operand): Define abort()ing gen-insert,
1875 gen-extract, gen-fget, gen-fset, gen-parse, gen-print functions.
1876 (gen-switch): Omit anyof-operands.
1877 * operand.scm (-anyof-syntax): New function.
1878 (-anyof-merge-syntax): Call it.
1879 * utils.scm (collect): New idiomatic function.
1881 2000-05-10 Ben Elliston <bje@redhat.com>
1883 * m68k.cpu: New file (work in progress).
1885 2000-05-05 Frank Ch. Eigler <fche@redhat.com>
1887 * Makefile.am (all-local): New target. Create stamp-cgen.
1888 * Makefile.in: Regenerated.
1889 * doc/Makefile.in: Regenerated.
1891 2000-04-26 Frank Ch. Eigler <fche@redhat.com>
1893 * operand.scm (-operand-g/setter-syntax): Correct off-by-one error.
1894 (-operand-parse-setter): Ditto.
1895 * utils-sim.scm (needed-iflds): Store ifield (index) in argbuf, even
1896 for CACHE-ADDR operands.
1897 * sid-decode.scm (-gen-record-args): Remove newly duplicated extract
1898 trace entries. Widen byte-wide values for printing.
1899 * sid.scm (-op-gen-set-trace): Enhance result trace with op indices.
1900 Widen byte-wide values for printing. Hexify memory addresses.
1902 2000-04-23 matthew green <mrg@redhat.com>
1904 * m32r.cpu: Fix a typo.
1906 Fri Apr 21 22:18:48 2000 Jim Wilson <wilson@cygnus.com>
1908 * ia64.cpu (define-model): Change merced to Itanium.
1909 (f-qp): Change quilifying to qualifying.
1910 (movbr_ph, movbr_pvec): Delete.
1911 (I-I21): Delete uses of movbr_ph and movbr_pvec.
1913 2000-04-07 Ben Elliston <bje@redhat.com>
1915 * doc/porting.texi (Building a simulator test suite): Clarify
1916 where generated test cases are placed.
1918 2000-04-07 Ben Elliston <bje@redhat.com>
1920 * Makefile.am (gas-test): Remove dependency on `cgen'.
1922 * Makefile.in: Regenerate.
1924 2000-04-04 Frank Ch. Eigler <fche@redhat.com>
1926 * hardware.scm (<hw-pc> parse): Allow user to set type for pc register.
1927 * mode.scm (mode-finish!): Add placeholder code for mach-dependent
1928 type reconfiguration.
1929 * utils-sim.scm (-sfmt-contents): Add profile-counters only if
1932 2000-03-30 Ben Elliston <bje@redhat.com>
1934 * doc/rtl.texi (Enumerated constants): Add concept index entries.
1936 2000-03-24 Ben Elliston <bje@redhat.com>
1938 * Makefile.am (stamp-cgen): Reinstate target.
1939 * Makefile.in: Regenerate.
1941 2000-03-22 Ben Elliston <bje@redhat.com>
1943 * slib/ppfile.scm: Remove; unused.
1944 * slib/defmacex.scm: Likewise.
1946 2000-03-21 Ben Elliston <bje@redhat.com>
1948 * doc/internals.texi (Source file overview): Document.
1950 * Makefile.am (GUILEDIR): Remove.
1951 (CGEN): Ditto. Callers use $(GUILE) instead.
1952 (GUILEFLAGS): Ditto.
1954 (APPDESCFILES): Ditto.
1955 (OPCODESFILES): Ditto.
1957 (pkgdata_SCRIPTS): Ditto.
1958 (stamp-cgen): Remove target.
1959 * Makefile.in: Regenerate.
1961 * configure.in: Remove header and library tests.
1962 * configure: Regenerate.
1963 * config.in: Likewise.
1965 2000-03-20 Ben Elliston <bje@redhat.com>
1967 * read.scm: Cease loading "hob-sup.scm".
1968 * utils.scm: Inherit the fastcall family of procedures (for now).
1969 * hob-sup.scm: Remove.
1971 2000-03-20 Ben Elliston <bje@redhat.com>
1973 * configure.in (AC_OUTPUT): Do not emit .gdbinit.
1974 * configure: Regenerate.
1975 * gdbinit.in: Remove.
1977 2000-03-17 Ben Elliston <bje@redhat.com>
1979 * Makefile.am (CGEN): Use guile, not cgen.
1980 (CGENCFLAGS, LIBIBERTY, INCLUDES): Remove.
1981 (bin_PROGRAMS, cgen_SOURCES): Likewise.
1982 (CGENFILES): Fold CGEN_HOB_INPUT_FILES and CGEN_NOHOB_FILES.
1983 (HOBBIT_INPUT_FILES, HOBBIT_OUTPUT_FILE): Remove.
1984 (HOB_OBJS): Likewise.
1985 (CGEN_HOB_SRC, CGEN_HOB_OBJ): Likewise.
1986 (CGENOBJS): Likewise.
1987 (cgen_DEPENDENCIES, cgen_LDFLAGS, cgen_LDADD): Likewise.
1988 (hobbit, hobbit.o, hobbit.c): Remove targets.
1989 (cos.o, cgen.o, cgen-gh.o, hob-sup.o): Likewise.
1990 (CLEANFILES): Update.
1991 * acconfig.h (WITH_HOBBIT): Remove.
1992 * configure.in: Do not test for 3 arg scm_make_vector. Remove
1993 option --with-cgen-hobbit.
1994 * cos.h, cos.c, hob-main.c, hob-sup.c, hob-sup.h, hob.sh: Remove.
1995 * cgen-gh.h, cgen-gh.c, cgen-hob.scm, cgen.c: Likewise.
1996 * hobbit.c, hobbit.h, hobbit.scm: Likewise.
1997 * hobscmif.h, hobslib.scm, scmhob.h: Likewise.
1998 * Makefile.in: Regenerate.
1999 * config.in: Likewise.
2000 * aclocal.m4: Likewise.
2001 * configure: Likewise.
2002 * README (Hobbit support): Remove.
2003 * doc/internals.texi (Conventions): Do not mention Hobbit.
2004 * doc/porting.texi (Supported Guile versions): Likewise.
2006 2000-03-16 Frank Ch. Eigler <fche@redhat.com>
2008 * sid-cpu.scm (-gen-sem-switch-engine): Adjust calling &
2009 callback convention to new sid sidutil::basic_cpu code.
2010 (-gen-sfrag-engine-fn): Ditto.
2011 * sid.scm (-create-virtual-insns!): Ditto.
2012 (-hw-gen-set-quiet-pc): Mark delay slot execution specially in pbb
2014 (cxmake-skip): Implement properly for pbb mode.
2016 2000-03-03 Ben Elliston <bje@redhat.com>
2018 * doc/internals.texi: New file.
2020 2000-02-29 Ben Elliston <bje@redhat.com>
2022 * doc/rtl.texi (Derived operands): Remove unnecessary footnote.
2023 * doc/porting.texi: Formatting tweaks.
2025 2000-02-25 Nick Clifton <nickc@cygnus.com>
2027 * desc-cpu.scm (*_cgen_cpu_open): Initialise signed_overflow_ok_p
2030 Thu Feb 24 14:09:01 2000 Doug Evans <devans@seba.cygnus.com>
2032 * operand.scm (<anyof-operand>,make!): Initialize mode-name, not
2035 2000-02-23 Andrew Haley <aph@cygnus.com>
2037 * m32r.cpu (pcmpbz): Make pcmpbz a special (i.e. hidden)
2040 2000-02-24 Ben Elliston <bje@redhat.com>
2042 * doc/rtl.texi (Derived operands): Add some cindex entries.
2044 2000-02-23 Ben Elliston <bje@redhat.com>
2046 * ia32.cpu (dndo): Move general purpose macro from here ..
2047 * simplify.inc (dndo): .. to here.
2049 2000-02-18 Frank Ch. Eigler <fche@redhat.com>
2051 * arm.cpu (h-tbit): Add c-call setter function.
2054 2000-02-17 Frank Ch. Eigler <fche@redhat.com>
2056 * sem-frags.scm (-frag-hash-compute!): Add appstuff arg for traversal.
2057 (-frag-cost-compute!): Ditto.
2058 * utils.scm (copyright-cygnus): Add Y2K.
2059 * sid-cpu.scm (@prefix@_pbb_run): Add unsigned& argument.
2061 2000-01-25 Nick Clifton <nickc@cygnus.com>
2063 * desc-cpu.scm (@arch@_cgen_cpu_open): Add code to initialise
2064 flags field of the CGEN_CPU_TABLE structure.
2066 Sun Dec 12 14:20:36 1999 Doug Evans <devans@seba.cygnus.com>
2068 * operand.scm (<anyof-instance>): Renamed from <anyof-value>.
2069 All references updated.
2071 Tue Nov 30 11:06:22 1999 Doug Evans <devans@seba.cygnus.com>
2073 * ia32.cpu: Rewrite addressing mode support.
2075 * ifield.scm (<ifield>): New member `follows'.
2076 (ifld-known-values): New proc.
2077 (<ifield>): New method set-word-offset!.
2078 (ifld-set-word-offset!): New proc.
2079 (ifld-new-word-offset): New proc.
2080 (<ifield>): New method next-word.
2081 (<multi-ifield>): New method next-word.
2082 (ifld-next-word): New proc.
2083 (ifld-precedes?): New proc.
2084 (-ifield-parse): New args word-offset,word-length,follows.
2085 All callers updated. Handle CISC-style vs RISC-style ifields.
2086 (-ifield-read): Recognize word-offset,word-length,follows specs.
2087 (-ifld-parse-follows): New proc.
2088 (-multi-ifield-make-default-insert): New proc.
2089 (-multi-ifield-make-default-extract): New proc.
2090 (-multi-ifield-parse): Provide default values for insert,extract
2091 handlers if not specified.
2092 (<derived-ifield>): New class.
2093 (derived-ifield?): New predicate.
2094 (ifld-derived-operand?): New predicate.
2095 (f-anyof): New global.
2096 (ifld-anyof?,ifld-anyof-operand?): New predicates.
2097 (f-derived,ifld-derived?): Delete.
2098 (ifield-builtin!): Delete init of f-derived. Init f-anyof.
2099 * insn.scm (-sub-insn-ifields): New proc.
2100 (-sub-insn-make!): New proc.
2101 (multi-insn-instantiate!): Provide initial implementation.
2102 (-insn-parse): If insn contains "anyof" operands, create a
2103 <multi-insn> object instead of a plain <insn>.
2104 (-parse-insn-format-symbol): Rewrite derived operand handling.
2105 Add anyof operand handling.
2106 (-parse-insn-format-ifield-spec): Rewrite.
2107 (-parse-insn-format-operand-spec): Delete.
2108 (-parse-insn-format-list): Delete support for `(operand value)'.
2109 (anyof-operand-format?): Replaces derived-operand-format?.
2110 * operand.scm (-operand-parse-getter): Improve error messages.
2111 (-operand-parse-setter): Ditto.
2112 (<derived-operand>): New members args,syntax,base-ifield,encoding,
2114 (<anyof-operand>): Change baseclass from <derived-operand> to
2115 <operand>. Delete member values. New members base-ifield,choices.
2116 (anyof-operand?): New predicate.
2117 (-derived-parse-encoding,-derived-parse-ifield-assertion): New procs.
2118 (-derived-operand-parse): Rewrite.
2119 (-derived-operand-read): Rewrite.
2120 (-anyof-parse-choice): New proc.
2121 (-anyof-operand-parse): Rewrite.
2122 (-anyof-operand-read,define-anyof-operand): New procs.
2123 (<anyof-value>): Rewrite.
2124 (-anyof-initial-known): New proc.
2125 (anyof-satisfies-assertions?): New proc.
2126 (-anyof-merge-syntax,-anyof-merge-encoding): New procs.
2127 (-anyof-merge-getter,-anyof-merge-setter): New procs.
2128 (-anyof-merge-semantics,-anyof-merge-ifield-assertion): New procs.
2129 (-anyof-merge-subchoices,-anyof-all-subchoices): New procs.
2130 (-anyof-value-from-derived): New proc.
2131 (-anyof-all-choices-1,anyof-all-choices): New procs.
2132 (operand-init!): Create define-anyof-operand reader command.
2134 * insn (syntax-break-out): Take syntax as argument instead of insn.
2135 All callers updated.
2136 (syntax-make): Move here, from ???.
2138 * types.scm (<bitrange>): Rename accessors from bitrange:foo to
2139 bitrange-foo. All uses updated.
2140 (bitrange-next-word): New proc.
2142 * semantics.scm (-solve-expr-fn,rtx-solve): New procs.
2144 * rtl.scm (rtx-canonicalize): Provide initial implementation.
2145 (rtx-make-const,rtx-make-enum): New procs.
2146 (rtx-arg1,rtx-arg2): Renamed from -rtx-arg[12]. All callers updated.
2147 (rtx-mem-addr,rtx-mem-sel): New procs.
2148 (rtx-change-address): New proc.
2149 (rtx-make-ifield,rtx-make-operand,rtx-make-local): New proc.
2150 (rtx-make-set,rtx-single-set?): New procs.
2151 (rtx-combine): New proc.
2153 * rtl.scm (rtx-traverse): New arg `appstuff'. All callers updated.
2154 (rtx-traverse-with-locals): Ditto.
2155 (-rtx-traverse,-rtx-traverse-*): Ditto.
2157 * rtl.scm (define-subr): New proc.
2158 (rtl-init!): Create reader command `define-subr'.
2160 * cos.c (_object_mi_p): Ensure argument is an object.
2161 (indent): New function.
2162 (_object_print_elms): Add pretty-printing support.
2163 (_object_print): Ditto.
2165 * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall7.
2166 (*floats-s->c-fun-table*): Ditto.
2167 * hobbit.c,hobbit.h: Rebuild.
2168 * hob-sup.c (fastcall7): New proc.
2169 * hob-sup.h (fastcall7): Declare.
2170 * hob-sup.scm (fastcall7): New macro.
2172 * mach.scm (<arch>): New member subr-list.
2173 (current-subr-list,current-subr-add!,current-subr-lookup): New procs.
2174 (arch-finish!): Reverse recorded subr list.
2176 * read.scm (debug-env): New global.
2177 (debug-var-names,debug-var,debug-repl-env): New procs.
2178 (debug-repl): Rewrite. New arg `env-list'. All callers updated.
2179 (debug-quit): Renamed from `continue'.
2181 * simplify.inc (dsmf): New pmacro.
2183 * utils.scm (plus-scan): New proc.
2184 (split-bits): Rewrite.
2185 (split-value): New proc.
2187 1999-10-13 Doug Evans <devans@casey.cygnus.com>
2189 * doc/Makefile.am (DOCFILES): Add notes.texi.
2190 * doc/Makefile.in: Rebuild.
2192 1999-10-11 Doug Evans <devans@casey.cygnus.com>
2194 * ifield.scm (ifld-derived?): New proc.
2195 (f-derived): New global.
2196 (ifield-builtin!): Create ifield f-derived.
2197 (<multi-insn>): New class.
2198 (multi-insn?): New predicate.
2199 (multi-insn-instantiate!): New proc.
2200 (-insn-parse): Create <multi-insn> objects for insns with derived
2202 (-parse-insn-format-symbol): Handle derived ifields.
2203 (-parse-insn-format-ifield-spec): New proc.
2204 (-parse-insn-format-operand-spec): New proc.
2205 (-parse-insn-format-list): Simplify.
2206 (-parse-insn-format): No longer allow (ifield-object value) spec.
2207 (derived-operand-format?): New proc.
2208 (insn-alias?): New proc.
2209 (non-alias-insns): Rewrite.
2210 (insn-real?): Renamed from real-insn?, all callers updated.
2211 (virutal-insns): Rewrite.
2212 (multi-insns): New proc.
2213 * mach.scm (arch-analyze-insns!): Instantiate multi-insns if present.
2214 * operand.scm (op-ifield): Renamed from op:ifield, all callers updated.
2215 Return #f if operand doesn't have an index or if index is not an
2217 (hw-index-anyof): New proc.
2218 (-operand-parse): Allow integer indices.
2219 (<derived-operand>): New class.
2220 (derived-operand?): New predicate.
2221 (<anyof-operand>): New class.
2222 (<anyof-value>): New class.
2223 (-anyof-parse-value,-anyof-operand-parse): New procs.
2224 (-derived-operand-parse,-derived-operand-read): New procs.
2225 (define-derived-operand,define-full-derived-operand): New procs.
2226 (operand-init!): New reader command define-derived-operand.
2228 * utils.scm (list-take): Handle negative amount.
2229 (element?): Rewrite.
2231 1999-10-10 Doug Evans <devans@casey.cygnus.com>
2233 * dev.scm: quick-utils.scm renamed to ~/.cgenrc.
2235 1999-10-04 Richard Henderson <rth@cygnus.com>
2237 * ia64.cpu: Checkpoint.
2239 1999-09-29 Doug Evans <devans@casey.cygnus.com>
2241 * sim-cpu.scm (-gen-semantic-fn-table): Virtual insns are always valid.
2243 * sim.scm (sim-finish!,x-invalid): Always set pc. Set vpc based on
2244 default-insn-bitsize. Pass vpc to sim_engine_invalid_insn.
2246 Wed Sep 29 14:39:39 1999 Dave Brolley <brolley@cygnus.com>
2248 * sim.scm (sim-finish!): Don't call sim_io_error for invalid insn. Use
2249 PC returned by sim_engine_invalid_insn.
2251 1999-09-28 Doug Evans <devans@casey.cygnus.com>
2253 * ia32.cpu: New file.
2255 1999-09-25 Doug Evans <devans@casey.cygnus.com>
2257 * utils.scm (bit-set?): Fix off by one error.
2259 * rtl-c.scm (s-sequence): Fix non-void-mode result output.
2261 * rtl.scm (hw): Check for valid hardware element before trying to
2264 * arm.cpu (arm7f cpu): Renamed from arm. All users updated.
2265 * arm7.cpu (bx): Fix name of target address operand in assembler spec.
2266 (*): arm_compute_operand2_foo renamed to compute_operand2_foo.
2267 * thumb.cpu (*): arm_compute_operand2_foo renamed to
2268 compute_operand2_foo.
2270 * cgen-sid.scm (sim_arguments): Add support for building defs.h.
2271 * sid.scm (-hw-gen-set-quiet-pc): Handle #:delay modifier.
2272 Call delayed_branch/branch methods instead of assigning to `vpc'.
2273 (<hw-pc>,cxmake-skip): Call skip method.
2274 (-gen-hw-selector): Call rtl-c++ instead of rtl-c.
2275 (<pc>,cxmake-skip): Ditto.
2276 (-create-virtual-insns!): Ditto.
2277 (op:read): Call estate-make-for-normal-c++ instead of estate-...-c.
2279 (op:record-profile): Specify #:output-language "c++".
2280 * sid-cpu.scm (-gen-insn-attr-decls): Rename @cpu@_insn_attr to
2282 (cgen-desc.h): Use @arch@ namespace instead of @cpu@.
2284 (-gen-reg-access-defns): Use rtl-c++ instead of rtl-c.
2285 (gen-semantic-code): Ditto.
2286 (-gen-sem-case,-gen-sfrag-code): Ditto.
2287 (-gen-hardware-types): Delete class @cpu@_cpu_base.
2288 (cgen-cpu.h): File is now #included by main cpu class, rather than
2290 (cgen-defs.h): New proc.
2291 (-gen-scache-semantic-fn): Change result type to sem_status.
2292 New local `status'. Call done_cti_insn/done_insn method at end.
2293 (cgen-semantics.cxx): Include @cpu@.h instead of @arch@-main.h,
2295 (cgen-sem-switch.cxx): Ditto.
2296 * sid-decode.scm (-gen-idesc-decls): Update return type of
2298 (cgen-decode.h): Add using namespace @arch@.
2299 (cgen-decode.cxx): Include @cpu@.h instead of @arch@-main.h.
2301 * rtl-c.scm (<rtl-c-eval-state>): New member output-language.
2302 (estate-output-language-c?,estate-output-language-c++?): New procs.
2303 (<rtl-c-eval-state>,vmake!): Handle #:output-language.
2304 (estate-make-for-normal-rtl-c++): New proc.
2305 (rtl-c++-parsed,rtl-c++): New proc.
2306 (s-c-call): Invoke cpu class method if c++.
2307 (join): Use s-c-raw-call.
2309 * rtl-c.scm (subword): Don't pass current_cpu to SUBWORD.
2312 * rtl-c.scm (delay): Mark the sequence as #:delay'd.
2313 * rtl.scm (<eval-state>): New member `modifiers'.
2314 (<eval-state>,vmake!): Handle #:modifiers.
2315 (estate-with-modifiers): New proc.
2317 * rtl.scm (rtx-side-effects?): New proc.
2318 (rtx-canonical-bool): Don't change expr if it has side effects.
2319 * semantics.scm (-simplify-expr-fn): Handle exprs with side-effects
2322 1999-09-23 Doug Evans <devans@casey.cygnus.com>
2324 * sim.scm (gen-scache-type): Fix typo in last patch.
2326 Tue Sep 21 17:12:55 1999 Dave Brolley <brolley@cygnus.com>
2328 * sim.scm (gen-scache-type): Add last_insn_p flag for parallel support.
2330 1999-09-05 Doug Evans <devans@casey.cygnus.com>
2332 * sid.scm (<hw-pc>,cxmake-skip): New method.
2333 (<pc>,cxmake-skip): New method.
2335 * decode.scm (decode-build-table): Delete args startbit,index-list.
2336 All callers updated.
2337 * utils-sim.scm (gen-decoder): Delete args startbit,index-list.
2338 All callers updated.
2339 * sim-decode.scm (-gen-decode-fn): Always pass 0 for startbit
2340 to decode-get-best-bits.
2341 * sid-decode.scm (-gen-decode-fn): Ditto.
2343 * hardware.scm (hw-bits): New proc.
2344 (-hw-parse): New arg layout. All callers updated.
2345 (define-full-hardware): New arg layout. All callers updated.
2346 (-hw-validate-layout): New proc.
2347 (-hw-create-[gs]etter-from-layout): New procs.
2348 (<hw-register>,parse!): Handle layout spec.
2349 * types.scm (type-bits): New proc.
2351 * sem-frags.scm (-frag-cost-compute!): Fix calculation of
2352 UNARY, BINARY, TRINARY rtxs.
2354 * attr.scm (<enum-attribute>,parse-value): Allow strings.
2355 * enum.scm (parse-enum-vals): Use reverse! instead of reverse.
2356 Support '- as "unused spot" indicator.
2358 1999-09-03 Doug Evans <devans@casey.cygnus.com>
2360 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Fix typo.
2362 1999-09-02 Doug Evans <devans@casey.cygnus.com>
2364 * rtx-funcs.scm (subword): Fix mode spec of `value'.
2366 * rtl.scm (-rtx-traverse-operands): Fix debugging message
2368 (tstate-make): New arg `depth'. All callers updated.
2369 (tstate-depth,tstate-set-depth!): New procs.
2370 (tstate-incr-depth!,tstate-decr-depth!): New procs.
2371 (-rtx-traverse-operands): Indent debugging output by traversal depth.
2372 (-rtx-traverse): Ditto. Keep track of traversal depth.
2374 1999-09-01 Doug Evans <devans@casey.cygnus.com>
2376 * sim-decode.scm (-gen-decoder+supporting cast): Move to utils-sim.scm.
2377 * sid-decode.scm (-gen-decoder+supporting cast): Ditto.
2378 * utils-sim.scm: Decoder generator support moved here.
2379 (-decode-equiv-entries?,-decode-sort-entries): New procs.
2380 (-gen-decoder-switch): Sort entries for more fall-throughs.
2382 * Makefile.am (gas-test,sim-test): Specify ISA when invoking cgen.
2383 * Makefile.in: Rebuild.
2384 * sim-test.scm (build-sim-testcase): Add logging message.
2385 * dev.scm (cload): Recognize SIM-TEST application.
2386 (load-stest): Set APPLICATION to SIM-TEST.
2388 * desc-cpu.scm (-gen-hash-defines): Add \n to output.
2390 * ifield.scm (-ifield-parse): Allow bit numbers up to 127.
2391 * mach.scm (-isa-parse): Allow insn bitsizes from 8 to 128.
2392 * mode.scm (mode-make-int,mode-make-uint): Allow values up to 64 bits.
2394 * insn.scm (syntax-break-out): Handle ${foo}.
2396 Sun Aug 29 11:11:15 1999 Doug Evans <devans@canuck.cygnus.com>
2398 * Makefile.am (noinst_PROGRAMS,noinst_LIBRARIES): Delete.
2399 (bin_PROGRAMS): Define.
2400 (CGEN_HOB_INPUT_FILES): Remove $(srcdir)/.
2401 (cgen-hob.c): Prepend $(srcdir)/ here.
2402 (APPDESCFILES,OPCODESFILES,SIMFILES,pkgdata_SCRIPTS): Define.
2403 (libcpu_a_SOURCES): Delete.
2404 (cgen_DEPENDENCIES,cgen_LDADD): Rewrite.
2405 (CGEN_HOB_OBJ,CGENOBJS): New variables.
2406 * configure.in (LIBS): Replace -Wl,-rpath with -R.
2407 Add AC_CHECK_LIB(guile,main).
2408 * Makefile.in: Rebuild.
2409 * doc/Makefile.in: Rebuild.
2410 * aclocal.m4: Rebuild.
2411 * config.in: Rebuild.
2412 * configure: Rebuild.
2414 1999-08-28 Doug Evans <devans@casey.cygnus.com>
2416 Rename rtx functions from name: to name, accept optional leading
2418 VM -> VOID, DM -> DFLT, use DFLT instead of VM for default mode.
2419 * attr.scm (-attr-eval): Update.
2420 * hardware.scm (hw-mode-ok?): Rename arg mode to new-mode-name.
2421 (<hw-register>,mode-ok?): Disallow VOID.
2422 (<hw-immediate>,mode-ok?): Disallow VOID.
2423 (<hw-address>,mode-ok?): Disallow VOID.
2424 * mode.scm (mode-name?): New proc.
2425 (VOID): Renamed from VM.
2426 (DFLT): Renamed from DM.
2427 (mode-builtin!): Update.
2428 * opcodes.scm (<ifield>,gen-insert): Update.
2429 (<ifield>,gen-extract): Update.
2430 (<multi-ifield>,gen-insert,gen-extract): Update.
2431 * operand.scm (op:mode): Update.
2432 (<pc>,make!): Update.
2433 (op:new-mode): Update.
2434 (-operand-read): Update.
2435 * rtl.scm (-rtx-valid-types): Add OPTIONS, EXPLNUMMODE,
2436 NONVOIDMODE, DFLTMODE. Rename VMMODE to VOIDMODE.
2437 (def-rtx-dual-mode,define-rtx-dual-mode): Delete.
2438 (-rtx-lazy-sem-mode): Renamed from -rtx-mode. All callers updated.
2439 (rtx-make): Call -rtx-munge-mode&options.
2440 (rtx accessors): Rewrite.
2441 (rtx-pretty-name): Update.
2442 (-rtx-traverse-*): Update.
2443 (-rtx-traverse-explnummode,-rtx-traverse-nonvoidmode): New procs.
2444 (-rtx-traverse-voidmode,-rtx-traverse-dfltmode): New procs.
2445 (-rtx-make-traverse-table): Update.
2446 (-rtx-traverse-operands): Update.
2447 (-rtx-option?,-rtx-option-list?): New procs.
2448 (-rtx-munge-mode&options): New proc.
2449 (-rtx-traverse-expr): Call -rtx-munge-mode&options.
2450 (-rtx-traverse): Update.
2451 (rtx-traverse,rtx-traverse-with-locals,rtx-compile): Update.
2452 (rtx-compile-time-constant?): Update.
2453 (rtx-true?,rtx-false?,rtx-true,rtx-false): Update.
2454 (rtx-value): Update.
2455 (hw,reg,mem): Renamed from foo:. Update. All callers updated.
2456 * rtx-funcs.scm (*): Update.
2457 * rtl-c.scm (rtl-c-get): Update.
2458 (rtl-c-set-quiet,rtl-c-set-trace): Update.
2459 (s-c-call,s-c-raw-call): Update.
2460 (s-boolifop,s-convop,s-if,s-cond): Update.
2461 (s-case-vm,-gen-non-vm-case-test,s-case): Update.
2462 (-par-replace-set-dests,-par-replace-set-srcs): Update.
2463 (s-parallel,s-sequence): Update.
2464 (rtl-c-build-table): Update.
2465 * sem-frags.scm (-frag-hash-compute!): Update.
2466 (-frag-cost-compute!): Improperly handle unary,binary,trinary ops
2467 for temporary bug compatibility with previous version.
2468 (-frag-expr-locals,-frag-expr-stmts): Update.
2469 (-frag-compute-desired-frags,-frag-pick-best): Update.
2470 * semantics.scm (-simplify-expr-fn): Update.
2471 (rtx-simplify): Update.
2472 (-rtx-ref-type): Update. Account for modifiers.
2473 (-build-operand!,-build-reg-operand!,-build-mem-operand!): Update.
2474 (-build-ifield-operand!): Update.
2475 (-build-known-values): Update.
2476 (semantic-compile): Update.
2477 (-gen-reg-access-defns): Update.
2478 (gen-semantic-code,-gen-sem-case): Update.
2479 (-gen-sfrag-code,-gen-sfrag-case): Update.
2480 * sim-cpu (gen-semantic-code): Update.
2481 * sim.scm (<hw-pc>,gen-write,cxmake-skip): Update.
2482 (<hw-register>,gen-write,gen-set-macro,cxmake-get-raw): Update.
2483 (-hw-cxmake-get): Update.
2484 (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
2485 (<hw-index>,cxmake-get): Update.
2486 (<operand>,gen-type,gen-read,cxmake-get): Update.
2487 (<operand>,gen-set-quiet,gen-set-trace): Update.
2488 (<pc>,cxmake-get): Update.
2489 (sim-finish!): Update.
2490 * utils-gen.scm (-gen-ifld-extract-base): Update.
2491 (-gen-ifld-extract-beyond): Update.
2492 (gen-multi-ifld-extract): Update.
2493 * sid-decode.scm (-decode-expr-ifield-values-used): Update.
2494 * sid.scm (<hw-pc>,gen-write): Update.
2495 (-gen-decode-insn-globals): Update.
2496 (-hw-cxmake-get): Update.
2497 (<hw-register>,cxmake-get-raw): Update.
2498 (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
2499 (<hw-index>,cxmake-get): Update.
2500 (<operand>,gen-type,gen-read,cxmake-get): Update.
2501 (<operand>,gen-set-quiet,gen-set-trace): Update.
2502 (<pc>,cxmake-get): Update.
2503 (-create-virtual-insns!): Update.
2504 (-decode-split-build-assertion): Update.
2506 * simplify.inc: Update.
2508 1999-08-20 Doug Evans <devans@casey.cygnus.com>
2510 * sim.scm (-op-gen-queued-write): Fix memory address calculation.
2511 Prefix queue function name with sim_ instead of @cpu@_.
2513 * sim.scm (-with-parallel-only?): New global.
2514 (option-init!): Initialize it.
2515 (option-set!): Set it.
2516 (with-parallel-only?): New proc.
2517 * sim-decode.scm (-gen-decode-insn-globals): Don't include parallel
2518 and writeback markers if with-parallel-only.
2519 (-gen-idesc-init-fn): Update.
2520 * sim-cpu.scm (cgen-cpu.h): Don't generate struct parexec if
2523 Wed Aug 18 15:04:30 1999 Doug Evans <devans@canuck.cygnus.com>
2525 * sim-cpu.scm (-gen-semantic-fn-table): Handle unsupported insns
2526 with the invalid insn handler.
2528 * utils.scm (list-maybe-ref): New proc.
2530 * mach.scm (-isa-parse): Signal error if isa wasn't specified in
2532 (-mach-parse): Signal error if mach wasn't specified in define-arch.
2534 * i960.cpu (test*-*): Delete `expr' arg.
2535 (test-op,branch-op): Update.
2537 1999-08-09 Doug Evans <devans@casey.cygnus.com>
2539 * sim.scm (gen-reg-getter-fn,gen-reg-setter-fn): New procs.
2540 (gen-reg-access-decl): Replace `name' arg with `hw'. All callers
2542 (gen-reg-access-defn): Ditto.
2543 (-gen-hw-addr): Rewrite.
2544 (-op-gen-queued-write): Rewrite.
2545 * sim-cpu.scm (-gen-cpu-reg-access-decls):
2546 (-gen-scache-semantic-fn): Handle with-generic-write.
2547 (-gen-no-scache-semantic-fn): Ditto.
2549 1999-08-08 Doug Evans <devans@casey.cygnus.com>
2551 * utils-gen.scm (gen-define-ifmt-ifields): Tweak output.
2553 * sim.scm (-with-generic-write?): New global.
2554 (option-init!): Initialize it.
2555 (option-set!): Set it.
2556 (with-generic-write?): New proc.
2557 (-gen-hw-addr): New proc.
2558 (-op-gen-queued-write): New proc.
2559 (-op-gen-set-{quiet,trace}-parallel): Use it if with-generic-write?.
2561 * sim-cpu.scm (-gen-hardware-types): Output code with parallel support
2563 (-gen-sem-switch): Preserve existing with-parallel? value.
2564 (-gen-sem-parallel-switch): Ditto.
2565 (-gen-write-case): Add /indent support.
2566 (cgen-write.c): Rewrite.
2568 * utils.scm (-current-print-state): New global.
2569 (make-print-state): New proc.
2570 (pstate-indent,pstate-set-indent!): New procs.
2571 (pstate-cmd?,pstate-cmd-do): New procs.
2572 (/indent): New global.
2573 (/indent-set,/indent-add): New procs.
2574 (string-write): Set -current-print-state.
2575 (-string-write): New arg pstate, all callers updated.
2576 Handle print-state commands.
2577 (-string-list-flatten): New proc.
2578 (string-list->string): Use it.
2580 * sim-cpu.scm (-gen-sem-fn-name): Move here from sim-decode.scm.
2581 (-gen-sem-fn-table-entry): New proc.
2582 (-gen-semantic-fn-table): New proc.
2583 (-gen-scache-semantic-fn): Make fn static.
2584 (-gen-no-scache-semantic-fn): Ditto.
2585 (cgen-semantics.c): Define macro SEM_FN_NAME.
2586 * sim-decode.scm (-gen-decode-insn-globals): Delete FMT,TYPE,IDX,
2587 FAST,FULL. Update @cpu@_insn_sem contents.
2588 (-gen-semf-fn-name): Delete.
2589 (-gen-sem-fn-decls): Delete.
2590 (-gen-idesc-decls): Output prototypes of @cpu@_sem_init_idesc_table,
2591 @cpu@_semf_init_idesc_table.
2592 (-gen-idesc-init-fn): Update. Don't initialize pointers to semantic
2594 (cgen-decode.h): Print sfmt enum.
2595 * sid-decode.scm (-gen-semf-fn-name): Delete.
2596 * utils-gen.scm (gen-sfmt-enum-decl): New proc.
2598 * iformat.scm (sfmt-build): Rename sformats from fmt-foo to sfmt-foo.
2599 (ifmt-compute!): Ditto.
2600 * sim-decode.scm (-gen-decoder-switch): Ditto.
2601 * sid-decode.scm (-gen-decode-expr-entry): Ditto.
2602 (-gen-decoder-switch): Ditto.
2604 * insn.scm (insn-virtual?): New proc.
2606 * enum.scm (gen-enum-decl): Speed up, build string as list and then
2608 * mach.scm (<arch>): attr-list is now a pair of lists.
2609 (current-attr-list): Rewrite.
2610 (current-attr-add!,current-attr-lookup): Rewrite.
2611 * sim.scm (gen-cpu-insn-enum-decl): Replace append with append!.
2613 1999-08-06 Richard Henderson <rth@cygnus.com>
2615 * ia64.cpu: Initial checkpoint.
2617 1999-08-06 Doug Evans <devans@casey.cygnus.com>
2619 * pmacros.scm (-pmacro-apply): Fix definition, takes only 1 arg.
2620 (pmacros-init!): Update .apply help string.
2622 1999-08-03 Doug Evans <devans@casey.cygnus.com>
2624 * sim.scm (-hw-gen-set-quiet-pc): Update call to SEM_BRANCH_VIA_CACHE.
2625 (<hw-pc>,cxmake-skip): New method.
2626 (<pc>,cxmake-skip): New method.
2627 (-gen-argbuf-fields-union): Add branch_target to `chain' member.
2628 (gen-argbuf-type): New member `skip_count'.
2629 (sim-finish!): Update calls to @cpu@_pbb_cti_chain.
2630 * utils-cgen.scm (atlist-cti?): Don't include SKIP-CTI insns.
2632 * utils-sim.scm: New file.
2633 * dev.scm (load-sim): Load it.
2634 (load-sid): Load it.
2635 * cgen-sid.scm: Load it.
2636 * cgen-sim.scm: Load it.
2637 * iformat.scm (<sformat>): New member sbuf, not initialized by
2639 * rtx-funcs.scm (skip): Rewrite.
2640 * rtl-c.scm (skip): Rewrite.
2641 * m32r.cpu (sc,snc): Update `skip' usage.
2642 * mode.scm (mode-real-mode): New proc.
2643 * sem-frags.scm (-frag-split-by-sbuf): Rename from -frag-split-by-sfmt.
2644 Distinguish fragments by the <sformat-abuf> they use.
2645 * sim.scm (gen-profile-index-type): Delete.
2646 (ifield argbuf support): Move to utils-sim.scm and sim-decode.scm.
2647 (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
2648 (hardware argbuf support): Move to utils-sim.scm and sim-decode.scm.
2649 (operand argbuf support): Move to utils-sim.scm and sim-decode.scm.
2650 (-gen-argbuf-elm): Rewrite.
2651 (-gen-argbuf-hw-elm): Delete.
2652 (-gen-argbuf-fields-union): Generate structs for each sbuf instead
2654 (-sim-sformat-argbuf-list,-sim-insns-analyzed?): New globals.
2655 (sim-init!): Initialize them.
2656 (sim-analyze-insns!): Set them.
2657 (current-sbuf-list): New proc.
2658 * sim-cpu.scm (-gen-no-scache-semantic-fn): Update calls to
2659 gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns.
2660 * sim-model.scm (-gen-model-insn-fn): Ditto.
2661 * sim-decode.scm (-gen-extract-decls): Delete.
2662 (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
2663 (<hardware-base>,gen-extract,gen-trace-extract): Move here from
2665 (<hw-register,gen-extract,gen-trace-extract): Ditto.
2666 (<hw-address,gen-extract,gen-trace-extract): Ditto.
2667 (-gen-op-extract,-gen-op-trace-extract): New procs.
2668 (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
2669 gen-sfmt-argvars-foo and rewrite.
2670 (-gen-record-args): Rewrite.
2671 (-gen-extract-case): Tweak.
2672 * sid.scm (gen-profile-index-type): Delete.
2673 (ifield argbuf support): Move to utils-sim.scm.
2674 (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
2675 (hardware argbuf support): Move to utils-sim.scm and sid-decode.scm.
2676 (operand argbuf support): Move to utils-sim.scm and sid-decode.scm.
2677 (-sim-sformat-argbuf-list): New global.
2678 (sim-init!): Initialize it.
2679 (sim-analyze-insns!): Set it.
2680 (current-sbuf-list): New proc.
2681 * sid-decode.scm (-gen-argbuf-elm): Rewrite.
2682 (-gen-argbuf-hw-elm): Delete.
2683 (-gen-argbuf-fields-union): Generate structs for each sbuf instead
2685 (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
2686 (-gen-extract-decls): Delete.
2687 (<hardware-base>,gen-extract,gen-trace-extract): Move here from
2689 (<hw-register,gen-extract,gen-trace-extract): Ditto.
2690 (<hw-address,gen-extract,gen-trace-extract): Ditto.
2691 (-gen-op-extract,-gen-op-trace-extract): New procs.
2692 (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
2693 gen-sfmt-argvars-foo and rewrite.
2694 (-gen-record-args): Rewrite.
2695 (-gen-extract-case): Tweak.
2697 * cgen-gh.c (gh_putc,gh_puts): New functions.
2698 * cgen-gh.h (gh_putc,gh_puts): Declare them.
2699 * cos.c (_object_print_elms,_object_print): Use them.
2700 * hob-sup.c (fastcall_print): Use them.
2701 * configure.in: Check for scm_gen_puts, scm_puts.
2702 * config.in: Rebuild.
2703 * configure: Rebuild.
2704 * aclocal.m4: Rebuild.
2705 * Makefile.in: Rebuild.
2707 * dev.scm (load-opc): Use load instead of maybe-load.
2708 (load-gtest,load-sim,load-stest): Ditto.
2711 1999-07-23 Doug Evans <devans@casey.cygnus.com>
2713 * sid-cpu.scm (-gen-sem-switch-engine): Move definition of `count'
2714 up to avoid g++ 'goto crosses initialization' warning.
2715 (-gen-sfrag-engine-fn): Delete vpc arg to NEXT_FRAG.
2716 (-gen-sfrag-case): Update use of NEXT_FRAG.
2718 1999-07-22 Doug Evans <devans@casey.cygnus.com>
2720 * cos.c (cos_init): Protect _make_x_symbol from garbage collection.
2722 * read.scm: Load sem-frags.scm.
2723 * sem-frags.scm (*): Lots rewritten.
2724 * sid.scm (-with-sem-frags?): New global
2725 (with-sem-frags?): New proc.
2726 (option-init!): Initialize -with-sem-frags?.
2727 (option-set!): Recognize with-sem-frags.
2728 (sim-init!): Call sim-sfrag-init! if with-sem-frags.
2729 * sid-cpu.scm (cgen-sem-switch.cxx): Generate semantic frag version
2731 (-gen-sfrag-engine-decls): New proc.
2732 (-gen-sfrag-code,-gen-sfrag-case,-gen-sfrag-enum-decl): New procs.
2733 (-gen-sfrag-engine-frag-table,-gen-sfrag-engine-fn): New procs.
2734 (-gen-sfrag-engine): New proc.
2735 (-gen-sem-case): Emit setup-semantics if specified.
2736 (-gen-sem-switch-engine): Update init/use of computed goto label.
2737 * sid-decode.scm (-gen-decode-expr-entry): Fetch ifield values
2739 (-gen-idesc-decls): Replace sem_address with cgoto.
2740 (-gen-scache-decls): Rewrite definition of `execute' member.
2741 * arm.cpu (arm isa): Enable decode-splits.
2742 * arm7.cpu (multiply insns): Rename result to mul-result.
2744 Rename decode-specialize to decode-split.
2745 * decode.scm (*): Update.
2746 * insn.scm (*): Update.
2747 * mach.scm (*): Update.
2748 * sid.scm (*): Update.
2750 1999-07-19 Doug Evans <devans@casey.cygnus.com>
2752 Record objects as a smob.
2753 * cos.c (scm_tc16_object): New static global.
2754 (cos_init): Initialize it.
2755 (OBJECT_P,OBJECT_ELEMENTS,OBJECT_CLASS_DESC): Update macros.
2756 (OBJECT_CLASS,OBJECT_ELEMENT_OFFSET): Update.
2757 (_object_tag): Delete.
2758 (_object_make_smob): New function.
2759 (_object_make_x,_object_make_with_values_x): Rewrite.
2760 (_object_elements,_object_class_desc): Rewrite.
2761 (_object_copy,object_p): Rewrite.
2762 (_object_specialize): Rewrite.
2763 (_object_print_elms,_object_print): New functions.
2764 (object_smob): New static global.
2765 (default_make_x): Use OBJECT_ELEMENT_OFFSET instead of magic number.
2767 * cos.c (_make_x_symbol): New static global.
2768 (object_make): Use it.
2769 (cos_init): Initialize it.
2771 1999-07-15 Doug Evans <devans@casey.cygnus.com>
2773 * rtl-c.scm (ifield): Back out last patch, use estate-ifield-var?
2774 instead to determine whether to use FLD macro.
2775 (<rtl-c-eval-state>): New member ifield-var?.
2776 (<rtl-c-eval-state>,vmake!): Recognize #:ifield-var?.
2777 * utils-gen.scm (-gen-ifld-extract-base): Specify #:ifield-var? #f.
2778 (-gen-ifld-extract-beyond,gen-multi-ifld-extract): Ditto.
2780 * rtl.scm (rtx-sequence-assq-locals): New proc.
2782 * cos.scm (-object-error): Don't crash on non-objects.
2784 * Makefile.am (CLEANFILES): Add hobbit.
2785 * Makefile.in: Rebuild.
2787 * rtl-c.scm (s-c-call): Delete unnecessary code.
2789 1999-07-14 Doug Evans <devans@casey.cygnus.com>
2791 * rtl-c.scm (ifield): Always reference value via `FLD'.
2793 * cos.c (elm_bound_p): Return problem SCM boolean values.
2795 * utils-cgen.scm (display-argv): New proc.
2796 * cgen-opc.scm (cgen): Call it.
2797 * cgen-sim.scm (cgen): Ditto.
2798 * cgen-gas.scm (cgen): Ditto.
2799 * cgen-stest.scm (cgen): Ditto.
2800 * cgen-sid.scm (cgen): Ditto.
2802 1999-07-05 Doug Evans <devans@casey.cygnus.com>
2804 * opc-asmdis.scm (-gen-parse-switch): New local var `junk'.
2805 * opc-ibld.scm (-gen-insert-switch): Initialize result to NULL.
2806 (-gen-extract-switch): Initialize result to 1.
2807 * opcodes.scm (gen-ifield-default-type): New proc.
2808 (gen-ifield-value-decl): Renamed from gen-ifield-type. All callers
2810 (<hw-index>,gen-insert): Handle non-ifield indices.
2811 (<hw-index>,gen-extract): Ditto.
2812 (<hw-asm>,gen-parse): Ditto.
2813 (<hw-asm>,gen-print): Ditto.
2814 (<keyword>,gen-parse): Ditto.
2815 (<keyword>,gen-print): Ditto.
2816 (<operand>,gen-fget): Ditto.
2817 (<operand>,gen-fset): Ditto.
2819 * sim.scm (-gen-hw-index-raw): Handle scalar indices.
2820 (-gen-hw-index): Ditto.
2821 * sid.scm (-gen-hw-index-raw): Handle scalar indices.
2822 (-gen-hw-index): Ditto.
2824 * sem-frags.scm: New file.
2826 * attr.scm (attr-parse): Add better checking of input.
2828 * hardware.scm (-hw-parse-getter): Renamed from -hw-parse-get.
2830 (-hw-parse-setter): Renamed from -hw-parse-set. All uses updated.
2832 * ifield.scm (ifld-nil?): New proc.
2834 * operand.scm (<operand>): New members getter,setter.
2835 (<operand>,make!): New args getter,setter. All uses updated.
2836 (op:getter,op:setter): New procs.
2837 (<hw-index>,field-start): Return 0 for non-ifield indices.
2838 (<hw-index>,field-length): Return 0 for non-ifield indices.
2839 (-operand-parse-getter,-operand-parse-setter): New procs.
2840 (-operand-parse): New args getter,setter. All callers updated.
2841 Always use hw-index-scalar for scalar operands.
2842 (-operand-read): Handle getter,setter.
2843 (define-full-operand): New args getter,setter. All uses updated.
2844 * semantics.scm (-build-ifield-operand!): Update.
2845 (-build-index-of-operand!): Update.
2846 * sim.scm (<operand>,cxmake-get): If operand has getter, use it.
2847 * simplify.inc (define-normal-operand): Update.
2849 * rtl.scm (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
2850 * rtl-c.scm (s-unop): Indirect fp ops through fpu op vector.
2851 (s-binop,s-cmpop,s-convop): Ditto.
2852 (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
2853 * sparc.cpu (insn-fmt2): Add FPOPS1,FPOPS2.
2854 (fcc-tests): New insn-enum.
2855 (fcc-value): Rename from fcc-type.
2856 * sparcfpu.cpu: New file. All fp support moved here.
2858 * rtl.scm (<rtx-func>): New member class.
2859 (rtx-class-*?): New procs.
2860 (def-rtx-node): New arg class. All callers updated.
2861 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-dual-node): Ditto.
2862 * rtx-funcs.scm (*): Specify class.
2864 * utils-cgen.scm (context-make-reader): New proc.
2866 * utils.scm (assert-fail-msg): New variable.
2868 (list-drop,list-tail-drop): New procs.
2870 1999-06-22 Doug Evans <devans@casey.cygnus.com>
2872 * desc-cpu.scm (-gen-hash-defines): Restore generation of
2873 CGEN_MIN_INSN_SIZE deleted on March 22.
2875 * ifield.scm (<ifield>,needed-iflds): New method.
2876 (<multi-ifield>,needed-iflds): New method.
2877 (ifld-needed-iflds): New proc.
2878 (multi-ifield?): New proc.
2879 * iformat.scm (<sfmt>): Delete member ifmt. New members length,iflds.
2880 (-sfmt-search-key): Include insn length in key.
2881 (-sfmt-order-iflds,-sfmt-used-iflds): New procs.
2882 (<fmt-desc>): Delete members ifmt-key,sfmt-key. New member used-iflds.
2883 (-ifmt-lookup-ifmt!): Compute key here.
2884 (-ifmt-lookup-sfmt!): Compute key here. Delete arg ifmt.
2885 All callers updated.
2886 (ifmt-build): Delete arg desc. New args search-key,iflds.
2887 All callers updated.
2888 (sfmt-build): Delete args desc,ifmt. New args search-key,cti?,
2889 in-ops,out-ops,sorted-used-iflds. All callers updated.
2890 * minsn.scm (minsn-make-alias): Use insn-set-ifmt!. Update call
2892 * operand.scm (op-iflds-used): New proc.
2893 * utils-gen.scm (gen-ifld-type): Move here from sim.scm
2895 And from sid.scm,sid-cpu.scm as well.
2896 (gen-ifld-extract-decl,-gen-ifld-extract-base): Ditto.
2897 (-gen-extract-word,-gen-ifld-extract-beyond): Ditto.
2898 (gen-ifld-extract,gen-multi-ifld-extract): Ditto.
2899 (gen-extracted-ifld-value): Ditto.
2900 (-extract-chunk-specs): Ditto.
2901 (gen-define-ifields,gen-define-ifmt-ifields): Ditto.
2902 (-extract-chunk,-gen-extract-beyond-var-list): Ditto.
2903 (gen-extract-ifields,gen-extract-ifmt-ifields): Ditto.
2904 (-extract-insert-subfields): New function.
2905 * sim.scm (gen-record-argbuf-ifld): Renamed from gen-ifld-extract.
2906 (gen-record-argvar-ifld): Renamed from gen-ifld-extract-argvar.
2907 * sim-cpu.scm (-gen-extract-ifmt-macro): Replace calls to
2908 gen-define-ifields with gen-define-ifmt-ifields. Ditto for
2910 (-gen-no-scache-semantic-fn): Ditto.
2911 (-gen-sem-case): Ditto.
2912 (-gen-read-case): Update calls to gen-define-ifields,
2913 gen-extract-ifields.
2914 * sim-decode.scm (-gen-record-args): Update.
2915 (-gen-sfmt-argvars-assigns): Update.
2916 (-gen-extract-case): Update.
2917 * sim-model.scm (-gen-model-insn-fn): Replace calls to
2918 gen-define-ifields with gen-define-ifmt-ifields. Ditto for
2920 * sid.scm (gen-ifld-argbuf-defn): Use gen-ifld-type.
2921 (gen-record-argbuf-ifld): Rename from gen-ifld-extract.
2922 (gen-record-argvar-ifld): Rename from gen-ifld-extract-argvar.
2923 * sid-decode.scm (-gen-decode-expr-entry): Update calls to
2924 gen-define-ifields, gen-extract-ifields.
2925 (-gen-record-args): Update.
2926 (gen-sfmt-argvars-assigns): Update.
2927 (-gen-extract-case): Replace calls to gen-define-ifmt-ifields
2928 with gen-define-ifields. Ditto for gen-extract-foo.
2929 (-gen-decode-fn): Use gen-ifld-extract-decl/gen-ifld-extract
2930 procs rather than method calls.
2932 1999-06-18 Doug Evans <devans@casey.cygnus.com>
2934 * sid.scm (-create-virtual-insns!): New local `context', pass it
2937 * rtl.scm (-rtx-traverse): Output symbol shortcuts in source form,
2938 (operand name) not (operand object), (local name) not (local object).
2939 (rtx-traverse-with-locals): New proc.
2940 (-compile-expr-fn): New proc.
2941 (rtx-compile): Rewrite.
2942 * rtl-c.scm (rtl-c-get): Handle operand/local names for src arg.
2943 (rtl-c-set-quiet): Don't accept operand/local names for dest arg.
2944 (rtl-c-set-trace): Ditto.
2945 (operand define-fn): Recognize operand name argument.
2946 (local define-fn): Recognize sequence temp name argument.
2947 * rtx-funcs.scm (operand): Argument is operand name, not object,
2948 so call current-op-lookup.
2949 (local): Similarily, so call rtx-temp-lookup.
2951 * rtl.scm (rtx-field?): Use rtx-name instead of car.
2952 (rtx-operand?): Ditto.
2953 (rtx-pretty-name): Ditto.
2954 (rtx-local-obj): Flag symbol argument as an error.
2955 (rtx-local-name): New proc.
2956 (rtx-sequence-locals,rtx-sequence-exprs): New procs.
2958 * rtl.scm (-rtx-traverse-operands): Fix debugging output of arg-types.
2960 * read.scm (debug-repl): Renamed from -debug-repl. All callers
2963 * arm7.cpu (do-word/byte-store): Use (trunc: QI rd) rather than
2966 * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall4, fastcall6.
2967 (*floats-s->c-fun-table*): Ditto.
2968 * hobbit.c,hobbit.h: Rebuild.
2969 * rtl.scm (-rtx-traverse-expr): Use fastcall6.
2970 * semantics.scm (rtx-simplify): Use /fastcall-make.
2972 * iformat.scm (-sfmt-search-key): Don't include memory modes.
2974 * insn.scm (<insn>): Delete members condition, compiled-condition.
2975 (<insn>,make!): Update
2976 (<insn> getters,setters): Update.
2977 (-insn-parse,insn-read,define-full-insn): Update.
2978 * minsn.scm (minsn-make-alias): Update.
2979 * iformat.scm (ifmt-analyze): Delete insn-condition reference.
2980 (ifmt-compute!): Ditto.
2981 * sim.scm (sim-finish!): Update.
2982 * simplify.inc: (define-normal-insn): Update.
2983 * sid-cpu.scm (gen-semantic-code): Update.
2985 * iformat.scm (-ifmt-lookup-ifmt!): Use insn-set-ifmt!.
2986 (-ifmt-lookup-sfmt!): Use insn-set-sfmt!.
2987 (ifmt-compute!): Ditto.
2989 1999-06-16 Doug Evans <devans@casey.cygnus.com>
2991 * minsn.scm (minsn-compute-iflds): Print better error message for
2994 1999-06-12 Doug Evans <devans@casey.cygnus.com>
2996 * rtl.scm (tstate->estate): Don't copy over expr-fn.
2998 * Makefile.am (HOBFLAGS): New variable.
2999 (cgen-hob.c): Use it.
3001 (libcpu_a_SOURCES): Add hob-sup.c.
3002 (hob-sup.o): New rule.
3003 * Makefile.in: Rebuild.
3004 * cgen.c: #include hob-sup.h.
3005 (cgen_init_c): Call hobbit_init_support.
3006 * hobbit.scm (*fastcall-make*,*c-symbol*): New variables.
3007 (*special-scm->c-functions*): Add them.
3008 (display-c-expression): Handle *c-symbol*.
3009 (*reckless-s->c-fun-table*): Add *fastcall-make*, fastcall5.
3010 (*floats-s->c-fun-table*): Ditto.
3011 (normalize): Recognize /fastcall-make.
3012 (normalize-fastcall-make): New proc.
3013 * hobbit.c,hobbit.h: Rebuild.
3014 * hob-sup.scm: New file.
3015 * hob-sup.c: New file.
3016 * hob-sup.h: New file.
3017 * read.scm: Load hob-sup.scm.
3018 * rtl.scm (-rtx-name-list): New variable.
3019 (rtx-name-list): New proc.
3020 (rtx-lookup): Try symbol first.
3021 (def-rtx-node): Add name to -rtx-name-list.
3022 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
3023 (-rtx-traverse-anymode): New proc.
3024 (-rtx-traverse-{emode,intmode,floatmode,nummode,vmmode}): New procs.
3025 (-rtx-traverse-{rtx,setrtx,testrtx,condrtx,casertx}): New procs.
3026 (-rtx-traverse-{locals,env,attrs,symbol,string,number}): New procs.
3027 (-rtx-traverse-{symornum,object}): New procs.
3028 (-rtx-make-traverse-table): Rewrite.
3029 (-rtx-traverse-operands): Rewrite arg-types handling.
3030 Handle #f result of traverser.
3031 (-rtx-traverse): Renamed from -rtx-traverse-normal.
3032 Move debug handling here.
3033 (-rtx-traverse-debug): Delete.
3034 (rtl-finish!): Change -rtx-traverse-table into list of handlers
3036 * semantics.scm (semantic-compile:process-expr!): Fix call to
3038 * utils.scm (map1-improper): New proc.
3040 1999-06-08 Doug Evans <devans@casey.cygnus.com>
3042 * arm.sim (h-tbit): Replace FUN-ACCESS with FUN-SET.
3044 * sid.scm (-hw-cxmake-get): s/FUN-ACCESS/FUN-GET/.
3045 (-hw-gen-set-quiet): s/FUN-ACCESS/FUN-SET/.
3046 (<operand>,cxmake-get): Tweak.
3047 (sim-finish!): Delete FUN-ACCESS attribute. Create FUN-GET,FUN_SET.
3049 1999-06-07 Doug Evans <devans@casey.cygnus.com>
3051 * thumb.cpu (dnti): Delete timing spec.
3054 * arm.cpu (arm isa): New fields condition, setup-semantics.
3055 (thumb isa): New field setup-semantics.
3056 (h-gr): Add attribute CACHE-ADDR.
3057 * arm7.cpu (dnai): Delete condition.
3058 (eval-cond): Delete.
3060 * mach.scm (<isa>): New member setup-semantics.
3061 (-isa-parse-setup-semantics): New proc.
3062 (-isa-parse): New arg setup-semantics.
3063 (-isa-read): Recognize setup-semantics.
3065 * sid-cpu.scm (gen-extract-fields): Split into two:
3066 gen-extract-ifields, gen-extract-ifmt-ifields.
3067 (-gen-scache-semantic-fn): Delete `taken_p'. Delete
3068 tracing begin/end messages (done by caller now).
3069 (-gen-sem-case): Delete `taken_p'. Add npc,br_status. Delete
3070 tracing begin/end messages (done by x-before,x-after virtual insns).
3071 (-gen-sem-switch-engine): Redo vpc initialization. Save vpc at
3072 end so don't have to look it up again next time.
3073 * sid-decode.scm (-decode-expr-ifield-values): New proc.
3074 (-decode-expr-ifield-tracking-key): New proc.
3075 (-decode-expr-ifield-tracking): New proc.
3076 (-decode-expr-ifield-values-used): New proc.
3077 (-decode-expr-ifield-mark-used!): New proc.
3078 (-gen-decode-expr-set-itype): New proc.
3079 (-gen-decode-expr-entry): Rewrite.
3080 (-gen-decode-table-entry): New proc.
3081 (-gen-decoder-switch): Use it.
3082 (-gen-virtual-insn-finder): New proc.
3083 (-gen-argbuf-elm): Move here from sid.scm.
3084 (-gen-argbuf-hw-elm): Ditto.
3085 (-gen-argbuf-fields-union): Add entries for chain,before insns.
3086 (-gen-scache-decls): Add `cond' member to @prefix@_scache for
3087 conditional-execution isas.
3088 (-gen-decode-fn): Record conditional-exec ifield.
3089 * sid.scm (-current-pbb-engine?): New global.
3090 (current-pbb-engine?,set-current-pbb-engine?!): New procs.
3091 (<ifield>,gen-ifld-extract): New arg `indent'.
3092 (<multi-ifield>,gen-ifld-extract): Ditto.
3093 (-hw-gen-set-quiet-pc): Add pbb support. Delete `taken_p'.
3094 (-op-gen-set-trace): Don't print tracing messages for pbb engine.
3095 (-gen-arch-model-decls): Only scan real insns.
3096 (scache-engine-insns,pbb-engine-insns): New procs.
3097 (-create-virtual-insns!): New proc.
3098 (sim-finish!): Call it.
3099 (-decode-specialize-insn?): New proc.
3100 (-decode-specialize-build-assertion): New proc.
3101 (-decode-specialize-insn-1): New proc.
3102 (-decode-specialize-insn): New proc.
3103 (-fill-sim-insn-list!): New proc.
3104 (sim-analyze!): Create copies of insns to be specialized.
3105 * utils-cgen.scm (obj-set-name!): New proc.
3107 * attr.scm (-attr-eval): Rewrite calls to rtx-simplify/rtx-compile.
3108 * iformat.scm (ifmt-analyze): Pass `insn' to semantic-compile,
3110 (ifmt-compute!): Delete arg `arch'. Result is list of iformats,
3112 * mach.scm (arch-analyze-insns!): Update call to ifmt-compute!.
3113 * rtl-c.scm (rtl-c-get): Use DM for default mode instead of VM.
3114 Avoid infinite loop when rtx-eval-with-estate leaves expr alone.
3115 (attr): Rewrite test for insn owner.
3116 (member): New rtx function.
3117 * rtl.scm (rtx-* accessors): Define as cxr directly rather than
3118 as separate function.
3119 (rtx-ifield?,rtx-ifield-name): New procs.
3120 (rtx-operand-obj): Rewrite.
3121 (rtx-operand-name): New proc.
3122 (rtx-cmp-op-mode,rtx-cmp-op-arg): New procs.
3123 (rtx-number-list-values,rtx-member-value,rtx-member-set): New procs.
3124 (tstate-make): New args owner, known. All callers updated.
3125 (tstate-known-lookup): New proc.
3126 (rtx-traverse): New arg owner. All callers updated.
3127 (rtx-make-bool): New proc.
3128 (rtl-find-ifields): Rewrite.
3129 (rtx-simplify,rtx-simplify-eq-attr-{insn,mach}): Moved to ...
3130 * semantics.scm: ... here.
3131 (rtx-const-equal,rtx-const-list-equal): New procs.
3132 (-build-known-values): New proc.
3133 (semantic-compile): New arg `insn'. Call rtx-simplify.
3134 (semantic-attrs): Ditto.
3135 * rtx-funcs.scm (member,number-list): New rtx functions.
3137 * attr.scm (attr-remove-meta-attrs-alist): Delete leading '-' in name.
3138 Rewrite. Delete arg `all-attrs'. All callers updated.
3139 (attr-remove-meta-attrs): Delete leading '-' in name. All callers
3141 * utils-cgen.scm (gen-bool-attrs): Remove meta attrs.
3143 * decode.scm (subdtable-add): Handle `expr' entries.
3144 (exprtable-entry-make): Use vector. Record ifields refered to by expr.
3145 (exprtable-entry-*): Update.
3146 (exprtable-entry-iflds): New proc.
3147 (exprentry-cost): New proc.
3148 (exprtable-sort,-gen-exprtable-name): New procs.
3149 (exprtable-make): New arg `name'. All callers updated. use vector.
3150 (exprtable-*): Update.
3151 (-build-decode-table-entry): Don't issue collision warning if all are
3152 specialized insns. Sort exprtable entries before building table.
3154 * read.scm (-reader-process-expanded-1): Move pretty printing of
3155 input to logging level 4.
3157 * utils.scm (string-list->string): New proc.
3159 * insn.scm (<insn>): Define setters for ifield-assertion, condition,
3161 (insn-read): Delete leading '-' in name. All callers updated.
3162 (real-insn?): New proc.
3163 (real-insns): Rewrite.
3164 (insn-has-ifield?): New proc.
3165 (insn-builtin!): Create insn attribute SPECIALIZED.
3167 * mach.scm (<arch>): Delete member app-data.
3168 (current-raw-insn-list): New proc.
3169 (insn-list-car,insn-list-splice!): New procs.
3170 (<decode-specialize>): New class.
3171 (-isa-parse-decode-specialize): New proc.
3172 (-isa-parse-decode-specializes): New proc.
3173 (<isa>): New members `condition', `decode-specializes'.
3174 (-isa-parse-condition): New proc.
3175 (-isa-parse): New args condition, decode-specializes.
3176 (-isa-read): Recognize condition, decode-specializes.
3177 (-isa-add-decode-specialize!): New proc.
3178 (modify-isa): New proc.
3179 (isa-conditional-exec?,state-conditional-exec?): New procs.
3180 (arch-init!): New reader command `modify-isa'.
3182 * mode.scm (mode-class-signed?,mode-class-unsigned?): New procs.
3183 (mode-signed,mode-unsigned?): New procs.
3185 Thu Jun 3 16:00:40 1999 Doug Evans <devans@canuck.cygnus.com>
3187 * types.scm (<array>): New method get-shape.
3188 * hardware.scm (<hardware-base>): Forward get-shape,get-num-elms
3190 (hw-shape,hw-num-elms): New procs.
3191 * sim.scm (<hw-register>,gen-profile-index-type): Use "unsigned short"
3192 if there's more than 255 registers.
3193 * sid.scm (<hw-register>,gen-profile-index-type): Ditto.
3195 * hardware.scm (-hw-parse): Flag as error CACHE-ADDR specified
3198 1999-05-21 Doug Evans <devans@casey.cygnus.com>
3200 * cgen-sid.scm (sim-arguments): Add -X.
3201 * sid-cpu.scm (-gen-hardware-types): Comment out scache vars.
3202 (-gen-all-semantic-fns): Don't include PBB support virtual insns.
3203 (-gen-sem-case): Use CASE/NEXT macros again. Tweak indenting.
3204 Simplify by supporting pbb engine only.
3205 (-gen-sem-switch-init): New proc.
3206 (-gen-sem-switch-engine): Rename from -gen-sem-switch-fn.
3207 (cgen-sem-switch.cxx): New proc.
3208 * sid-decode.scm (-gen-decode-insn-globals): Replace with-sem-switch?
3209 with with-pbb?. Support dual scache/pbb engines.
3210 (-gen-idesc-decls): Replace with-sem-switch? with with-pbb?.
3211 Support dual scache/pbb engines.
3212 (cgen-decode.h): Generate semantic fn decls if with-scache?.
3213 * sid.scm (*) with-pbb? replaces with-sem-switch?.
3214 (sim-finish!): Create pbb support virtual insns if with-pbb?.
3216 1999-05-10 Ben Elliston <bje@cygnus.com>
3218 * arm7.cpu: Remove coprocessor related fields, operands and insn
3219 definitions for now. Take the undefined instruction trap instead.
3220 (ldmda-wb): New instruction.
3221 (ldmib-wb): Likewise.
3222 (ldmdb-wb): Likewise.
3223 (stmdb-wb): Likewise.
3224 (stmib-wb): Likewise.
3225 (stmda-wb): Likewise.
3227 1999-05-08 Doug Evans <devans@casey.cygnus.com>
3229 * sid.scm (<hw-memory>,cxmake-get): Call GETMEM method, not function.
3230 (<hw-memory>,gen-set-quiet): Call SETMEM method, not function.
3232 * utils-cgen.scm (keyword-list->arg-list): Fix call to substring,
3233 hobbit can't handle optional third arg.
3235 1999-05-07 Doug Evans <devans@casey.cygnus.com>
3237 * arm.cpu (h-tbit): Delete set spec.
3238 (h-mbits): Don't call arm_mbits_set in set spec.
3239 * arm.sim: New file.
3240 * hardware.scm (modify-hardware): New proc.
3241 (hardware-init!): Add modify-hardware command.
3242 * sid.scm (-hw-cxmake-get): Use method call if FUN-ACCESS specified.
3243 (-hw-gen-set-quiet): Ditto.
3244 (sim-finish!): Call invalid_insn method. Define FUN-ACCESS builtin
3245 hardware attribute. Load $arch.sim file if present.
3246 * utils-cgen.scm (keyword-list?): New proc.
3247 (keyword-list->arg-list,arg-list-validate-name): New procs.
3248 (arg-list-check-no-args,arg-list-symbol-arg): New procs.
3250 * arm7.cpu (eval-cond): Pass pc to @cpu@_eval_cond handler.
3252 * sid-cpu.scm (-gen-hardware-types): Rename @cpu@_cpu to
3255 * attr.scm (obj-prepend-atlist!): New proc.
3257 * opc-opinst.scm (cgen-opinst.c): Analyze instructions if necessary.
3259 * sid.scm (<operand>,profilable?): Use op:type.
3260 * sim.scm (<operand>,profilable?): Use op:type.
3262 1999-05-04 Doug Evans <devans@casey.cygnus.com>
3264 * utils.scm (find-index,find): Be more stack friendly.
3266 * arm7.cpu (arith-imm-op): Compute pc before setting cpsr.
3269 1999-05-01 Doug Evans <devans@casey.cygnus.com>
3271 * arm.cpu (h-gr-usr): New hardware element.
3272 (h-gr-fiq,h-gr-svc,h-gr-abt,h-gr-irq,h-gr-und): New hardware elements.
3273 (arm-mode): New keyword.
3274 (h-mbits): Add set spec.
3275 (h-spsr): Implement get/set specs.
3277 * read.scm: Load slib/pp.scm, slib/genwrite.scm.
3278 (-reader-process-expanded-1): Pretty print logging output.
3280 * sid-cpu.scm (-gen-reg-access-defns): Make getters `const'.
3281 (cgen-cpu.h): Print enums before hardware elements.
3282 (cgen-semantics.cxx): @arch@-cgen.h renamed to @arch@-main.h.
3283 * sid-decode.scm (cgen-decode.cxx): Ditto.
3284 * sid-model.scm (cgen-model.cxx): Ditto.
3286 * utils-cgen.scm (context-error): Accept variable number of
3289 * rtx-funcs.scm (error:): New rtx function.
3290 * rtl-c.scm (s-case-vm): New proc.
3291 (-gen-non-vm-case-get,s-case-non-vm): New procs.
3292 (s-case): Simplify, handle non-VM result.
3293 (error:): New rtx function.
3295 1999-04-30 Doug Evans <devans@casey.cygnus.com>
3297 * arm.cpu (h-pc): Add set spec to zero bottom bits.
3298 (test-hi,test-ls): Fix cbit handling.
3299 (shift-type,h-operand2-shifttype): Move here ...
3300 * arm7.cpu: ... from here.
3301 (set-cond,set-cond-maybe,dnix): Delete, unused.
3302 (set-zn-flags,set-logical-cc,set-add-flags,set-sub-flags): Move ...
3303 * arm.cpu: ... to here.
3304 * thumb.cpu (cmp,alu-cmp): Use set-sub-flags.
3305 (alu-cmn): Use set-add-flags.
3306 (alu-tst): Use set-zn-flags.
3307 (alu-cmp): Use set-sub-flags.
3308 (lsl,lsr,asr): Set condition codes.
3309 (add,addi,sub,subi,mov,addi8,subi8): Ditto.
3310 (alu-op): Split into three: alu-logical-op,alu-arith-op,
3312 (hireg-op): Split sem-fn into lo-dest-sem-fn,hi-dest-sem-fn.
3313 All callers updated.
3314 (sub-sp): Rename from add-sp-neg.
3315 (f-lbwl-offset): Delete.
3316 (f-lbwl-hi,f-lbwl-lo): New ifields.
3317 (lbwl-hi,lbwl-lo): Update.
3318 (bl-hi): Add 4 to pc.
3319 (push-reg,pop-reg): Simplify.
3320 (push,push-lr): Push registers in correct order.
3321 (pop,pop-pc): Pop registers in correct order.
3322 (save-reg-inc,load-reg-inc): Simplify.
3323 (ldmia): Save registers in correct order.
3325 1999-04-30 Ben Elliston <bje@cygnus.com>
3327 * arm7.cpu (f-op-hdt): Remove; unused.
3328 (f-ror-imm8-value,f-ror-imm-rotate): New fields.
3329 (f-ror-imm8): New multi-ifield.
3330 (f-operand2-bit7): Remove; use the generic `f-bit7' instead. All
3332 (f-uimm12): New field.
3333 (ror-imm8): New operand.
3335 (hdt-offset8): Reinstate operand.
3336 (offset4-hi,offset4-lo): Remove.
3337 (set-cond): Remove macro; unused.
3338 (set-cond-maybe): Likewise.
3339 (load-word/byte): Use uimm12 operand for a true 12-bit immediate.
3340 (store-word/byte): Likewise.
3341 (load-halfword): Use hdt-offset8 multifield operand instead of two
3342 4-bit operands that are explicitly combined by semantic code.
3343 (do-halfword-store): Bug fix. Set address when not preindexing.
3344 (store-halfword): Also use hdt-offset8 operand.
3345 (arith-op): Avoid clobbering source registers when one of them is
3346 the destination register.
3347 (arith-imm-op): Likewise.
3348 (tst-imm): Use ror-imm8 operand. Handle special case of rot 0.
3349 (teq-imm): Likewise.
3350 (ldm-p): Rename to ldmdb.
3351 (stm-pw): Rename to stmdb-wb.
3352 (multi-action): New macro; test reg-list bits and execute a
3353 semantic fn if the bit is set.
3354 (ldmda,ldmib,ldmia,ldmia-wb,ldmdb): New multiple load insns.
3355 (stmdb,stmib,stmia,stmia-wb,stmda,stmdb-wb): Store insns.
3356 (all insns): Use dnai entries for simplicity rather than dni.
3357 (*): Use short-form of (const ..).
3359 1999-04-29 Doug Evans <devans@casey.cygnus.com>
3361 * rtl.scm (<rtx-func>): Rename member type to style. Rename
3362 member eval to evaluator.
3363 (rtx-foo accessors): Rename from rtx:foo. All callers updated.
3364 (tstate-make): Delete arg op-fn. All callers updated.
3365 (tstate-op-fn,tstate-set-op-fn!): Delete.
3366 (rtx-traverse): Delete op-fn arg. All callers updated.
3367 * semantics.scm (-simplify-for-compilation-process-expr): New proc,
3368 split out of -simplify-for-compilation.
3370 * Makefile.am (CGEN_NONHOB_FILES,CGENFILES): New variables.
3371 (cgen_DEPENDENCIES): Add stamp-cgen.
3372 (stamp-cgen): New rule.
3373 * Makefile.in: Rebuild.
3375 * rtl-c.scm (enum:): Define emitter for.
3376 * rtl.scm (rtx-constant?): Rename from rtx-const? and check for
3378 (rtx-constant-value,rtx-enum-value): New procs.
3379 (-rtx-traverse-normal): Expand enum-value to (enum enum-value).
3380 (rtx-compile-time-constant?): Return #t for enums.
3381 (rtx-true?,rtx-false?): Handle enums.
3382 (rtx-simplify-eq-attr-mach): Use rtx-true,rtx-false instead of
3383 building result by hand.
3384 (rtx-simplify-eq-attr-insn): Ditto.
3385 * rtx-funcs.scm (enum:,enum): New rtx functions.
3387 * mach.scm (<arch>): New members insns-analyzed?, semantics-analyzed?,
3389 (arch-analyze-insns!): New proc.
3390 * opcodes.scm (opcodes-analyze!): Call arch-analyze-insns! instead
3391 of calling ifmt-compute! directly.
3392 * sid.scm (-sim-insns-analyzed?): Delete.
3393 (sim-analyze!): Call arch-analyze-insns! instead of calling
3394 ifmt-compute! directly.
3395 * sim.scm (-sim-insns-analyzed?): Delete.
3396 (sim-analyze!): Call arch-analyze-insns! instead of calling
3397 ifmt-compute! directly.
3399 * utils.scm (string-take-with-filler): New proc.
3400 (string-take): Use it.
3402 * pgmr-tools.scm: New file.
3403 * read.scm: Load it.
3404 * insn.scm (pretty-print-insn-format): Move to pgmr.scm.
3406 * insn.scm (insn-base-mask): Renamed from insn:mask.
3407 All callers updated.
3408 (insn-base-mask-length): Renamed from insn:mask-length.
3409 All callers updated.
3410 (insn-foo): Renamed from insn:foo. All callers updated.
3411 * minsn.scm (minsn-foo): Renamed from minsn:foo. All callers updated.
3412 * iformat.scm (compute-insn-base-mask-length): Renamed from
3413 compute-insn-mask-length. All callers updated.
3414 (compute-insn-base-mask): Renamed from compute-insn-mask.
3415 All callers updated.
3417 * enum.scm (-enum-parse-prefix): New proc.
3418 (<enum>,make!): Don't parse enum values here.
3419 (-enum-parse): Do it here. Call -enum-parse-prefix.
3420 (define-full-insn-enum): Ditto.
3421 (enum-vals-upcase): New proc.
3422 * hardware.scm (define-keyword): Make enum prefix uppercase.
3423 * hobscmif.h (CHAR_LOWERP,CHAR_UPPERP,CHAR_WHITEP): New macros.
3425 * ifield.scm (<ifield>,field-mask): Allow container to be #f.
3426 (<ifield>,field-extract): New method.
3427 (<multi-ifield>,field-extract): New method.
3428 (ifld-extract): New proc.
3429 * opcodes.scm (ifld-insert-fn-name): Renamed from ifld-insert.
3430 (ifld-extract-fn-name): Renamed from ifld-extract.
3432 * ifield.scm (ifld-new-value): Renamed from ifield-make.
3433 All callers updated.
3435 * ifield.scm (ifld-lsb0?): New proc.
3436 (sort-ifield-list): New arg up?. All callers updated.
3437 * iformat.scm (compute-insn-mask): Get lsb0? flag from argument,
3438 rather than global state.
3440 1999-04-27 Doug Evans <devans@casey.cygnus.com>
3442 * insn.scm (pretty-print-insn-format): New proc.
3444 * Makefile.in: Rebuild.
3445 * aclocal.m4: Rebuild
3446 * configure: Rebuild.
3448 Mon Apr 26 10:30:18 1999 Doug Evans <devans@canuck.cygnus.com>
3450 * configure.in (AM_INIT_AUTOMAKE): Update version to 0.7.2.
3451 * configure: Rebuild.
3452 * aclocal.m4: Rebuild.
3453 * Makefile.in: Rebuild.
3454 * doc/Makefile.in: Rebuild.
3455 * doc/version.texi: Rebuild.
3457 1999-04-25 Doug Evans <devans@casey.cygnus.com>
3459 * utils.scm (bits->bools): New proc.
3461 1999-04-23 Doug Evans <devans@casey.cygnus.com>
3463 * sid.scm (<multi-ifield>,gen-ifld-extract-decl): Fix call to
3464 subfield's gen-ifld-extract-decl method.
3466 1999-04-23 Ben Elliston <bje@cygnus.com>
3468 * arm7.cpu (ldrsh-pu): Remove.
3469 (do-halfword-load): New pmacro.
3470 (load-halfword): Likewise.
3471 (do-halfword-store): Likewise.
3472 (store-halfword): Likewise.
3473 (strh-*): New instructions.
3474 (ldrsb-*): Likewise.
3476 (ldrsh-*): Likewise.
3478 1999-04-22 Doug Evans <devans@casey.cygnus.com>
3480 * ifield.scm (ifld-constant?): Delete special handling of RESERVED
3483 * arm7.cpu (do-word/byte-store): Fix typo.
3485 1999-04-22 Ben Elliston <bje@cygnus.com>
3487 * arm7.cpu (do-word/byte-load): Handle cases where the destination
3488 register is the program counter (R15).
3490 * arm7.cpu (do-word/byte-store,store-word/byte): New pmacros.
3491 (str-*): Implement using store-word-byte. Remove older versions.
3492 (bic): Use the `inv' rtx for obtaining bitwise complements.
3493 (bic-imm): Likewise.
3495 (mvn-imm): Likewise.
3496 (store-indev-reg): Remove crufty pmacro.
3497 (load-indiv-reg): Likewise.
3498 (ldm-p): Reverse the order of register processing for decrement.
3500 (stbi): Remove; handled by the str-* insns.
3502 1999-04-21 Doug Evans <devans@casey.cygnus.com>
3504 * thumb.cpu (cmp): Fix carry bit computation.
3507 1999-04-20 Doug Evans <devans@casey.cygnus.com>
3509 * arm.cpu (h-tbit): Specify set spec.
3511 * arm7.cpu (bx): Don't call C routine, just set h-tbit.
3512 (set-sub-flags): Interpret "carry bit" as a borrow.
3513 (all sub/cmp insns): Carry bit is actually a borrow bit.
3514 * thumb.cpu (bx-rs,bx-hs): Don't call C routine, just set h-tbit.
3515 (add-carry,sub-carry,thumb-neg,thumb-bic,thumb-inv): Delete. Use
3517 (hireg-add,hireg-cmp,hireg-move): Ditto.
3519 * read.scm (-CGEN-VERSION): Change version to 0.7.2.
3520 (-CGEN-LANG-VERSION): Ditto.
3522 1999-04-18 Doug Evans <devans@casey.cygnus.com>
3524 * pmacros.scm (-pmacro-make): New arg `default-values',
3525 all callers updated.
3526 (-pmacro-default-values): New proc.
3527 (-pmacro-process-keyworded-args): New proc.
3528 (-pmacro-process-args): New proc.
3529 (-pmacro-invoke): Process arguments before expanding macro.
3530 (-pmacro-get-arg-spec,-pmacro-get-default-values): New procs.
3531 (define-pmacro): Handle default values specified in arg list.
3532 * rtl.scm (rtx-alu-op-mode,rtx-alu-op-arg): New procs.
3533 (rtx-boolif-op-arg[01]): New procs.
3534 (rtx-true,rtx-false,rtx-canonical-bool): New procs.
3535 (rtx-simplify): Handle not,orif,andif.
3536 * semantics.scm (-simplify-for-compilation): Simplify not,orif,andif.
3537 * utils.scm (alist-copy): New proc.
3538 * arm7.cpu (do-word/byte-load,load-word/byte): New pmacros.
3540 (swi): Explicitly set pc.
3542 * thumb.cpu (bx-rs,bx-hs): Reverse test for switch to arm mode.
3544 1999-04-17 Ben Elliston <bje@cygnus.com>
3546 * arm7.cpu (ldr-pu): Do not add 8 to R15; the step() method
3547 correctly adjusts the program counter now.
3549 * arm7.cpu (f-halfword?): Rename from `f-hdt-halfword?'.
3550 (f-signed?): Rename from `f-hdt-signed?'.
3551 (f-offset4-hi): Rename from `h-hdt-off4-ms'.
3552 (f-offset4-lo): Rename from `h-hdt-off4-ls'.
3553 (f-hdt-offset8): Use new field names.
3554 (ldr): Use `imm12' field, not `offset12', since we do our own
3556 (str, str-*): Likewise.
3557 (ldu-*): Remove most; better not implemented than broken.
3559 (ldrsh-pu): New insn.
3563 (ldm-p): Likewise; replace (load-indiv-reg) version.
3565 1999-04-15 Doug Evans <devans@casey.cygnus.com>
3567 * arm.cpu (h-pc): Delete VIRTUAL attribute, get/set specs.
3568 * arm7.cpu (*): Fix mode of result of arm_compute_carry_out_*.
3569 (*): Explicitly specify mode in c-call.
3570 (logical-op): Recognize sets of h-gr[15] as sets of pc.
3572 (and-imm,orr-imm,xor-imm,mov-imm,bic-imm,mvn-imm): Ditto.
3573 (arith-imm-op): New pmacro.
3574 (add-imm,adc-imm,sub-imm,sbc-imm,rsb-imm,rsc-imm): Use it.
3575 * thumb.cpu (bx-rs,bx-hs): Rewrite.
3577 1999-04-14 Doug Evans <devans@casey.cygnus.com>
3579 * rtl.scm (rtx-simplify-eq-attr-insn): Fix call to context-error.
3581 * rtl.scm (rtl-find-ifields): Implement.
3583 * utils-gen.scm: New file.
3584 * read.scm: Load it.
3585 * desc.scm: Move generic attribute code to utils-gen.scm.
3586 * Makefile.am (CGEN_HOB_INPUT_FILES): Add it.
3587 * Makefile.in: Rebuild.
3589 * arm7.cpu (R15-OFFSET): New attribute.
3591 (logical-op): Delete arg `result?'. All callers updated. Use dnai.
3592 Delete use of eval-cond (dnai specifies it). Specify R15-OFFSET of 12
3593 for reg-shift version.
3595 (data processing insns): Reorganize. Use dnai.
3597 * attr.scm (attr-kind): New proc.
3598 (attr-list-enum-list): Rewrite.
3599 (-attr-sort): Split result into two lists, bools and non-bools.
3600 (current-attr-list-for): Update.
3602 * cgen-sid.scm (sim-arguments): Add -H -> build desc.h file.
3603 * sid-cpu.scm (-gen-attr-decls): New proc.
3604 (-gen-insn-attr-decls): New proc.
3605 (cgen-desc.h): New proc.
3606 (cgen-cpu.h): Put everything in @cpu@ namespace.
3607 (gen-parallel-exec-type): Change prefix of parexec struct from
3609 (-gen-trace-record-type): Ditto for trace_record struct.
3610 (-gen-write-case): Update.
3611 (-gen-scache-semantic-fn): Change function prefix from @cpu@ to
3612 @prefix@. Update scache struct references.
3613 (-gen-sem-case): Update scache struct references.
3614 (-gen-sem-switch-fn): Update idesc struct reference.
3615 Update insn_type enum reference.
3616 (cgen-write.cxx): Update scache,argbuf references.
3617 (cgen-semantics.cxx): Simplify namespace choice (always @cpu@).
3618 * sid-decode.scm (IDESC-TABLE-VAR): Change prefix of insn_data
3619 from @cpu@ to @prefix@.
3620 (-gen-decode-insn-entry): Use gen-cpu-insn-enum.
3621 (-gen-decode-expr-entry): Ditto. Change prefix of INSN_X_INVALID
3622 from @CPU@ to @PREFIX@.
3623 (-gen-decoder-switch): Change prefix of INSN_X_INVALID
3624 from @CPU@ to @PREFIX@.
3625 (-gen-decode-insn-globals): Generate insn attributes.
3626 (-gen-sem-fn-name): Change function prefix from @cpu@ to @prefix@.
3627 (-gen-sem-fn-decls): Use -gen-sem-fn-name. Add `using' for
3628 semantic fn typedef.
3629 (-gen-idesc-decls): Simplify cpu class name (always @cpu@_cpu).
3630 Change prefix of scache struct from @cpu@ to @prefix@.
3631 Change prefix of semantic fn typedef from @cpu@ to @prefix@.
3632 Change prefix of idesc struct from @cpu@ to @prefix@.
3633 Change prefix of insn_type enum from @cpu@ to @prefix@.
3634 (-gen-argbuf-fields-union): Change prefix of sem_fields union
3635 from @cpu@ to @prefix@.
3636 (-gen-scache-decls): Change prefix of scache struct from
3637 @cpu@ to @prefix@. Update idesc struct name.
3638 Update decode,execute methods.
3639 (-gen-extract-case): Update to type name changes.
3640 (-gen-decode-fn): Ditto.
3641 (cgen-decode.h): Put everything in @cpu@ namespace (except
3642 semantic fn decls). Change prefix of insn_word from @cpu@ to @prefix@.
3643 (cgen-decode.cxx): Add using namespace @cpu@.
3644 * sid-model.scm (-gen-hw-profile-decls): Change prefix of
3645 model_mark_get/set from @cpu@ to @prefix@.
3646 (gen-model-unit-fn-name): Change function prefix from @cpu@ to
3648 (gen-model-fn-decls): Update idesc struct name. Change prefix
3649 of model_insn_before/after from @cpu@ to @prefix@.
3650 (-gen-model-insn-fn): Update scache/idesc/argbuf struct names.
3651 Update insn_word type name.
3652 (-gen-model-timing-table): Update INSN_TIMING struct name.
3653 (-gen-model-init-fn): Update MODEL_DATA struct name.
3654 (-gen-mach-defns): Update name of init_idesc_table fn.
3655 (cgen-model.cxx): Add using namespace @cpu@.
3656 * sid.scm (gen-cpu-class): Delete.
3657 (gen-attr-type): New proc.
3658 (gen-obj-attr-sid-defn): New proc.
3659 (<operand>,gen-profile-code): Update name of model_mark_get/set fn.
3660 (gen-cpu-insn-enum-decl): Change prefix of insn_type enum from
3662 (gen-cpu-insn-enum): Update name of insn enum.
3663 * thumb.cpu (bx-rs): Rename @cpu@_do_bx to @prefix@_do_bx.
3665 (swi): Rename @cpu@_swi to @prefix@_swi.
3667 * decode.scm (-build-decode-table-entry): Remove heuristic for
3668 distinguishing insns, and use insn ifield-assertion specs.
3670 * desc-cpu.scm (gen-A-attr-mask): Simplify.
3671 (gen-ifld-defns): Boolean attributes begin at number 0 now.
3672 (gen-hw-table-defns,gen-operand-table,gen-insn-table): Ditto.
3673 * opc-itab.scm (-gen-macro-insn-table): Ditto.
3674 * utils-cgen.scm (gen-attr-enum-decl): Change type arg to prefix,
3675 all callers updated.
3676 (gen-attr-name): New proc
3677 (gen-attr-mask): Use it. Boolean attributes start at 0 now.
3678 (gen-obj-attr-defn): Delete num_nonbools count.
3680 * iformat.scm (ifmt-analyze): Handle insn-condition.
3681 (ifmt-compute!): Ditto.
3682 * insn.scm (<insn>): Specify default value for condition,
3683 post-cond-trap,compiled-condition,compiled-semantics.
3684 (<insn>,make!): New arg condition.
3685 (<insn>): Add getters for condition,compiled-condition.
3686 (-insn-parse): New arg condition, all callers updated.
3687 (-insn-read): Recognize condition spec.
3688 (define-full-insn): New arg condition.
3689 * minsn.scm (minsn-make-alias): Update call to (make <insn> ...).
3690 * semantics.scm (semantic-compile): Change arg sem-code to
3692 (semantic-attrs): Ditto.
3693 * sim.scm (sim-finish!): Update calls to define-full-insn.
3694 * simplify.inc (define-normal-insn): Update call to define-full-insn.
3695 * sid-cpu.scm (gen-semantic-code): Handle insn-condition.
3696 * sid.scm (sim-finish!): Update call to define-full-insn.
3698 Tue Apr 13 17:04:34 1999 Doug Evans <devans@canuck.cygnus.com>
3700 * Makefile.am (sim-cpu): Allow specification of ISA.
3701 * Makefile.in: Rebuild.
3703 Sun Apr 11 00:37:56 1999 Jim Wilson <wilson@cygnus.com>
3705 * i960.cpu (sll-expr, srl-expr, sra-expr): Handle large shift counts.
3707 1999-04-10 Doug Evans <devans@casey.cygnus.com>
3709 * sparccom.cpu (check-fp-enable): Wrap TRAP32_FP_DIS in c-code.
3711 * arm.cpu (gr-names): Put pc first so it gets prefered in disassembly.
3713 * attr.scm (atlist?): New proc.
3714 (-attr-eval): Rewrite.
3715 (attr-parse): New proc.
3716 (atlist-parse): Use it.
3718 * decode.scm (exprtable-entry-make): New proc.
3719 (exprtable-entry-insn,exprtable-entry-expr): New procs.
3720 (exprtable-make,exprtable-insns): New procs.
3722 * hardware.scm (hw-mode-ok?): Delete argument `set?'.
3724 (hardware-builtin!): Make h-memory a vector.
3726 * iformat.scm (ifmt-ifields): Renamed from ifmt-fields.
3727 All callers updated.
3728 (ifmt-analyze): Use csem-* accessors on result of semantic-compile.
3730 * insn.scm (<insn>). Rename ifld-assertions to ifield-assertion.
3732 (-insn-parse): Set semantics to #f if not specified.
3733 (define-insn,define-full-insn): Take out code that ignores ALIAS's
3735 (-parse-insn-format): Recognize `=' iformat spec.
3737 * mach.scm (isa-min-insn-bitsize): Ignore ALIAS's.
3738 (isa-max-insn-bitsize): Ditto.
3740 * opcodes.scm (<ifield>,gen-insert): Call rtl-c instead of
3742 (<ifield>,gen-extract): Ditto.
3743 (<multi-ifield>,gen-insert,gen-extract): Ditto.
3744 * sid-cpu.scm (-gen-reg-access-defns): Ditto.
3745 (gen-define-ifmt-ifields): New proc.
3746 (gen-semantic-code): Rewrite.
3747 * sid-decode.scm (-gen-decode-expr-entry): New proc.
3748 (-gen-decoder-switch): Handle expression tables.
3749 (-gen-extract-case): Call gen-define-ifmt-ifields instead of
3751 * sid-model.scm (-gen-model-insn-fn): Call gen-define-ifmt-ifields
3752 instead of gen-define-fields.
3753 * sid.scm (<ifield>,gen-ifld-extract-decl): New arg `indent', all
3755 (<multi-ifield,gen-ifld-extract-decl): Ditto.
3756 (-gen-ifld-extract-base): Call rtl-c instead of rtl-c-with-alist.
3757 (-gen-ifld-extract-beyond): Ditto.
3758 (<multi-ifield>,gen-ifld-extract): Ditto.
3759 (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
3760 rtl evaluation code.
3761 (op:read): Build an <eval-state> to pass to gen-read.
3762 (op:write): Build an <eval-state> to pass to gen-write.
3763 (op:record-profile): Build an <eval-state> to pass to
3765 * sim-cpu.scm (gen-semantic-code): Rewrite.
3766 * sim.scm (-gen-ifld-extract-base): Call rtl-c instead of
3768 (-gen-ifld-extract-beyond): Ditto.
3769 (<multi-ifield>,gen-ifld-extract): Ditto.
3770 (<hw-register>,gen-get-macro,gen-set-macro): Ditto.
3771 (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
3772 rtl evaluation code.
3773 (op:read): Build an <eval-state> to pass to gen-read.
3774 (op:write): Build an <eval-state> to pass to gen-write.
3775 (op:record-profile): Build an <eval-state> to pass to
3778 * operand.scm (<operand>): Give `selector' default value of #f.
3779 Give `num' default value of -1. Give `cond?' default value of #f.
3780 (op:new-mode): Delete arg `set?', all uses updated.
3782 * read.scm (reader-error): Handle #f return from port-filename.
3783 (-init-parse-cpu!): Call rtl-c-init!.
3784 (reader-install-builtin!): Call rtl-builtin!.
3786 * rtl-c.scm: New file.
3787 * semantics.scm: New file.
3788 * read.scm: Load them.
3789 * rtl.scm: C generation moved to rtl-c.scm. Semantic analysis moved
3791 (<rtx-func>): Delete members syntax?,macro,c,expr. New members
3793 (rtx-lookup): Renamed from -rtx-func-lookup. All callers updated.
3794 (-rtx-num-text,-rtx-max-num): New globals.
3795 (def-rtx-operand-node,define-rtx-operand-node): New procs.
3796 (-rtx-macro-lookup): New proc.
3797 (rtx-lvalue-mode-name): Renamed from rtx-expr-mode-name.
3798 (rtx-env-stack-empty?,rtx-env-stack-head): New procs.
3799 (rtx-env-var-list,rtx-env-empty-stack,rtx-env-init-stack1): New procs.
3800 (rtx-env-make,rtx-env-empty?,rtx-env-make-locals): New procs.
3801 (rtx-env-push,rtx-temp-lookup,-rtx-closure-make): New procs.
3802 (rtx-make,rtx-kind?,rtx-const?,rtx-const-value,rtx-symbol-name,
3803 rtx-operand?,rtx-operand-obj,rtx-local?,rtx-local-obj, rtx-xop-obj,
3804 rtx-index-of-value,rtx-if-mode,rtx-if-test,rtx-if-then,rtx-if-else,
3805 rtx-eq-attr-owner,rtx-eq-attr-attr,rtx-eq-attr-value): New procs.
3806 (rtx-pretty-name): New proc.
3807 (-rtx-traverser-table,-rtx-make-traverse-table): New procs.
3808 (rtx-traverse-*): Rewrite rtx traversing.
3809 (rtx-eval-*): Rewrite rtx evaluation.
3810 (rtx-compile): New proc.
3811 (rtx-simplify): New proc.
3812 (rtx-simply-eq-attr-mach,rtx-simplify-eq-attr-insn): New procs.
3813 * rtx-funcs.scm: C generation moved to rtl-c.scm.
3814 (ifield,index-of): Rewrite.
3815 (name): Renamed from `operand:'.
3816 (operand,xop,local): New rtx's.
3817 (current-insn): Rewrite.
3818 * Makefile.am (CGEN_HOB_INPUT_FILES): Add rtl-c.scm, semantics.scm.
3819 (cgen-hob.h): Remove rule for.
3820 (cgen-hob.o): Depend on cgen-hob.c only.
3821 * Makefile.in: Rebuild.
3823 * utils-cgen.scm (vmake): New proc.
3824 (<context>): New class.
3825 (context-make-prefix,context-error): New procs.
3827 Fri Apr 9 19:26:28 1999 Jim Wilson <wilson@cygnus.com>
3829 * i960.cpu: Add some ??? comments.
3830 (xnor, ornot): New instructions.
3831 (*): Delete obsolete COND-CTI and UNCOND-CTI attributes.
3833 1999-04-08 Doug Evans <devans@casey.cygnus.com>
3835 * cos.scm (-object-error): Print better error message.
3837 * pmacros.scm (-pmacro-env-make): Renamed from -env-make.
3838 (-pmacro-env-ref): Renamed from -env-ref.
3840 1999-03-31 Doug Evans <devans@casey.cygnus.com>
3842 * hardware.scm (<hw-pc>,parse!): Allow get/set specs.
3844 (hardware-builtin!): Delete h-pc builtin.
3845 * arm.cpu (h-pc): Define.
3846 (h-gr): Delete get,set specs. Make array of 16 regs again.
3847 * arm7.cpu (set-logical-cc-maybe): Delete.
3848 (set-zn-flags,set-add-flags,set-sub-flags): New macros.
3849 (data processing insns): Rewrite.
3850 * m32r.cpu (h-pc): Define.
3851 * fr30.cpu (h-pc): Define.
3852 * i960.cpu (h-pc): Define.
3853 * sparc.cpu (h-pc): Define.
3855 * rtl.scm (-rtx-traverse-operands): Add some error checking to LOCALS.
3856 (s-parallel): Replace do {...} while (0) with {...}.
3857 (s-sequence): Ditto.
3859 * sid-cpu.scm (gen-parallel-exec-type): Make type of `written'
3861 (-gen-write-case,-gen-sem-case): Ditto.
3862 (-gen-sem-case): Only specify `written' if profiling or
3863 parallel-write-back.
3864 (-gen-scache-semantic-fn,-gen-all-semantic-fns): Put procs back in.
3865 (-gen-sem-switch-fn): New proc.
3866 (cgen-semantics.cxx): Emit either semantic fns or semantic switch
3867 based on with-sem-switch option.
3868 * sid-decode.scm (-gen-decode-insn-globals): Only define
3869 idesc_table_initialized_p if with-sem-switch. Record semantic fn
3870 addresses in idesc_table if !with-sem-switch.
3871 (-gen-sem-fn-decls): Rewrite.
3872 (-gen-idesc-decls): Define @cpu@_sem_fn type. Define `execute'
3873 member based on with-sem-switch. Only define
3874 `idesc_table_initialized_p' member if with-sem-switch.
3875 (cgen-decode.h): If !with-sem-switch, declare semantic fns.
3876 * sid.scm (-with-sem-switch?): New variable.
3877 (option-init!): Initialize it.
3878 (option-set!): Set it.
3879 (with-sem-switch?): New proc.
3880 (-op-gen-set-trace): Only emit `written' reference if profiling.
3881 (sim-finish!): Use h_pc_set to set pc.
3883 1999-03-30 Doug Evans <devans@casey.cygnus.com>
3885 * sparccom.cpu (arith-cc-binop): New args s32-set-flags,s64-set-flags.
3886 All callers updated.
3887 (arith-carry-cc-binop): New arg set-flags. All callers updated.
3889 * sid.scm (gen-argbuf-type): Delete.
3890 (-gen-argbuf-fields-union): Move to ...
3891 * sid-decode.scm: ... here.
3893 * read.scm (-reader-process-expanded-1): New proc.
3894 (-reader-process-expanded): Call it to catch nested begin's.
3895 (reader-process): Move `begin' handling to -reader-process-expanded.
3897 * insn.scm (-insn-read): Fix name of `format' spec.
3899 * pmacros.scm (.pmacro): New builtin.
3900 (scan-symbol): If procedure macro, return macro rather than its symbol.
3901 (check-macro): Don't do lookup, instead check if (car expr) is
3903 (scan-list): Handle .pmacro.
3904 (scan): No longer re-examine text for another macro invocation.
3905 (-pmacro-build-lambda): New proc.
3906 (define-pmacro): Rewrite. If defining one pmacro to be an alias of
3907 another, fetch the other's value (rather than doing it during
3910 1999-03-27 Doug Evans <devans@casey.cygnus.com>
3912 * Makefile.am (CGEN_HOB_INPUT_FILES): Add decode.scm.
3913 * Makefile.in: Rebuild.
3915 * decode.scm (decode-get-best-bits): Use memq instead of element?.
3916 (-fill-slot!): Simplify.
3917 (-build-slots): Simplify.
3919 * dev.scm (load-sid): Don't load sid-arch.scm.
3921 * sid-decode.scm: Replace computed goto decoder/extractor with plain
3923 * sim-decode.scm: Replace computed goto decoder/extractor with plain
3926 1999-03-26 Doug Evans <devans@casey.cygnus.com>
3928 * sim-decode.scm: Clean up pass. Move decoder computation into ...
3929 * decode.scm: ... here. New file.
3930 * sid-decode.scm: Use decoder computation code in decode.scm.
3931 * read.scm: Load decode.scm.
3933 * arm.cpu (arm710 model): Add u-exec function unit.
3934 (h-gr): Delete CACHE-ADDR for now. Make array of 15, not 16 regs.
3935 Add get/set specs to redirect reg 15 to h-pc.
3936 (h-*): Indicate for both ARM and THUMB isas.
3937 (cbit,nbit,vbit,zbit): Ditto.
3938 (h-ibit,h-fbit,h-tbit,h-mbits): New hardware elements.
3939 (h-cpsr): Make virtual. Add get/set specs.
3940 (h-spsr-fiq,h-spsr-svc,h-spsr-abt,h-spsr-irq,h-spsr-und): New hw.
3941 (h-spsr): New virtual reg.
3942 * arm7.cpu (shift-type): New explicitly defined keyword.
3943 (h-operand2-shifttype): Use it.
3944 (set-logical-cc-maybe): Delete carry-out arg. New args arg1,arg2.
3945 All callers updated. Don't set cbit.
3946 (logical-op): Add rm to ifield list. Change case to case:. Use
3947 shift-type enum as case choices. Set cbit.
3948 (and,orr,eor,add-imm): Uncomment out.
3949 (undefined): Temporarily comment out.
3950 * thumb.scm (mov,cmp,addi8,subi8,str-sprel,ldr-sprel): s/rd/bit10-rd/.
3951 (lda-pc,lda-sp): Ditto.
3952 (ldr-pc): Rename from ldr.
3953 (cbranch): Mark insns as being thumb insns.
3955 * attr.scm (<bitset-attribute>,parse-value): Recognize strings.
3957 * cgen-sid.scm: Don't load sid-arch.scm.
3958 (sim-arguments): Delete unused entries.
3959 * sid-arch.scm: Delete.
3961 * insn.scm (<insn>,iflds): Renamed from flds. All uses updated.
3962 (<insn>,ifld-assertions): New member.
3963 (<insn>,make!): New arg ifld-assertions, all callers updated.
3964 (<insn> accessors): Change insn:foo to insn-foo. All callers updated.
3965 (insn:fields): Delete.
3966 (-insn-parse): New arg ifld-assertions. All callers updated.
3967 (-insn-read,define-insn): New procs.
3968 (define-full-insn): New arg ifld-assertions. All callers updated.
3969 (insn-init!): New comment define-insn.
3971 * model.scm (-model-parse): Ensure at least one unit specified.
3973 * rtl.scm (-rtx-traverse-operands): Recognize environments.
3974 (<c-expr-temp>,get-name): New method.
3975 (-rtx-make-current-closure,s-closure): New proc.
3976 (hw:): Wrap rtx indices in a closure.
3977 (-gen-case-prefix): New proc.
3979 * rtx-funcs.scm (case:): Fix call to s-case.
3980 (closure): New rtx func.
3982 * hardware.scm (<hardware-base>): New member isas-cache.
3983 (<hardware-base>,get-isas): New method.
3984 (hardware-builtin): Indicate for all isas.
3985 * ifield.scm (-ifield-parse): Only keep if isa+mach are kept.
3986 * mach.scm (current-arch-mach-name-list): Return list of names.
3987 (current-isa-mach-name-list): Ditto.
3988 (define-arch): Install builtin objects here.
3989 * read.scm (keep-atlist?): Only keep if both mach and isa are
3991 (keep-mach-atlist?): New proc.
3992 (keep-isa-multiple?,current-keep-isa-name-list): New proc.
3993 (reader-install-builtin!): Renamed from -install-builtin!.
3994 * sid-cpu.scm (-gen-reg-access-defns): Renamed from
3995 -gen-cpu-reg-access-defns. Rewrite.
3996 (gen-reg-access-defn): Delete.
3997 (-gen-hardware-struct): New proc.
3998 (-gen-hardware-types): Simplify. Add multiple-isa support.
3999 (gen-semantic-fn,-gen-all-semantics): Delete.
4000 (-gen-read-args,-gen-read-case,-gen-read-switch): Delete.
4001 (cgen-cpu.c,cgen-read.c,cgen-sem-switch.c,cgen-mainloop.in): Delete.
4002 (cgen-write.cxx,cgen-semantics.cxx,cgen-decode.cxx): Renamed from *.c.
4003 Call sem-analyze-insns!.
4004 (cgen-semantics.cxx): Add multiple-isa support.
4005 * sid-decode.c (-gen-idesc-decls): Add multiple-isa support.
4006 (-gen-scache-decls,-gen-decode-fn): Ditto.
4007 (cgen-decode.h): Call sem-analyze-insns!.
4008 * sid-model.scm (cgen-model.cxx): Renamed from cgen-model.c.
4009 * sid.scm (-with-multiple-isa?): New variable.
4010 (option-init!): Initialize it.
4011 (option-set!): Set it.
4012 (with-multiple-isa?): New proc.
4013 (gen-cpu-ref): New arg isas. All callers updated.
4014 (gen-cpu-class): New proc.
4015 (*-get-macro,*-set-macro): Delete.
4016 (gen-reg-get-fun-name,gen-reg-set-fun-name): New procs.
4017 (-hw-gen-fun-get): Call gen-reg-get-fun-name.
4018 (-hw-gen-fun-set): Call gen-reg-set-fun-name.
4019 (-gen-hw-index): Call rtx-c instead of rtx-c-with-temps for rtxs.
4020 (-sim-insns-analyzed): New global variable.
4021 (sim-init!): Reset it.
4022 (sim-analyze-insns!): New proc.
4023 (sim-analyze!): Don't do instruction analysis here.
4024 (sim-finish!): Specify isa of x-invalid insn.
4025 * sim.scm (sim-finish!): Specify isa of added x-* virtual insns.
4027 1999-03-22 Doug Evans <devans@casey.cygnus.com>
4029 * thumb.cpu (cpu,mach,model): Delete.
4030 (dntf): New pmacro. Use it for all field definitions.
4031 (dntop): New pmacro. Use it for all operand definitions.
4032 (asr): Correct field list.
4033 (add,addi,sub,subi,add-sp,add-sp-neg): Ditto.
4035 * utils-cgen.scm (define-getters): New macro to simplify
4036 writing class accessors.
4037 (define-setters): Ditto.
4038 (sanitize): Recognize isa elements.
4040 * sid-cpu.scm (*): Replace cpu:parallel-exec? call with
4041 state-parallel-exec?.
4042 * sid-model.scm (*): Ditto.
4043 * sid-decode.scm (*): Ditto. Replace cpu:decode-assist with
4044 state-decode-assist.
4046 * sid-decode.scm (decode-bits): Replace list-reverse! with reverse!.
4047 (-gen-decode-switch): Rewrite to not generate deeply nested lists.
4048 * sim-decode.scm (-gen-decode-switch): Ditto.
4050 * sim-arch.scm (-regs-for-access-fns): Delete.
4051 (-biggest-reg-mode,-gen-arch-reg-access-decls): Delete.
4052 (-gen-arch-reg-access-defns): Delete.
4054 * sim-cpu.scm (*): Replace cpu:liw-insns with state-liw-insns,
4055 cpu:parallel-insns with state-parallel-insns, cpu:parallel-exec?
4056 with state-parallel=exec?.
4057 (cgen-*): Call sim-analyze-insns! here.
4058 * sim-decode.scm (cgen-*): Ditto.
4059 * sim-model.scm (cgen-*): Ditto.
4060 * sim.scm (-sim-insns-analyzed): New global variable.
4061 (sim-init!): Reset it.
4062 (sim-analyze-insns!): Renamed from sim-analyze!. Keep track if we've
4063 already done the analysis.
4065 * sim-model.scm (-gen-mach-defns): Add mach attribute number to
4068 * arm.cpu: Only include arm7.cpu,thumb.cpu if necessary.
4069 (arm arch): Update isa spec.
4070 (arm,thumb isas): Define.
4071 (arm7 cpu): default-insn-bitsize,base-insn-bitsize moved to isas.
4072 (arm7tdmi mach): Add isa spec.
4073 * arm7.cpu (*): Replace subreg: with subword:. Remove unnecessary
4074 `const' on word number.
4075 * fr30.cpu (fr30 arch): Update isa spec.
4077 (fr30bf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
4079 * i960.cpu (i960 arch): Update isa spec.
4081 (i960base cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
4082 liw-insns,parallel-insns moved to isas spec.
4083 * m32r.cpu (m32r arch): Update isas spec.
4085 (m32rbf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
4086 liw-insns,parallel-insns moved to isa spec.
4087 * sparc.cpu (sparc arch): Update isas spec.
4088 (sparc isa): Define.
4089 * sparc32.cpu (sparc32 cpu): default-insn-bitsize,base-insn-bitsize,
4090 decode-assist moved to isa spec.
4091 * sparc64.cpu (sparc64 cpu): Ditto.
4092 * sparccom.cpu (trap insns): Correct mode of result of c-call:.
4093 * desc-cpu.scm (-gen-isa-table-defns): New proc.
4094 (-gen-mach-table-defns): Output mach table.
4095 (-gen-hash-defines): Delete insn size macros, except for
4097 (-cgen-cpu-open): Rewrite cpu_open handling. Take stdarg list of args.
4098 (cgen-desc.h): Define MAX_ISAS.
4099 (cgen-desc.c): Include stdarg.h. Call -gen-isa-table-defns.
4100 * mach.scm (<arch>): Rename arch-data to data. New member isa-list.
4101 (arch-* accessors): Renamed from arch:*. All callers updated.
4102 (current-arch-isa-name-list): New proc.
4103 (-arch-parse-isas): Renamed from -arch-parse-isa.
4104 (def-isa-attr!): Rewrite.
4105 (<iframe>): New class.
4106 (<itype>): New class.
4108 (isa-min-insn-bitsize,isa-max-insn-bitsize): New procs.
4109 (isa-integral-insn?,isa-parallel-exec?): New procs.
4110 (-isa-parse,-isa-read,define-isa): New proc.
4111 (<cpu>): Members default-insn-bitsize,base-insn-bitsize,decode-assist,
4112 liw-insns moved to <isa>.
4113 (cpu-* accessors): Renamed from cpu:*. All callers updated.
4114 (-cpu-parse,-cpu-read): Update.
4115 (state-*): Renamed from state:*. All callers updated.
4116 (state-default-insn-bitsize,state-base-insn-bitsize): Use isa spec,
4118 (state-parallel-insns,state-parallel-exec?,state-liw-insns): New procs.
4119 (state-decode-assist): New proc.
4120 (<derived-arch-data>): Delete min-insn-bitsize,max-insn-bitsize.
4121 (-adata-set-derived!): Rewrite.
4122 (adata-integral-insn?): Renamed from adata:integral-insn?. All
4124 (arch-init!): Add define-isa command.
4125 * read.scm (<reader>): Default keep-isa member to (all).
4126 (reader-* accessors): Renamed from reader:*. All callers updated.
4127 (-keep-isa-set!): Call string->symbol on isa name list.
4128 (keep-isa-validate!): Rewrite.
4129 (current-isa): New proc.
4130 (keep-isa?): Recognize "all".
4131 (-init-parse-cpu!): New arg keep-isa. All callers updated.
4132 Call -keep-isa-set!.
4133 (cmd-if): Recognize keep-isa?.
4134 (cpu-load): New arg keep-isa. All callers updated.
4135 (-opt-spec-update): New proc.
4136 (common-arguments): First arg is string, not symbol.
4137 (-cgen): Call -opt-spec-update. Rewrite argument parsing.
4139 * rtl.scm (rtx-get): Default mode of string arg is INT.
4141 * rtl.scm (s-subword): Renamed from s-subreg. All uses updated.
4143 * rtx-funcs.scm (join:): Pass cpu to handler.
4145 * configure.in (guile_include_dir): Delete.
4146 * configure: Rebuild.
4147 * Makefile.in: Rebuild.
4148 * doc/Makefile.in: Rebuild.
4150 * sid-cpu.scm (-extract-chunk-specs): New proc.
4151 (gen-define-fields): Use it.
4152 (-extract-chunk): New proc.
4153 (-gen-extract-beyond-var-list): Use it.
4154 (gen-extract-fields): Simplify.
4156 1999-03-22 Ben Elliston <bje@cygnus.com>
4158 * arm7.cpu (ldri-p): New instruction.
4159 (swi): Do not vector through 0x8 yet--there is nothing there.
4162 (all): Use (const x) in subreg expressions.
4164 1999-03-19 Ben Elliston <bje@cygnus.com>
4166 * arm7.cpu (smull): Use operand field `rs', not `mul-rn'. Thinko.
4169 1999-03-17 Doug Evans <devans@casey.cygnus.com>
4171 * fr30.cpu (define-arch): Specify "forced" default-alignment.
4172 * mach.scm (-parse-alignment): Recognize "forced" alignment.
4173 * sim-cpu.scm (-extract-chunk-specs): New proc.
4174 (gen-define-fields): Use it.
4175 (-extract-chunk): New proc.
4176 (-gen-extract-beyond-var-list): Use it.
4177 (gen-extract-fields): Simplify.
4179 Port to guile 1.3.1.
4180 * Makefile.am (GUILEINCDIR,GUILELDFLAGS,GUILELDADD): Delete.
4181 (LIBIBERTY): New var.
4182 (HOB_OBJS): Add cgen-gh.o.
4183 (hobbit): Delete $(CFLAGS) from link, add $(LIBS) $(LIBIBERTY).
4184 * Makefile.in: Rebuild.
4185 * acconfig.h: Add HAVE_3_ARG_SCM_MAKE_VECTOR.
4186 * config.in: Rebuild.
4187 * configure.in: Add checks for libdl, libreadline, libnsl, libsocket,
4188 libncurses, libtermcap.
4189 Add checks for needed functions in guile 1.2 not in guile 1.3,
4190 and vice versa. Add test for 3 argument scm_make_vector.
4191 * configure: Rebuild.
4192 * cgen-gh.c (scm_list_length,scm_list_append,scm_list_reverse): Provide
4193 definitions if guile doesn't have them.
4194 (gh_make_vector,gh_length,gh_vector_set_x,gh_vector_ref):
4195 (cgh_vector): Replace gh_vector with gh_make_vector. Replace gh_vset
4196 with gh_vector_set_x.
4197 (cgh_qsort): Replace gh_list_length with gh_length.
4198 * cgen-gh.h: Add decls for added functions.
4199 (cgh_qsort): Don't declare if IN_HOBBIT.
4200 * cos.c: Include config.h. Replace gh_vref with gh_vector_ref,
4201 gh_vset with gh_vector_set_x, gh_list_length with gh_length,
4202 scm_make_vector with gh_make_vector.
4203 * cos.scm: Use vector-length instead of length on vectors.
4204 * dev.scm (cload): Make varargs proc with keyword/value args.
4205 * hobscmif.h: Include config.h, cgen-gh.h. Undef make_vector and
4206 provide version that works with guile 1.2 or 1.3.
4207 Include private copy of scmhob.h.
4208 * scmhob.h: New file. Keep our own copy for now.
4210 Tue Mar 16 13:22:01 1999 Doug Evans <devans@canuck.cygnus.com>
4212 * rtl.scm (-rtx-traverse-error): Ensure expression is output in
4214 (-rtx-traverse-operands): Dump cx temp stack if debugging.
4215 (-cx-temp-dump-stack): Pretty up output.
4217 * arm.cpu: comment out thumb.cpu until isa support ready.
4218 * arm7.cpu (bl): Replace lr with (reg h-gr 14).
4219 (f-imm12,f-offset24,swi,undef): Fix thinko, add `const'.
4220 * thumb.cpu (h-gr-t,h-lr-t,h-sp-t,dnti,h-hiregs): s/MACH/ISA/.
4222 * sid-decode.scm (cgen-decode.c): Call rtl-gen-init!.
4224 1999-03-11 Doug Evans <devans@casey.cygnus.com>
4226 * hardware.scm (<hw-immediate>,mode-ok?): Ensure result is boolean.
4227 (<hw-address>,mode-ok?): unsigned/signed are compatible.
4229 * operand (op:new-mode): Improve error message.
4231 * arm.cpu: Move arm isa into arm7.cpu. Include arm7.cpu, thumb.cpu.
4232 * arm7.cpu: New file.
4234 1999-03-12 Ben Elliston <bje@cygnus.com>
4236 * arm.cpu: Lots of minor fixes after desk checking.
4238 1999-03-11 Doug Evans <devans@casey.cygnus.com>
4240 * thumb.cpu: snapshot of current work
4242 * rtl.scm (rtx-get): Tweak error message.
4244 1999-03-10 Doug Evans <devans@casey.cygnus.com>
4246 * Makefile.am (cos.o,cgen.o,cgen-gh.o): Fix dependencies.
4247 * Makefile.in: Rebuild.
4249 * cos.c (cos_vector_copy): New function.
4250 (_object_copy): Use it.
4252 * mode.scm (mode:eq?): Clean up.
4253 * rtl.scm (cx-new-mode): Copy attributes.
4254 (rtx-get): Don't make copy if <c-expr> with identical mode.
4256 * fr30.cpu (define-arch): Delete default-insn-word-bitsize,
4258 (gr-names): h-gr register names moved here.
4260 (cr-names): h-cr register names moved here.
4262 (dr-names): h-dr register names moved here.
4264 (h-ps): Replace FUN-ACCESS attribute with get/set specs.
4265 (h-sbit,h-ccr,h-scr,h-ilm): Ditto.
4266 * i960.cpu (define-arch): Delete default-insn-word-bitsize,
4268 * m32r.cpu (define-arch): Delete default-insn-word-bitsize,
4270 (gr-names): h-gr register names moved here.
4272 (cr-names): h-cr register names moved here.
4274 (h-accum): Replace FUN-ACCESS attribute with get/set specs.
4275 (h-accums,h-psw): Ditto.
4276 * sparc.cpu (define-arch): Delete default-insn-word-bitsize,
4278 (gr-names): h-gr register names moved here.
4279 (h-gr-indices): Delete.
4280 (sparc32 h-gr): Update. Replace FUN-ACCESS with get/set specs.
4281 (sparc64 h-gr): Ditto.
4282 (h-y): Add get/set specs.
4284 (fp operands): Rewrite.
4285 * sparc32.cpu (h-psr): Replace FUN-ACCESS with get/set specs.
4286 (h-tbr,h-cwp,h-wim): Ditto.
4287 * sparc64.cpu (h-fpsr): Add get/set specs.
4288 * sparccom.cpu (ldd-reg+reg): Load value all at once.
4289 (fp-ld-op): New arg `dest', all callers updated.
4290 (*): Replace `make-di' with `join'.
4292 * sid-cpu.scm (-gen-cpu-reg-access-defns): Use get/set specs if
4294 (gen-semantic-code): Save/restore rtl generator state.
4295 (cgen-cpu.h): Call rtl-gen-init!.
4296 * sid.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
4297 (-gen-ifld-extract-beyond): Ditto.
4298 (<multi-ifield>,gen-ifld-extract): Ditto.
4299 (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
4301 (-hw-gen-set-quiet-pc): Ditto.
4302 (<hw-pc>,gen-write): Ditto.
4303 (-hw-cxmake-get): Ditto. Call getter function if present.
4304 (<hw-register>,cxmake-get-raw): New method.
4305 (<hw-register>,gen-set-quiet-raw): New method.
4306 (-hw-gen-set-quiet): New arg `gstate'.
4307 (hw-fun-access?): Delete.
4308 (gen-reg-access-defn): Output function contents.
4309 (-gen-hw-index-raw): Update call to rtx-c. Update cxmake-get
4311 (-gen-hw-index): Ditto.
4312 (op:read): Update gen-read invocation.
4313 (op:write): Update gen-write invocation.
4314 (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Handle raw-reg
4316 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
4317 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
4318 (<unit>,gen-profile-code): Update to sim.scm version.
4320 * sim-arch.scm (-regs-for-access-fns): New proc.
4321 (-biggest-reg-mode): New proc.
4322 (-gen-arch-reg-access-decls,-gen-arch-reg-access-defns): Rewrite.
4323 * sim-cpu.scm (-gen-hardware-types): Output get/set handlers for
4324 virtual regs separately.
4325 (-gen-cpu-reg-access-defns): Replace fun-access? with new
4327 (gen-semantic-code): Save/restore rtl generator state.
4328 (cgen-cpu.h): Call rtl-gen-init!.
4329 (cgen-cpu.c): Ditto. #include cgen-ops.h.
4330 * sim-model.scm: mach:cpu renamed to mach-cpu. mach:bfd-name
4331 renamed to mach-bfd-name.
4332 * sim.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
4333 (-gen-ifld-extract-beyond): Ditto.
4334 (<multi-ifield>,gen-ifld-extract): Ditto.
4335 (<scalar>,gen-sym-get-macro): Update call to gen-get-macro.
4336 (<scalar>,gen-sym-set-macro): Update call to gen-set-macro.
4337 (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
4339 (hw-fun-access?): Delete.
4340 (-hw-gen-set-quiet-pc): New arg `gstate'.
4341 (<hw-register>,gen-get-macro): Rewrite.
4342 (<hw-register>,gen-set-macro): Rewrite.
4343 (-hw-gen-fun-get,-hw-gen-fun-set): Delete.
4344 (-hw-cxmake-get): New arg `gstate'. Rewrite.
4345 (<hw-register>,cxmake-get-raw): New method.
4346 (-hw-gen-set-quiet): New arg `gstate'. Rewrite.
4347 (<hw-register>,gen-set-quiet-raw): New method.
4348 (-gen-hw-index-raw): Update call to rtx-c. Update cxmake-get
4350 (-gen-hw-index): Ditto.
4351 (<hw-index>): New arg `gstate'.
4352 (-gen-hw-selector): Update call to rtx-c.
4353 (<pc>): New arg `gstate'.
4354 (op:read): Update gen-read invocation.
4355 (op:write): Update gen-write invocation.
4356 (<operand>,cxmake-get): Handle raw-reg.
4357 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
4358 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
4359 (<operand>,gen-set-quiet): Handle raw-reg.
4360 (<operand>,gen-set-trace): Handle raw-reg.
4361 (-gen-mach-data): mach:cpu renamed to mach-cpu.
4363 * desc-cpu.scm (gen-operand-decls): Take nub of operands for
4364 cgen_operand_type enum.
4365 (gen-operand-table): Add operand type enum. Replace pointer to
4366 hardware element with its enum. Null terminate table.
4367 (-gen-cpu-open): Add new `isa' argument to @arch@_cgen_cpu_open.
4368 Build operand table.
4369 * ifield.scm (-ifield-parse): Recognize ISA attribute.
4370 * mach.scm (<arch-data>): New member `isas'.
4371 (adata-isas): New accessor.
4373 (isa-default-insn-word-bitsize): New accessor.
4374 (isa-enum): New proc.
4375 (current-arch-default-insn-word-bitsize): Delete.
4376 (current-isa-list,current-isa-lookup): New procs.
4377 (-arch-parse-isa): New proc.
4378 (-arch-parse): Rewrite.
4379 (-arch-read): Recognize `isas'. Delete `default-insn-word-bitsize'.
4380 (define-arch): Define ISA attribute.
4381 (def-isa-attr!,isa-supports?): New procs.
4382 (<mach>): New member `isas'.
4383 (mach-isas): New accessor.
4384 (-mach-parse): New arg `isas', all callers updated.
4385 (-mach-read): Recognize `isas'.
4386 (arch-finish!): Rewrite.
4387 * opc-ibld.scm (-gen-fget-switch): Add `cd' arg to
4388 @arch@_cgen_get_{int,vma}_operand.
4389 (-gen-fset-switch): Add `cd' arg to @arch@_cgen_set_{int,vma}_operand.
4390 * opc-opinst.scm (-gen-operand-instance): Output operand enum instead
4391 of pointer to table entry.
4392 * opcodes.scm (gen-switch): Handle multiply defined operands.
4393 * operand.scm (op-sort): New proc.
4395 * hardware.scm (<hardware-base>): Rename getters/setters to get/set.
4396 (hw-getter,hw-setter): Renamed from hw-getters,hw-setter.
4397 (hw-enum): Accept symbol argument.
4398 (hardware-builtin!): Delete attribute FUN-ACCESS.
4399 * ifield.scm (ifld-encode-mode,ifld-decode-mode): New procs.
4401 * attr.scm (atlist-source-form): New proc.
4402 (attr-builtin!): New attr `PRIVATE'.
4403 * desc.scm (<keyword>,gen-defn): Make keyword entry table static.
4404 * desc-cpu.scm (-gen-hw-defn): Only output index and value tables
4405 if they have `PRIVATE' attribute.
4406 (gen-hw-table-defns): Output definitions of explicitly defined
4408 * hardware.scm (<keyword>): New member print-name. Rename member
4409 `value' to `values', all uses updated.
4410 (kw-mode,kw-print-name,kw-prefix,kw-values): New procs.
4411 (keyword-parse): Rewrite.
4412 (-keyword-read): New proc.
4413 (define-keyword): New proc.
4414 (-hw-parse-keyword): New proc.
4415 (-hw-parse-indices): Rewrite keyword handling, support new index spec
4417 (-hw-parse-values): Ditto.
4418 (-hw-parse-get,-hw-parse-set): Rewrite.
4419 (hardware-init!): Add new comment define-keyword.
4420 * mach.scm (<arch>): New member `kw-list'.
4421 (arch:kw-list,arch_set-kw-list!): New accessors.
4422 (current-kw-list,current-kw-add!,current-kw-lookup): New procs.
4424 * hardware.scm (<hw-register>,mode-ok?): Rewrite.
4425 * mode.scm (mode-class-integral?): New proc.
4426 (mode-class-float?,mode-class-numeric?): New procs.
4427 (mode-integral?,mode-float?,mode-numeric?): New procs.
4428 (mode-compatible?): New proc.
4429 * opcodes.scm (<ifield>,gen-insert): Update alist arg to
4431 (<ifield>,gen-extract): Ditto.
4432 * rtl.scm (-rtl-simulator?,-rtx-current-obj): Delete.
4433 (<gstate>): New class.
4434 (gstate-simulator?,gstate-set-simulator?!): New accessors.
4435 (gstate-context,gstate-set-context!): New accessors.
4436 (gstate-macro?,gstate-set-macro?!): New accessors.
4437 (gstate-make,gstate-copy): New procs.
4438 (-rtl-current-gstate): New global.
4439 (current-gstate-simulator?): New proc.
4440 (current-gstate-context,current-gstate-macro?): New procs.
4441 (current-gstate,current-gstate-set!): New procs.
4442 (rtl-gen-init!): Rewrite.
4443 (-rtx-valid-types): Add INTMODE, FLOATMODE, NUMMODE.
4444 (tstate-make): New arg `gstate', all callers updated.
4445 (tstate-set-expr-fn!,tstate-set-op-fn!): New accessors.
4446 (tstate-set-cond?!,tstate-set?,tstate-set-set?!): New accessors.
4447 (tstate-gstate,tstate-set-gstate!): New accessors.
4448 (tstate-copy): New proc.
4449 (tstate-new-cond?,tstate-new-set?): Rewrite.
4450 (-rtx-traverse-operands): Handle INTMODE, FLOATMODE, NUMMODE.
4451 (rtx-traverse): New arg `gstate', all callers updated.
4452 (rtx-strdump): New proc.
4453 (-simplify-for-compilation): New arg `gstate', all callers updated.
4454 (semantic-in-out-operands): Ditto.
4455 (semantic-attrs): Ditto.
4456 (rtx-eval): Rewrite. New arg `gstate', all callers updated.
4457 (rtx-eval-with-temps,rtx-eval-with-alist): Ditto.
4458 (rtx-value): Rewrite.
4459 (<c-expr>,gen-name): New method.
4460 (<c-expr>,gen-set-quiet): New arg `gstate', all callers updated.
4461 (<c-expr>,gen-set-trace): New arg `gstate', all callers updated.
4462 (cx-new-mode): New proc.
4463 (-rtx-c-with-tstate): New proc.
4464 (rtx-c,rtx-c-with-temps,rtx-c-with-alist): New arg `gstate', all
4466 (-rtx-mode): Rewrite.
4467 (-rtx-mode-compatible?): New proc.
4468 (<c-expr-temp>): New member `value'.
4469 (cx-temp:value): New accessor.
4470 (<c-expr-temp>,make!): Override default method.
4471 (<c-expr-temp>,cxmake-get): Rewrite.
4472 (<c-expr-temp>,gen-set-quiet): Rewrite.
4473 (<c-expr-temp>,gen-set-trace): Rewrite.
4474 (gen-temp-defs): Use cx-temp:value.
4475 (record-temp!): New arg value, all callers updated.
4476 (cx-temp:cx:make): Delete.
4477 (-cx-temp-dump-stack): New proc.
4478 (rtx-get): New arg `gstate', all callers updated. Do mode
4479 compatibility checks. Ensure result has specified mode.
4480 (rtx-set-quiet): New arg `gstate', all callers updated.
4481 (rtx-set-trace): Ditto.
4482 (s-c-call): New arg `tstate', all callers updated.
4483 (s-c-raw-call): Ditto.
4484 (s-unop,s-binop,s-binop-with-with,s-shop,s-boolifop,s-convop): Ditto.
4485 (s-cmpop,s-if,e-if): Ditto.
4486 (s-subreg): New proc.
4487 (-par-new-temp!): New proc.
4488 (-par-next-temp!): Rewrite.
4489 (-par-replace-set-dests): Use -par-new-temp!.
4490 (s-parallel): Rewrite temp handling. Use -rtx-c-with-state.
4491 (s-sequence): Use -rtx-c-with-state.
4492 * rtx-funcs.scm (*): Update.
4493 (raw-reg:): New rtx function.
4495 (join:,subreg:): New rtx functions.
4497 * insn.scm (<insn>): New members pre-cond-trap, condition,
4498 post-cond-trap, compiled-condition.
4500 * insn.scm (syntax-break-out): Replace eval with current-op-lookup.
4502 * opcodes.scm (<pc>,cxmake-get): New arg `selector'.
4504 * utils-cgen.scm (parse-symbol): New proc.
4505 (parse-string): New proc.
4506 (gen-get-macro,gen-set-macro): New arg `index-args'.
4507 (gen-set-macro2): Ditto. Enclose code in do { } while (0).
4508 Prepend \ to newlines.
4510 * utils.scm (alist-remove-duplicates): Delete.
4512 * sid.scm (sim-init!): Delete private debugging code.
4514 1999-03-10 Frank Ch. Eigler <fche@cygnus.com>
4516 * cgen-sid.scm: New file for C++ simulator application.
4517 * sid-arch.scm: Ditto.
4518 * sid-cpu.scm: Ditto.
4519 * sid-decode.scm: Ditto.
4520 * sid-model.scm: Ditto.
4522 * utils-cgen.scm (gen-mach-sid-name): Remove this accident.
4524 1999-03-05 Ben Elliston <bje@cygnus.com>
4526 * arm.cpu: New file.
4528 1999-03-03 Doug Evans <devans@casey.cygnus.com>
4530 * Makefile.am (CGEN_HOB_INPUT_FILES): Add hardware.scm.
4531 * Makefile.in: Rebuild.
4533 * attr.scm (<integer-attribute>,parse-value-def): Tweak.
4534 (-attr-parse): Validate default value.
4536 * read.scm (-CGEN-VERSION): Change to 0.7.1.
4537 (-CGEN-LANG-VERSION): Ditto.
4538 (-keep-all-machs): Renamed from -keep-all, all uses updated.
4539 (<reader>): New member keep-isa plus accessors.
4540 (-keep-isa-set!,keep-isa-validate!): New procs.
4541 (keep-isa?,keep-isa-atlist?,keep-isa-obj?): New procs.
4542 (common-arguments): New variable.
4543 (cgen-usage,getarg,catch-with-backtrace,option-arg): New procs.
4544 (-debug-repl,continue): New procs.
4545 (-cgen,cgen): New procs.
4546 * cgen-gas.scm: Rewrite.
4547 * cgen-opc.scm: Rewrite.
4548 * cgen-sim.scm: Rewrite.
4549 * cgen-stest.scm: Rewrite.
4551 * gas-test.scm (gas-test-init!): Call opcodes-init!.
4552 (gas-test-finish!): Call opcodes-finish!.
4553 (gas-test-analyze!): Call opcodes-analyze!.
4554 (<hw-asm>): New method test-data.
4555 (<operand>,testdata): Rewrite.
4556 * sim-test.scm (sim-test-init!): Call opcodes-init!.
4557 (sim-test-finish!): Call opcodes-finish!.
4558 (sim-test-analyze!): Call opcodes-analyze!.
4559 (<hw-asm>): New method test-data.
4560 (<operand>,testdata): Rewrite.
4562 1999-03-01 Doug Evans <devans@casey.cygnus.com>
4564 * fixup.scm (reverse!): Define if missing.
4565 * *.scm: Use reverse! instead of list-reverse!.
4567 * utils.scm (leading-id-char?): New proc.
4568 (id-char?): Rewrite.
4569 (chars-until-delimiter): New proc.
4570 * opc-itab.scm (extract-syntax-operands): Rewrite.
4571 (strip-mnemonic): Rewrite.
4572 (compute-syntax): Rewrite.
4574 * pmacros.scm (-pmacro-substr): New proc.
4575 (pmacros-init!): Add builtin .substr.
4577 1999-02-26 Doug Evans <devans@casey.cygnus.com>
4579 * thumb.cpu: New file.
4581 1999-02-24 Doug Evans <devans@casey.cygnus.com>
4583 * Makefile.am (CGENCFLAGS): New variable.
4584 (WITH_HOBBIT): Use automake conditional.
4585 (CGEN_HOB_SRC): New variable.
4586 (libcpu_a_SOURCES): Use $(CGEN_HOB_SRC).
4587 (*.o): Compile with CGENCFLAGS.
4588 (cgen-hob.c): Simplify.
4589 (cgen-nohob.c): New rule.
4590 (hobbit): Renamed from hob.x.
4591 (CLEANFILES): Add cgen-nohob.c.
4592 * Makefile.in: Rebuild.
4593 * doc/Makefile.in: Rebuild.
4594 * configure.in (AM_INIT_AUTOMAKE): Update CGEN version to 0.7.1.
4595 (WITH_HOBBIT): Use AM_CONDITIONAL.
4596 * configure: Rebuild.
4597 * aclocal.m4: Rebuild.
4599 * sim-arch.scm (-gen-arch-reg-access-defns): Replace string-map
4600 with string-write-map.
4602 * sim-cpu.scm (hw-need-storage?): New proc.
4603 (-gen-hardware-types): Use it.
4604 (gen-parallel-exec-elm): Call op-save-index?.
4606 * sim-decode.scm (cgen-decode.c): Call rtl-gen-init!.
4608 * sim.scm (-gen-ifld-extract-base): Use mode:class instead of
4610 (-gen-ifld-extract-beyond): Ditto.
4611 (<integer>): Delete all references.
4612 (<sim-hardware>): Delete.
4613 (hw-profilable?): New proc.
4614 (<hardware-base>): New methods gen-get-macro,gen-set-macro.
4615 (<hw-register>): Rename method get-index-mode to save-index?.
4616 (<hw-register>): New methods gen-get-macro,gen-set-macro.
4617 (<hw-register>,gen-sym-decl): Make virtual.
4618 (<hw-memory>,gen-sym-decl): Make virtual.
4619 (<hw-memory>): Rename method get-index-mode to save-index?.
4620 (<hw-address>,gen-sym-decl): Make virtual.
4621 (<operand>): New method save-index?.
4622 (sim-init!): Delete calls to sim-hw-init!,sim-hw-init-parsers!.
4624 * opc-itab.scm (opc-{parse,insert,extract,print}-handlers): opc-
4625 prefix added. All uses updated.
4627 * opc-opinst.scm (-gen-operand-instance): Output hw enum value
4628 rather than pointer to table entry.
4630 * opcodes.scm: Remove all attribute support, lives in desc.scm.
4631 Remove all hw-asm,op-asm support.
4632 (-gen-parse-number,-gen-parse-address): New procs.
4633 (<keyword>,gen-parse): Redo function name computation.
4634 (<keyword>,gen-print): Ditto.
4635 (<operand>,gen-function-name): Rewrite.
4636 (<operand>,gen-fget,gen-fset,gen-parse,gen-print): Ditto.
4637 (opcodes-init!): Delete call to add-parser!.
4639 * desc-cpu.scm (gen-hw-decls): Rename enum hw_type to cgen_hw_type.
4640 Define enum using hardware semantic name.
4641 (-gen-hw-decl,-gen-hw-defn): New procs.
4642 (gen-hw-table-decls): Use -gen-hw-decl.
4643 (gen-hw-table-defns): Use -gen-hw-defn. Rewrite generation of
4644 CGEN_HW_ENTRY structs.
4645 (gen-operand-table): Output hw's enum, not pointer to table entry.
4646 (-gen-cpu-open): Build table of selected hardware elements.
4648 * desc.scm (-hw-asm-specs,-parse-hw-asm): Delete.
4649 (<hardware> support): Delete.
4650 (<hw-asm>): Delete, moved to hardware.scm.
4651 (normal-hw-asm,hw-asm:parse,hw-asm:print): Delete.
4652 (<hw-asm>,gen-table-entry): New method.
4653 (<hw-asm>,parse!): Delete.
4654 (<keyword>,gen-table-entry): New method.
4655 (<keyword>,parse!): Delete.
4656 (<hw-{register,memory,immediate,address}>): Delete forwarding methods
4657 for gen-decl,gen-defn,gen-ref,gen-init.
4658 (desc-init!): Don't create parser for operand asm specs.
4660 * attr.scm (attr-builtin!): Delete UNSIGNED attribute.
4661 * ifield.scm (<ifield>): New member `mode'.
4662 (<ifield>,make!): New arg `mode'.
4663 (ifld-mode): Rewrite.
4664 (ifld-hw-type): Rewrite.
4665 (<ifield>,min-value): Rewrite.
4666 (<ifield>,max-value): Rewrite.
4667 (-ifield-parse): New arg `mode'.
4668 (-ifield-read): Update.
4669 (define-full-ifield): New arg `mode'.
4670 (define-full-multi-ifield): Ditto.
4671 (-multi-ifield-parse): Ditto.
4672 (-multi-ifield-read): Update.
4673 (define-full-multi-ifield): New arg `mode'.
4674 (ifield-builtin!): Update definition of f-nil.
4675 * simplify.inc (define-normal-ifield): Update call to
4677 (define-normal-multi-ifield): Update call to define-full-multi-ifield.
4678 (define-normal-hardware): Delete arg asm. New args indices, values,
4679 handlers. Update call to define-full-hardware.
4680 (define-simple-hardware,dsh): New pmacros.
4681 (define-normal-operand): Update call to define-full-operand.
4682 * fr30.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
4683 Specify INT/UINT mode instead.
4684 (h-gr,h-cr): Use "indices" instead of "asm".
4685 (h-dr,h-ps): Update keyword syntax.
4686 (h-r13,h-r14,h-r15): Ditto.
4687 (h-nbit,h-zbit,h-vbit,h-cbit): Use dsh instead of dnh.
4688 (h-d0bit,h-d1bit,h-ibit,h-sbit,h-tbit,h-ccr,h-scr,h-ilm): Ditto.
4689 (m4): Fix typo on HASH-PREFIX. Use "handlers" instead of "asm".
4690 (reglist_low_ld,reglist_hi_ld,reglist_low_st,reglist_hi_st): Ditto.
4691 * i960.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
4692 Specify INT/UINT mode instead.
4693 (h-gr): Use "indices" instead of "asm".
4694 (h-cc): Update keyword syntax.
4695 * m32r.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
4696 Specify INT/UINT mode instead.
4697 (h-hi16,h-slo16,h-ulo16): Update.
4698 (h-gr,h-cr): Use "indices" instead of "asm".
4699 (h-accum,h-cond,h-psw,h-bpsw,h-bbpsw,h-lock): Use dsh instead of dnh.
4700 (h-accums): Update keyword syntax.
4701 (hash,hi16,slo16,ulo16): Use "indices" instead of "asm".
4702 * sparc.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
4703 Specify INT/UINT mode instead.
4704 (h-gr-indices): New pmacro.
4705 (h-gr32,h-gr64): Split up from h-gr.
4706 (h-a): Update type spec. Use values instead of asm spec.
4707 (h-icc-[cnvz],h-xcc-[cnvz]): Use dsh instead of dnh.
4708 (h-y,h-annul-p): Ditto.
4709 (h-asr): Update keyword spec.
4710 (h-lo10,h-lo13,h-hi22): Update.
4711 (get-freg-spec,set-freg-spec): New pmacros.
4712 (h-fr32,h-fr64): Split up from h-fr.
4713 (rdd): Comment out get/set specs.
4714 (lo10,lo13,hi22): Use "handlers" instead of "asm".
4715 * sparc32.cpu (h-psr): Use dsh instead of dnh.
4716 (h-s,h-ps,h-pil,h-et,h-tbr,h-cwp,h-ag,h-ec,h-ef,h-fsr): Ditto.
4717 * sparc64.cpu (f-*): Delete UNSIGNED attribute. Default is now
4718 UNSIGNED. Specify INT/UINT mode instead.
4719 (h-*): Use dsh instead of dnh where appropriate.
4720 (h-ixcc): Update type spec. Use "values" instead of "asm".
4721 (h-p,h-membarmask): Ditto.
4722 (membarmask): Use "handlers" instead of "asm".
4724 * hardware.scm (<hardware-base>): New member sem-name,type,indices,
4725 values,handlers,getters,setters plus accessors.
4726 (hw-mode-ok?,hw-default-mode): New procs.
4727 (<hardware-base>): Rename method new-mode to mode-ok?
4728 (<hardware-base>): New method get-index-mode.
4729 (hw-index-mode): New proc.
4730 (pc?): Delete, moved to operand.scm.
4731 (address?): New proc.
4732 (<hardware>): Delete.
4733 (<hw-asm>): Definition moved here from desc.scm.
4734 (keyword-parse): New proc.
4735 (hardware-parsers): Delete.
4736 (-parse-hw-type,-parse-hw-asm,-parse-hw-profile): Delete.
4737 (-hw-parse-indices,-hw-parse-values,-hw-parse-handlers): New procs.
4738 (-hw-parse-get,-hw-parse-set): New procs.
4739 (-hw-parse): Delete args aasm,profile,extra. New args semantic-name,
4740 indices,values,handlers,get,set. Rewrite.
4741 (-hw-read-extra): Delete.
4743 (define-hardware): Don't add object if not selected.
4744 (define-full-hardware): Ditto.
4745 (current-hw-sem-lookup,current-hw-sem-lookup-1): New procs.
4746 (<hw-register>): Member `type' moved to baseclass. Delete member
4748 (<hw-register>,parse!): Rewrite.
4749 (<hw-register>): Delete methods get-rank,get-mode.
4750 (<hw-register>): Method new-mode renamed to mode-ok?
4751 (<hw-register>): New method get-index-mode.
4752 (<hw-pc>,parse!): Rewrite.
4753 (<hw-memory>): Member `type' moved to baseclass. Delete member hw-asm.
4754 (<hw-memory>,parse!): Rewrite.
4755 (<hw-memory>): Delete methods get-rank,get-mode.
4756 (<hw-memory>): Method new-mode renamed to mode-ok?
4757 (<hw-memory>): New method get-index-mode.
4758 (<hw-immediate>): Member `type' moved to baseclass. Delete member
4760 (<hw-immediate>,parse!): Rewrite.
4761 (<hw-immediate>): Delete methods get-rank,get-mode.
4762 (<hw-immediate>): Method new-mode renamed to mode-ok?
4763 (<hw-address>): Delete member hw-asm.
4764 (<hw-address>,parse!): Rewrite.
4765 (<hw-address>): Delete methods get-rank,get-mode.
4766 (<hw-address>): Method new-mode renamed to mode-ok?
4767 (hw-profilable?): Delete.
4768 (hardware-init!): Delete hardware-parsers reference.
4769 Update argument specs of command define-full-hardware.
4770 (hardware-builtin!): Update definitions of hardware builtins.
4771 * operand.scm (<operand>): New members hw-name,mode-name.
4772 Delete member op-asm. New member handlers.
4773 (<operand>,make!): Update.
4774 (op:hw-name,op:mode-name,op:handlers): New procs.
4777 (<operand>): New method get-index-mode.
4778 (<pc>,make!): Update.
4779 (op:new-mode): Rewrite.
4780 (operand-parsers): Delete.
4781 (-operand-parse): Rewrite. Return #f if insn not selected.
4782 (-op-read-extra): Delete.
4783 (-operand-read): Update.
4784 (define-operand,define-full-operand): Update.
4785 (operand-init!): Delete operand-parsers reference.
4786 Update syntax of define-full-operand command.
4788 * insn.scm (-insn-parse): Rewrite. Return #f if insn not selected.
4789 (define-full-insn): Update.
4790 * minsn.scm (-minsn-parse): Rewrite. Return #f if insn not selected.
4791 (define-full-minsn): Update.
4793 * mode.scm (<mode>): New member class.
4794 (mode:class): New proc.
4796 (-mode-parse): New arg class.
4797 (define-full-mode): Update.
4798 (mode-find): Rewrite.
4799 (mode-make-int,mode-make-uint): New procs.
4800 (mode-init!): Update syntax of define-full-mode command.
4801 (mode-builtin!): Update definitions of builtin modes.
4803 * model.scm (<profile>): Delete.
4805 * read.scm (keep-atlist?): New proc.
4806 (keep-multiple?): New proc.
4807 (<parser-list>): Delete.
4808 (add-parser!,parse-spec!): Delete.
4810 * rtl.scm (def-rtx-node): Prepend arg *tstate* to all handlers.
4811 (def-rtx-syntax-node): Ditto.
4812 (-rtx-traverse-debug?): New variable.
4813 (tstate-make): New proc.
4814 (tstate-expr-fn,tstate-op-fn,tstate-cond?,tstate-set?): New procs.
4815 (tstate-new-cond?,tstate-new-set?): New procs.
4816 (-rtx-traverse-normal): Delete args cond?,expr-fn,op-fn. New arg
4817 tstate. All callers updated.
4818 (-rtx-traverse-expr,-rtx-traverse-debug): Ditto.
4819 (-rtx-traverse-list,-rtx-traverse-operands): Ditto.
4820 (-build-operand!): Replace arg cond? with tstate.
4821 (-build-reg-operand!,-build-mem-operand!): Ditto.
4822 (-build-index-of-operand!): Update making of <operand> object.
4823 (s-ifield): New arg tstate. All callers updated.
4824 (hw:): New arg tstate. All callers updated. Replace call to
4825 current-hw-lookup with current-hw-sem-lookup-1.
4826 (s-index-of): New arg tstate. All callers updated.
4828 (-rtx-use-sem-fn?): New proc.
4829 (s-unop,s-binop,s-shop): Use it. Only use semantic mode when using
4831 (s-convop): Only use semantic mode when using semantic cover fns.
4832 (s-cmpop): Call -rtx-use-sem-fn?.
4833 (s-cond,s-case): New arg tstate. All callers updated.
4834 (s-parallel,s-sequence): Ditto.
4836 * rtx-funcs.scm (set,set-quiet:): Use SETRTX to mark the set dest.
4838 * types.scm (<scalar>): Rewrite implementation.
4839 (<integer>): Delete.
4840 (parse-type): Rewrite.
4842 * utils-cgen.scm (parse-handlers): New proc.
4844 * utils.scm (!=): New proc.
4846 Tue Feb 23 12:10:29 1999 Doug Evans <devans@canuck.cygnus.com>
4848 * pmacros.scm (-pmacro-expand): Fix typo.
4850 1999-02-12 Doug Evans <devans@casey.cygnus.com>
4852 * pmacros.scm (-pmacro-hex,-pmacro-upcase,-pmacro-downcase): New procs.
4853 (pmacros-init!): Install builtins .hex, .upcase, .downcase.
4854 * i960.cpu (build-hex2): New pmacro.
4855 (insn-opcode): Simplify.
4856 (insn-opcode2): Ditto.
4858 * cgen-sim.scm (catch-with-backtrace): Comment out debugging printf.
4859 * cgen-stest.scm (catch-with-backtrace): Ditto.
4861 1999-02-11 Doug Evans <devans@casey.cygnus.com>
4863 * pmacros.scm (-pmacro-lookup): Renamed from -pmacro-ref.
4864 All callers updated.
4865 (-pmacro-invoke): New proc.
4866 (-pmacro-sym,-pmacro-str): New procs.
4867 (-pmacro-iota,-pmacro-map,-pmacro-apply): New procs.
4868 (pmacros-init!): Install builtins .iota, .map, .apply.
4869 * sparc.cpu (cc-tests): Add CC_NZ,CC_Z,CC_GEU,CC_LU aliases.
4870 (h-fr): Simplify register name spec.
4871 * sparc64.cpu (cond-move-1): New arg mnemonic. All callers updated.
4872 * utils.scm (num-args-ok?): New proc.
4874 1999-02-10 Doug Evans <devans@casey.cygnus.com>
4876 * pmacros.scm (-pmacro-error): New proc.
4877 (-pmacro-expand): Use it.
4878 (-pmacro-splice): New proc.
4879 (pmacros-init!): Install new builtin .splice.
4881 * sparc.cpu: Include sparc64.cpu when appropriate.
4882 (f-mmask,f-simm11): Moved to sparc64.cpu.
4883 (insn-fmt2): Add FLUSH,FLUSHW,IMPDEP1,IMPDEP2,MEMBAR,MOVCC.
4884 (ANNUL attribute): Delete.
4885 (test-* pmacros): New arg cc, all callers updated.
4886 (uncond-br-sem,cond-br-sem): New arg cc, all callers updated.
4887 * sparc32.cpu (atom-op): Moved to sparccom.cpu and renamed to
4889 (ldstub,swap): Moved to sparccom.cpu.
4890 * sparc64.cpu: Add more insns.
4892 1999-02-09 Doug Evans <devans@casey.cygnus.com>
4894 * sim-cpu.scm (cgen-semantics.c): Replace CGEN_INSN_ATTR with
4896 (cgen-sem-switch.c): Ditto.
4897 * sim-decode.scm (-gen-idesc-decls): struct idesc definition
4898 moved to cgen-engine.h.
4899 (-gen-insn-sem-type): Delete, struct insn_sem mvoed to cgen-engine.h.
4900 (-gen-idesc-init-fn,init_idesc): Lookup insn table via descriptor, not
4901 global. Cache attributes and insn length in IDESC.
4902 * sim-model.scm (-gen-cpu-defns): Generate new func @cpu@_prepare_run.
4903 @cpu@_opcode renamed to @cpu@_get_idata.
4904 (-gen-mach-defns,@mach@_init_cpu): Don't initialize IDESC table here,
4905 done later underneath sim_resume.
4906 (@mach@_mach): Record @cpu@_prepare_run.
4907 * sim.scm (<hardware-base>,cxmake-get): New arg selector, all callers
4909 (-hw-gen-set-quiet-pc): Ditto.
4910 (-hw-cxmake-get,-hw-gen-set-quiet): Ditto.
4911 (<hw-memory>,cxmake-get,gen-set-quiet): Ditto.
4912 (<hw-addr>,cxmake-get): Ditto.
4913 (<hw-iaddr>,cxmake-get): Ditto.
4914 (<pc>,cxmake-get): Ditto.
4915 (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Ditto.
4916 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): Ditto.
4917 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
4918 (<hw-pc>,gen-write): Use hw-selector-default.
4919 (<hw-register>,gen-write): Ditto.
4920 (<hw-memory>,gen-write): Ditto.
4921 (-gen-hw-index-raw,-gen-hw-index): Handle selector.
4922 (-gen-hw-selector): New proc.
4924 * desc.scm: New file.
4925 * desc-cpu.scm: New file.
4926 * opcodes.scm: Split up into several smaller files.
4927 * opc-asmdis.scm: New file.
4928 * opc-ibld.scm: New file.
4929 * opc-itab.scm: New file.
4930 * opc-opinst.scm: New file.
4931 * Makefile.am (desc): New target.
4932 (opcodes): Update args to cgen-opc.scm.
4933 * Makefile.in: Rebuild.
4934 * aclocal.m4: Rebuild.
4935 * config.in: Rebuild.
4936 * configure.in: Update arg to AC_INIT.
4937 Update version number to 0.7.0. Change AM_EXEEXT to AC_EXEEXT.
4938 Update AC_PREREG arg to 2.13. Change AM_PROG_INSTALL to
4940 * configure: Rebuild.
4941 * cgen-gas.scm: Update files to load.
4942 * cgen-opc.scm: Ditto. Reorganize option letters.
4943 * cgen-sim.scm: Update files to load.
4944 * cgen-stest.scm: Ditto.
4945 * dev.scm (cload): New app "DESC".
4946 (load-opc): Update files to load.
4947 (load-gtest,load-sim,load-stest): Ditto.
4949 * attr.scm (bool-attr?): New proc.
4950 (attr-list-enum-list): New proc.
4951 (-attr-sort): Rewrite.
4952 (attr-builtin!): Give ALIAS attribute a fixed index.
4953 * utils-cgen.scm (gen-attr-enum-decl): Call attr-list-enum-list to
4954 calculate attribute enum list.
4955 (gen-attr-mask): Subtract CGEN_ATTR_BOOL_OFFSET from attribute's enum.
4957 * insn.scm (-insn-parse): Renamed from parse-insn.
4959 * hardware.scm (-hw-parse): New arg errtxt, all callers updated.
4962 * mode.scm (-mode-parse): Renamed from parse-mode.
4964 * operand.scm (<operand>): New member `selector'.
4965 (<operand>,make!): Use default selector.
4966 (hw-selector-default): New variable.
4967 (hw-selector-default?): New proc.
4969 * pmacros.scm (pmacros-init!): New proc.
4970 (-pmacro-{make,name,arg-spec,transformer,comment}): New procs.
4971 (-env-set!): Delete.
4972 (-pmacro-expand): New proc apply-macro.
4973 Use it in scan-list,scan. Scan list first, then see if macro
4975 (define-pmacro): Rewrite.
4976 * read.scm (-init-parse-cpu!): Call utils-init!,parse-init!.
4978 * rtl.scm (-simplify-for-compilation): Ensure at least one mach
4979 selected if (current-mach) seen.
4980 (rtx?): Renamed from rtx-uneval?, all callers updated.
4981 (<c-expr>,gen-set-quiet,gen-set-trace): New arg selector, all callers
4983 (<c-expr-temp>,cxmake-get,gen-set-quiet,gen-set-trace): New arg
4984 selector, all callers updated.
4985 (hw:): New arg selector, all callers updated. Delete old comments
4987 (reg:,mem:): Handle selectors
4988 * rtx-funcs.scm (reg:): Handle selectors.
4990 * read.scm: Renamed from cpu.scm.
4991 (<command>): New class.
4992 (<reader>): New member commands.
4993 (reader-add-command!): New proc.
4994 (reader-lookup-command): New proc.
4995 (reader-error,-reader-process-expanded,reader-process): New procs.
4996 (reader-read-file!): New proc.
4997 (include): Call reader-read-file!.
4999 (cpu-load): Call reader-read-file!.
5000 * utils.scm (num-args): New proc.
5001 * simplify.inc: New file.
5002 * *.scm: Delete def-foo procs. Rewrite define-foo/define-full-foo
5003 procs. Move define-normal-foo procs (and abbreviated forms) to
5004 simplify.inc. Install define-foo/define-full-foo commands in foo-init!
5006 * fr30.cpu: Include simplify.inc.
5007 * fr30.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
5008 * i960.cpu: Include simplify.inc.
5009 * m32r.cpu: Include simplify.inc.
5010 * m32r.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
5011 (CGEN_PRINT_NORMAL): Use CGEN_BOOL_ATTR.
5012 * sparc.cpu: Include simplify.inc.
5013 * sparc.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
5014 * utils-cgen.scm (parse-error): Moved to read.scm.
5015 (sanitize): Rewrite.
5016 (utils-init!): New proc.
5018 1999-02-02 Doug Evans <devans@casey.cygnus.com>
5020 * sparc.cpu: New file.
5021 * sparc32.cpu: New file.
5022 * sparc64.cpu: New file.
5023 * sparccom.cpu: New file.
5024 * sparc.opc: New file.
5026 1999-01-27 Frank Eigler <fche@cygnus.com>
5028 * utils.scm (gen-copyright): New proc.
5030 1999-01-27 Doug Evans <devans@casey.cygnus.com>
5032 Parameterize rtl parsing, rather than having lots of little handlers.
5033 * rtl.scm (<rtx-func>): New members arg-types,arg-modes.
5034 Delete member traverse.
5035 (rtx:set-traverse!): Delete.
5036 (-rtx-valid-types,-rtx-valid-matches): New variables.
5037 (-rtx-func-lookup): Take symbol or <rtx-func> object as argument
5038 instead of expression. All callers updated.
5039 (def-rtx-node): New args arg-types,arg-modes.
5040 (def-rtx-syntax-node): Ditto.
5041 (def-rtx-dual-mode): Ditto.
5042 (-rtx-macro-expand-list): Renamed from -rtx-macro-maybe-expand-list.
5043 All callers updated.
5044 (-rtx-macro-expand): Renamed from -rtx-macro-maybe-expand.
5045 All callers updated.
5046 (rtx-macro-expand): New proc.
5047 (-rtx-traverse-check-args): Delete.
5048 (-rtx-traverse-normal): Call -rtx-traverse-expr rather than calling
5049 an rtx specific traverser.
5050 (-rtx-any-mode?,-rtx-symornum?): New procs.
5051 (-rtx-traverse-rtx-list,-rtx-traverse-error): New proc.
5052 (-rtx-traverse-no-mode): Delete.
5053 (-rtx-traverse-syntax-expr,-rtx-traverse-syntax-no-mode): Delete.
5054 (-rtx-traverse-operands): Rewrite.
5055 (-rtx-traverse-expr): Rewrite.
5056 (rtx-traverse): Don't expand macros here, leave for caller to do.
5057 (rtx-simplify): Delete.
5058 (rtx-compile-time-constant?): Rewrite. Handle FALSE/TRUE for boolean
5060 (rtx-true?,rtx-false?): Ditto.
5061 (-rtx-ref-type): Set dest is operand 1 now.
5062 (-simplify-for-compilation): New proc.
5063 (semantic-in-out-operands): Recognize regno as an alias for index-of.
5064 Expand macros before calling rtx-traverse. Sort operands by name
5065 to avoid unnecessary semantic formats.
5066 (semantic-attrs): New proc.
5067 (rtx-uneval?): Handle (<rtx-func> ...).
5068 (s-boolifop): Delete arg mode. All callers updated.
5069 * rtx-funcs.scm (all non-macros): Add arg-type and arg-mode specs.
5070 (eq-attr): New arg obj.
5072 * m32r.cpu (rach): Update calls to andif.
5074 * minsn.scm (-minsn-parse-expansion): Renamed from
5075 parse-minsn-expansion.
5076 (-minsn-parse): Renamed from parse-minsn.
5077 (-minsn-read): Renamed from read-minsn.
5078 (def-minsn): Don't check APPLICATION here.
5079 (def-full-minsn): New proc.
5080 (define-macro-insn): Check APPLICATION here. Expand macros.
5081 (define-normal-macro-insn): Ditto.
5083 * utils.scm (word-value): New arg start-lsb?.
5084 (word-mask,word-extract): Ditto.
5085 (split-bits,powers-of-2): Use integer-expt instead of expt.
5086 (bit-set?): Handle 32 bit values (which are bignums).
5087 (cg-logand,cg-logxor): New functions.
5088 * ifield.scm (<ifield>,field-mask): Update call to word-mask.
5089 (<ifield>,field-value): Update call to word-value.
5090 (<ifield>,min-value): Use integer-expt instead of expt.
5091 (<ifield>,max-value): Ditto.
5093 * hardware.scm (<hw-register>,new-mode): Rename local mode to cur-mode.
5095 * insn.scm (def-full-insn): Discard ALIAS insns if simulator.
5097 Compute raw instruction format in addition to semantic based format.
5098 * iformat.scm: Delete members cti?,sem-in-ops,sem-out-ops.
5099 (<iformat> accessors): Rename accessors to ifmt-*.
5100 (<sformat>): New class.
5101 (fmt-enum): Renamed from fmt:enum.
5102 (-ifmt-search-key): Rewrite.
5103 (-sfmt-search-key): New proc.
5104 (ifmt-analyze): Rename arg include-sem-operands? to compute-sformat?
5105 Compute iformat and sformat search keys.
5106 (ifmt-build): Update.
5107 (sfmt-build): New proc.
5108 (-ifmt-lookup-ifmt!,-ifmt-lookup-sfmt!): New procs.
5109 (ifmt-compute!): Compute instruction format <iformat> based on
5110 instruction fields alone. Compute new semantic format <sformat>
5111 based on instruction fields and semantic information.
5112 (ifmt:lookup): Delete.
5113 * mach.scm (<arch>): New member sfmt-list, plus accessors.
5114 (current-sfmt-list): New proc.
5115 * insn.scm (<insn>): Rename member fmt-tmp to tmp.
5116 Rename member fmt to ifmt. New members fmt-desc, sfmt.
5117 (insn-length,insn-length-bytes): Update.
5118 (insn:mask-length,insn:mask): Update.
5119 (insn-lookup-op): Update.
5120 * gas-test.scm (gas-test-analyze!): Update.
5121 (gen-gas-test): Ditto.
5122 * sim-test.scm (sim-test-analyze!): Update.
5123 (gen-sim-test): Ditto.
5124 * opcodes.scm (gen-operand-instance-table): Update.
5125 (gen-operand-instance-ref): Ditto.
5126 (max-operand-instances): Use heuristic if semantics not parsed.
5127 (ifmt-opcode-operands): Renamed from fmt-opcode-operands.
5128 (opcodes-analyze!): Only scan semantics of building operand instance
5130 * sim-cpu.scm (*) Update calls to <iformat>/<sformat> accessors.
5131 (-gen-extract-ifmt-macro): Renamed from -gen-extract-fmt-macro.
5132 * sim-decode.scm (*) Update calls to <iformat>/<sformat> accessors.
5133 (gen-sfmt-argvars-defns): Renamed from gen-ifmt-argvars-defns.
5134 (gen-sfmt-argvars-assigns): Renamed from gen-ifmt-argvars-assigns.
5135 * sim-model.scm (*) Update calls to <iformat>/<sformat> accessors.
5136 * sim.scm (*) Update calls to <iformat>/<sformat> accessors.
5138 * sim-decode.scm (usable-decode-bit?): Rename from decode-bit?
5139 New arg lsb0? All callers updated.
5140 (decode-bits): New arg lsb0?. All callers updated.
5141 (opcode-slots): Update call to bit-set?. Call integer-expt instead
5143 (-gen-decode-bits): New arg lsb0?. All callers updated.
5144 (build-slots): Call integer-expt instead of expt.
5145 (build-decode-table-entry): Handle crossing word boundaries better.
5146 (-gen-decode-switch): New arg lsb0?. All callers updated.
5147 (-gen-extract-decls): Rename decode format entry from ifmt to sfmt.
5149 * enum.scm (define-enum): Rewrite.
5150 (define-normal-enum): Ditto.
5151 (def-full-insn-enum): New proc.
5152 (define-normal-insn-enum): Rewrite.
5154 * attr.scm (<bitset-attribute>,gen-value-for-defn): Ensure result is
5156 (<{integer,enum}-attribute>,gen-value-for-defn): Ditto.
5158 * dev.scm: Add sid support.
5160 * Makefile.am (opcodes,sim-arch,sim-cpu): New targets.
5161 (CLEANFILES): Add tmp-*.
5162 * Makefile.in: Rebuild.
5164 * doc/Makefile.am: New file.
5165 * doc/Makefile.in: New file.
5166 * doc/cgen.texi: New file.
5167 * Makefile.am (SUBDIRS): Define.
5168 * Makefile.in: Rebuild.
5169 * configure.in: Create doc/Makefile.
5170 * configure: Rebuild.
5172 1999-01-18 Doug Evans <devans@casey.cygnus.com>
5174 * insn.scm (insn:syn): Delete.
5176 1999-01-15 Doug Evans <devans@casey.cygnus.com>
5178 * fr30.cpu (model fr30-1): Add state variables load-regs,
5179 load-regs-pending. Delete h-gr. Clean up operand names of all units.
5180 * m32r.cpu (model m32r/d): Clean up operand names of u-exec.
5181 (model m32rx): Ditto.
5182 (addi): Simplify function unit usage spec.
5183 (ld-plus): Rewrite operand names in function unit usage spec.
5184 (mvtachi,mvtachi-a,mvtaclo,mvtaclo-a,st-plus,st-minus): Ditto.
5185 * sim.scm (<unit>,gen-profile-code): Redo how operand names are
5186 overridden. Allow operand to appear in input and output spec.
5187 (<insn>,gen-profile-code): string-append -> string-list.
5189 * ifield.scm (define-ifield): Call pmacro-expand.
5190 (define-full-ifield,define-normal-ifield): Ditto.
5191 (define-multi-ifield,define-normal-multi-ifield): Ditto.
5193 * sim.scm (gen-argbuf-type): Keep leading part of ARGBUF same for
5194 with-scache and without-scache cases.
5196 1999-01-14 Doug Evans <devans@casey.cygnus.com>
5198 * fr30.cpu (fr30-1): Add state variable h-gr.
5199 Add units u-cti, u-load, u-store, u-ldm, u-stm.
5200 (all insns): First pass at providing cycle counts.
5201 * sim.scm (<unit>,gen-profile-code): Only check for output operands
5202 when initializing unit output operands, ditto for input operands.
5204 * insn.scm (insn-length,insn-length-bytes): New procs.
5205 * mach.scm (-adata-set-derived!): Use them.
5206 * sim-cpu.scm (-gen-sem-case): Ditto.
5208 * sim-cpu.scm (-gen-trace-record-type): PCADDR->IADDR.
5209 (-gen-write-case): Ditto.
5210 (gen-semantic-fn): Ditto. Split into two:
5211 -gen-scache-semantic-fn and -gen-no-scache-semantic-fn. Fix bitrot
5213 (-gen-all-semantic-fns): Renamed from -gen-all-semantics. Handle
5214 scache/no-scache appropriately. All callers updated.
5215 (-gen-sem-case): PCADDR->IADDR.
5216 * sim.scm (gen-argbuf-type): PCADDR->IADDR.
5218 * sim-decode.scm (*): Replace string-append,string-map with
5219 string-list,string-list-map where the result is sufficiently large.
5220 (-gen-decode-insn-table): Go back to simple version for non-scache
5221 case: just record IDESC in decoder tables and leave field extraction
5223 (-gen-decode-switch): Ditto.
5224 (-gen-decode-fn): Ditto.
5225 (-gen-extract-decls): Only emit format enum if with-scache?.
5226 * sim-model.scm (-gen-model-insn-fn): Extract ifields here in
5228 (-gen-model-insn-fns): Don't emit model fns for virtual insns.
5229 (-gen-insn-timing): Ditto.
5230 * sim.scm (gen-argbuf-type): Only output sem_fields union in
5233 * sim.scm (-hw-gen-fun-get): Use GET_<H-NAME> macro.
5234 (-hw-gen-fun-set): Use SET_<H-NAME> macro.
5236 1999-01-12 Doug Evans <devans@casey.cygnus.com>
5238 * cpu.scm (keep-mach-validate!): New proc.
5239 (include): New proc.
5241 * mach.scm (current-arch-mach-name-list): New proc.
5242 (-parse-arch-machs): Always return canonical form.
5243 (def-arch): Validate user specified machs to be kept.
5244 (def-mach-attr!): Simplify.
5246 * opcodes.scm (-opcodes-build-operand-instance-table?): New global.
5247 (option-init!): Initialize it.
5248 (option-set!): Set it.
5249 (gen-insn-table-entry): Emit 0 for operand instance ref if not
5250 output operand instance tables.
5251 (cgen-opc.in): Only output operand instance tables if asked to.
5253 * sim.scm (option-init!,option-set!): Clarify returned value.
5255 * sim.scm (gen-mach-bfd-name): Move from here.
5256 * utils-cgen.scm: To here.
5258 1999-01-11 Doug Evans <devans@casey.cygnus.com>
5260 * fr30.cpu (ilm): Fix comment field.
5261 (cond-branch): Remove explicit setting of COND-CTI, let cgen
5264 * rtl.scm (rtx-simplify,rtx-compile-time-constant?): New procs.
5265 (rtx-true?, rtx-false?): New procs.
5266 * rtx-funcs.scm (annul): Rename vpc to pc.
5267 (-rtx-traverse-if): Improve determination of whether then/else parts
5268 are conditionally executed.
5270 * sim.scm (-gen-argbuf-fields-union): Move definition of union to
5272 (gen-argbuf-type): Simplify generated definition (big sem_fields
5273 union moved outside).
5275 1999-01-11 Ben Elliston <bje@cygnus.com>
5277 * doc/porting.texi: New file.
5279 * doc/intro.texi: New file.
5280 (Layout): Use @example to insert preformatted ASCII text (such as
5281 diagrams). @code is inappropriate here.
5283 1999-01-06 Doug Evans <devans@casey.cygnus.com>
5285 * ifield.scm (-multi-ifield-read): Fix handling of insert/extract.
5287 * m32r.opc (print_hash): Cast dis_info.
5289 * sim-cpu.scm (-gen-hardware-types): Sanitize get/set macros.
5290 * sim.scm (<sim-hardware>,make!): Emit a comment for user-written
5293 1999-01-05 Doug Evans <devans@casey.cygnus.com>
5295 * i960.cpu (f-br-disp): Remove RELOC attribute.
5296 (f-ctrl-disp): Ditto.
5297 (callx-disp): set-quiet -> set for (reg h-gr 2).
5298 (callx-indirect,callx-indirect-offset): Ditto.
5300 * Makefile.am (gas-test): Fix dependencies.
5301 * Makefile.in: Rebuild.
5302 * cgen-gas.asm: File creation args are -<uppercase-letter>.
5303 * gas-test.scm (break-out-syntax,make-file-name): Delete.
5304 (gas-test-analyze!): Use syntax-break-out.
5305 * sim-test.scm (break-out-syntax,make-file-name): Delete.
5306 (sim-test-analyze!): Use syntax-break-out.
5307 (cgen-build.sh): Use gen-file-name.
5308 (cgen-allinsn.exp): Compute and pass all machs to run_sim_test.
5309 * insn.scm (syntax-break-out): New proc.
5310 * utils.scm (gen-file-name): New proc.
5312 * fixup.scm (nil,<?,<=?,>?): Delete.
5314 * utils.scm (count-true): Rewrite.
5316 * slib/sort.scm: Move sort.scm to slib directory.
5319 * iformat.scm (ifmt-compute!): Record empty format.
5321 * rtl.scm (semantic-in-out-operands): Simplify by moving several
5322 internal procs outside. Handle expression register numbers.
5325 * rtx-funcs.scm (annul): Rename new_pc to vpc.
5327 * sim-cpu.scm (-gen-cpu-reg-access-defns): Define access fns for
5329 (-gen-write-case): Pass vpc to SEM_BRANCH_FINI.
5330 (gen-semantic-fn,-gen-sem-case): Ditto.
5331 (cgen-cpu.c): Define WANT_CPU to @cpu@.
5332 (cgen-semantics.c): Ditto.
5333 * sim-decode.scm (-gen-extract-decls): Handle non-with-scache case.
5334 (gen-ifmt-argvars-defns): New proc.
5335 (gen-ifmt-argvars-assigns): New proc.
5336 (-gen-all-extractors): Delete FMT_EMPTY case, now handled like others.
5337 (-gen-decode-fn): Handle non-with-scache case.
5338 (cgen-decode.c): Define WANT_CPU to @cpu@.
5339 * sim-models.scm (-gen-mach-defns): Emit bfd name.
5340 (cgen-model.c): Define WANT_CPU to @cpu@.
5341 * sim.scm (gen-ifld-extract-argvar): New proc.
5342 (<sim-hardware>,make!): Don't emit [GS]ET_H_FOO macros for elements
5343 with FUN-ACCESS specified.
5344 (hw-fun-access?): New proc, as <hardware-base>:fun-access? method.
5345 (<hw-register>,gen-extract): New arg local?.
5346 (<hw-address>,gen-extract): Ditto.
5347 (-hw-cxmake-get): Handle non-with-scache case.
5348 (-hw-gen-set-quiet): Ditto.
5349 (<hw-address>,cxmake-get): Handle non-with-scache case.
5350 (gen-op-extract-argvar): New proc.
5351 (<operand>,gen-record-profile): Rewrite.
5352 (<operand>,gen-profile-code): Rewrite.
5353 (<unit>,gen-profile-code): Use -gen-argfld-ref.
5354 (gen-argbuf-fields-union): New proc.
5355 (gen-argbuf-type): Use it. Handle non-scache case.
5357 * *.scm: class:foo procs renamed to class-foo.
5358 * attr.scm (<attribute>): New member `for'.
5359 (-attr-parse): New first value in list for default if
5361 (non-bool-attr-list,attr:add!): Delete.
5362 (def-attr): Use current-attr-add!.
5363 (atlist-attr-value-no-default): New proc.
5364 (attr-lookup-default): Handle boolean attributes.
5365 (gen-attr-enum): New proc.
5366 (-attr-remove-meta-attrs-alist): New proc.
5367 (attr-nub): New proc.
5368 (current-attr-list-for): New proc.
5369 (current-{ifld,hw,op,insn}-attr-list): New procs.
5370 (attr-builtin!): New proc.
5371 * cpu.scm (keep-obj?): Rewrite.
5372 (-init-parse-cpu!): Call arch-init!.
5373 (-install-builtin!): Call {attr,mode,ifield,insn}-builtin!.
5374 (-finish-parse-cpu!): Call arch-finish!.
5375 * enum.scm (enum-list,enum:add,enum:lookup): Delete.
5376 (def-enum,def-full-enum): Use current-enum-add!.
5377 (gen-obj-list-enums): New proc.
5378 * hardware.scm (hw:add!,hw:lookup): Delete.
5379 (def-hardware,def-hardware-ext): Use current-hw-add!.
5380 (hw:std-attrs,hw:attr-list): Delete.
5381 (hardware-builtin!): Define builtin hardware attributes.
5382 * ifield.scm (ifld:add!,ifld:lookup): Delete.
5383 (def-ifield,def-full-ifield): Use current-ifld-add!.
5384 (ifld:std-attrs,ifld:attr-list): Delete.
5385 (ifield-builtin!): New proc.
5386 * insn.scm (insn:add!,insn:lookup): Delete.
5387 (def-full-insn): Use current-insn-add!.
5388 (insn:std-attrs): Delete.
5389 (insn-builtin!): New proc.
5390 * mach.scm (<arch>): New members attr-list,enum-list,op-list,
5392 (<arch-data>): New member machs.
5393 (current-attr-list,current-enum-list): New procs.
5394 (current-op-list,current-minsn-list): New procs.
5395 (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-add!): Ditto.
5396 (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-lookup):
5398 (-parse-arch-machs): New proc.
5399 (-arch-parse): New arg machs, all callers updated.
5400 (-arch-read): Handle machs spec.
5401 (def-arch): Define MACH attribute here.
5402 (mach-init!,mach-finish!): Not here.
5403 (cpu:add!,cpu:lookup): Delete.
5404 (def-cpu): Use current-cpu-add!.
5405 (<mach>): New member bfd-name.
5406 (-mach-parse): New arg bfd-name, all callers updated.
5407 (-mach-read): Handle bfd-name spec.
5408 (mach:add!,mach:lookup): Delete.
5409 (def-mach): Use current-mach-add!.
5410 (def-mach-attr!): New proc.
5411 (arch-init!): New proc.
5412 (arch-finish!): New proc. Reverse all object lists here.
5413 * minsn.scm (minsn-list,minsn-add!,minsn:lookup): Delete.
5414 (def-minsn): Use current-minsn-add!. Ignore minsn if mach not kept.
5415 (define-normal-macro-insn): Ignore minsn if mach not kept.
5416 * mode.scm (mode-builtin!): New proc.
5417 * model.scm (model:add!,model:lookup): Delete.
5418 (def-model): Use current-model-add!.
5419 * opcodes.scm (insn:attr-list): Delete.
5420 (attr-bool-gen-decl,attr-bool-gen-defn): New procs.
5421 (gen-attr-table-defn): Emit value for default.
5422 (gen-attr-table-defns): Emit bool_attr. Emit ifield attr table.
5423 (op:attr-list): Delete.
5424 (gen-operand-decls,gen-insn-decls): New proc.
5425 (compute-insn-attr-list): Delete.
5426 (cgen-opc.h): Reorganize and simplify.
5427 * operand.scm (-operand-list,operand-list,op:add,op:lookup): Delete.
5428 (def-operand,def-full-operand): Use current-op-add!.
5429 (op:std-attrs): Delete.
5430 (operand-enum): Delete.
5431 (operand-builtin!): Define builtin operand attrs.
5432 * utils-cgen.scm (sanitize): Update calls to lookup procs.
5433 (gen-attr-enum-decl): Use gen-obj-list-enums.
5434 (gen-obj-attr-defn): Renamed from gen-attr-defn, all callers updated.
5436 * fr30.cpu (define-arch): Add machs spec.
5437 (f-i4): SIGNED attribute -> !UNSIGNED.
5438 (f-disp8,f-disp9,f-disp10,f-s10,f-rel9,f-rel12): Ditto.
5439 (HASH-PREFIX): Define operand attribute.
5440 (NOT-IN-DELAY-SLOT): Define insn attribute.
5441 * i960.cpu (define-arch): Add machs spec.
5442 * m32r.cpu (define-arch): Add machs spec.
5443 (h-hi16): Remove UNSIGNED,SIGN-OPT attributes.
5444 (HASH-PREFIX): Define operand attribute.
5445 (FILL-SLOT): Define insn attribute.
5447 Thu Dec 17 17:15:06 1998 Dave Brolley <brolley@cygnus.com>
5449 * fr30.cpu (stilm): Correct mask for and operation.
5451 1998-12-17 Doug Evans <devans@casey.cygnus.com>
5453 * sim-test.scm (cgen-build.sh): Use `mach' to specify machs, not `cpu'.
5454 Replace START/EXIT with start/pass.
5455 (gen-sim-test): Delete ".text".
5457 Wed Dec 16 16:16:39 1998 Dave Brolley <brolley@cygnus.com>
5459 * fr30.cpu (cond-branch): Conditional branches not allowed in delay slots.
5461 Tue Dec 15 17:30:01 1998 Dave Brolley <brolley@cygnus.com>
5463 * fr30.cpu: Add NOT-IN-DELAY-SLOT as appropriate.
5464 (h-sbit): Make it FUN-ACCESS.
5465 (h-gr): Reorder so that general regs are always printed by number.
5467 1998-12-14 James E Wilson <wilson@wilson-pc.cygnus.com>
5469 * i960.cpu (flushreg): Use nop.
5471 1998-12-14 Doug Evans <devans@casey.cygnus.com>
5473 * m32r.cpu (default-alignment): Specify.
5474 * mach.scm (<arch-data>): New member default-alignment.
5475 (adata:default-alignment): New proc.
5476 (current-arch-default-alignment): New proc.
5477 (-arch-parse): New arg default-alignment.
5478 (parse-alignment): New proc.
5479 (-arch-read): Handle default-alignment spec.
5481 * rtx-funcs.scm (attr:): Pass attr-name through gen-c-symbol.
5483 * insn.scm (f-%): Delete.
5484 * sim-cpu.scm (gen-define-fields): Delete support for f-%. Can
5485 be readded if proved useful.
5486 (gen-extract-fields): Ditto. Use gen-ifetch.
5487 * sim.scm (<hw-memory>,cxmake-get): Pass pc to GETMEM*.
5488 (<hw-memory>,gen-set-quiet): Pass pc to SETMEM*.
5490 Mon Dec 14 16:20:59 1998 Dave Brolley <brolley@cygnus.com>
5492 * fr30.cpu (div2): Set zbit properly when remainder not zero.
5494 1998-12-14 Dave Brolley <brolley@cygnus.com>
5496 * fr30.cpu: Remove stub macros.
5497 (div1): Shift bits from mdl into mdh. Don't use addc/subc.
5498 (div2): Don't use addc/subc.
5500 1998-12-11 Doug Evans <devans@casey.cygnus.com>
5502 * utils-cgen.scm (gen-obj-sanitize): Only catch spelling errors
5505 Thu Dec 10 18:37:34 1998 Dave Brolley <brolley@cygnus.com>
5507 * fr30.cpu (div0s,div0u,div1,div2,div3,div4s): Implemented.
5509 Thu Dec 10 12:28:53 1998 Doug Evans <devans@canuck.cygnus.com>
5511 * cpu.scm (keep-all?): New proc.
5512 (assert-keep-all): Use it.
5513 * opcodes.scm (gen-ifmt-table-1): Use gen-obj-sanitize.
5514 * utils-cgen.scm (gen-obj-sanitize): Handle macro-insns.
5515 Check for spelling errors.
5517 1998-12-09 Doug Evans <devans@casey.cygnus.com>
5519 * rtl.scm (s-convop): Call -rtx-sem-mode.
5521 Tue Dec 8 10:58:38 1998 Doug Evans <devans@canuck.cygnus.com>
5523 * hardware.scm (-parse-hw-type): parse! no longer returns a result.
5524 (-parse-hw-profile): Ditto.
5525 (<hw-register>, parse!): Return `void' result.
5526 (<hw-pc>, parse!): Ditto.
5527 (<hw-memory>, parse!): Ditto.
5528 (<hw-immediate>, parse!): Ditto.
5529 (<hw-address>, parse!): Ditto.
5531 * ifield.scm (-ifield-parse): Validate encode/decode fields.
5532 (-ifld-parse-encode-decode): New proc.
5533 (-ifld-parse-encode,-ifld-parse-decode): New proc.
5534 (-multi-ifield-parse): Set encode/decode to #f.
5535 (ifld:decode-mode): New proc.
5536 * utils.scm (nub): Rewrite.
5537 * operand.scm (op-nub): Rewrite.
5538 * sim.scm (<ifield>, gen-type): Rewrite.
5539 (-gen-ifld-argbuf-defn): New proc.
5540 (gen-ifld-extract,gen-ifld-trace-extract): New procs.
5541 (<sim-hardware>): Forward gen-trace-extract onto `type'.
5542 Ditto for needed-iflds. gen-argbuf-defn renamed from gen-argbuf-elm.
5543 (<hardware-base>): New method needed-iflds. gen-argbuf-defn
5544 renamed from gen-argbuf-elm, return "". Rewrite gen-extract.
5545 New method gen-trace-extract.
5546 (<hw-register>): New method needed-iflds. gen-argbuf-defn renamed
5547 from gen-argbuf-elm, return "" if not caching register address.
5548 Rewrite gen-extract. New method gen-trace-extract.
5549 (<hw-address>): New methods needed-iflds, gen-argbuf-defn,
5550 gen-extract, gen-trace-extract, cxmake-get.
5551 (<hw-iaddress>): New method cxmake-get.
5552 (op-needed-iflds): New proc.
5553 (<operand>): Delete methods gen-argbuf-elm, gen-extract.
5554 (-gen-op-argbuf-defn): New proc.
5555 (gen-op-extract): Renamed from op:extract.
5556 (gen-op-trace-extract): Renamed from op:trace-extract.
5557 (fmt-extractable-operands): Renamed from fmt-semantic-operands
5559 (gen-argbuf-elm): Rewrite.
5560 * sim-decode.scm (-gen-record-args): Update.
5562 * sim.scm (c-cpu-macro): Renamed from cpu-deref. All uses changed.
5564 * pmacros.scm (-pmacro-expand): Handle procedural macros in
5565 argument position. Flag symbolic macros in function position as
5567 (define-pmacro): Handle quoting in definition of symbolic macros.
5568 (pmacro-trace): Call -pmacro-expand, not -pmacro-ref.
5570 Tue Dec 8 13:06:44 1998 Dave Brolley <brolley@cygnus.com>
5572 * fr30.opc (parse_register_list): Account for reverse masks
5574 (print_register_list): Ditto.
5575 (parse_low_register_list_ld): New function.
5576 (parse_hi_register_list_ld): New function.
5577 (parse_low_register_list_st): New function.
5578 (parse_hi_register_list_st): New function.
5579 (print_hi_register_list_ld): New function.
5580 (print_hi_register_list_st): New function.
5581 (print_low_register_list_ld): New function.
5582 (print_low_register_list_st): New function.
5583 * fr30.cpu (ldr15dr): Implement workaround.
5584 (ldm0,ldm1,stm0,stm1): Implemented.
5586 1998-12-08 Doug Evans <devans@casey.cygnus.com>
5588 * configure.in: Rename --with-hobbit to --with-cgen-hobbit.
5589 * configure: Regenerate.
5590 * Makefile.am (WITH_HOBBIT): Update.
5591 (cgen-hob.c): Remove Makefile dependency.
5592 (cgen.o): Depend on cgen-gh.h, config.h.
5593 * Makefile.in: Regenerate.
5594 * aclocal.m4: Regenerate.
5596 1998-12-07 James E Wilson <wilson@wilson-pc.cygnus.com>
5598 * i960.cpu, i960.opc: New files.
5600 Mon Dec 7 14:30:24 1998 Dave Brolley <brolley@cygnus.com>
5602 * fr30.opc (parse_register_number): New function.
5603 (parse_register_list): New function.
5604 (parse_low_register_list): Use parse_register_list.
5605 (parse_hi_register_list): Use parse_register_list.
5606 * fr30.cpu (sth): Fix assembler syntax. Implement more
5609 Fri Dec 4 16:07:13 1998 Doug Evans <devans@canuck.cygnus.com>
5611 * sim-cpu.scm (cgen-sem-switch.c): Update definition of TRACE_RESULT.
5612 * sim-decode.scm (-gen-record-args): Update call to TRACE_EXTRACT.
5613 * sim.scm (-op-gen-set-trace): Update call to TRACE_RESULT.
5614 (-op-gen-set-trace-parallel): Ditto.
5615 (gen-argbuf-type): New ARGBUF members trace_p,profile_p;
5617 * fr30.cpu (call,calld): Fix setting of pc.
5618 (f-op5): Fix start bit number.
5620 Fri Dec 4 17:06:28 1998 Dave Brolley <brolley@cygnus.com>
5622 * fr30.cpu (st): Fix operand ordering. Implement more
5625 Thu Dec 3 23:59:40 1998 Doug Evans <devans@canuck.cygnus.com>
5627 * ifield.scm (ifld:mode,ifld:hw-type): New procs.
5628 * iformat.scm (fmt-opcode-operands): Move to opcodes.scm.
5629 (fmt-semantic-operands): Move to sim.scm.
5630 * opcodes.scm (fmt-opcode-operands): Moved here from iformat.scm.
5631 * operand.scm (<hw-index>): New member `name'. All builders updated.
5632 (<hw-index>): New method get-name.
5633 (op-profilable?): Moved to sim.scm.
5635 * sim.scm (fmt-semantic-operands): Moved here from iformat.scm.
5636 (op-profilable?): Moved here from operand.scm.
5637 (gen-extract-type): Delete.
5638 (c-argfld-macro): Renamed from c-ifield-macro. All uses updated.
5639 (-gen-argfld-ref): New proc.
5640 (-gen-ifld-argfld-name): New proc.
5641 (gen-ifld-argfld-ref): Renamed from -gen-ifld-ref. All uses updated.
5642 (-gen-ifld-decoded-val): Renamed from -gen-ifld-raw-val.
5643 (-gen-hw-index-argfld-name,-gen-hw-index-argfld-ref): New procs.
5644 (<hardware-base>): Delete method gen-extract-type. New method
5646 (<hw-register): Ditto. Update method gen-extract.
5647 (<operand>, method gen-argbuf-elm): Rewrite.
5648 * rtl.scm (semantic-in-out-operands): Handle (ifield f-name).
5649 (s-cmpop): Fix handling of eq,ne for unsigned modes.
5650 * rtx-funcs.scm (eq,ne,lt,le,gt,ge,ltu,leu,gtu,geu): Update.
5652 * sim-decode.scm (-gen-record-args): Tweak.
5654 * sim.scm (gen-argbuf-elm): Handle case of all constant opcode fields.
5656 Thu Dec 3 14:23:27 1998 Dave Brolley <brolley@cygnus.com>
5658 * doc/porting: Fix typo: gas->sim.
5659 * fr30.opc (print_m4): New function.
5660 * fr30.cpu: Implemented many insns.
5662 Thu Dec 3 00:03:16 1998 Doug Evans <devans@canuck.cygnus.com>
5664 * rtl.scm (build-reg-operand!): Remove redundant setting of hw-name.
5666 * fr30.cpu (f-rel9): Delete RELOC attribute.
5667 (f-rel12): Add PCREL-ADDR attribute.
5668 (label9): Make an h-iaddr, not h-uint. Delete asm print spec.
5669 (label12): Delete PCREL-ADDR attribute. Make an h-iaddr, not h-sint.
5670 * fr30.opc (print_label9): Delete.
5672 * iformat.scm (ifmt-analyze): Check attributes derived from semantic
5673 code for CTI indicators.
5674 * insn.scm (insn-cti?): Simplify.
5675 * utils-cgen.scm (atlist:cti?): New proc.
5677 1998-11-30 Doug Evans <devans@casey.cygnus.com>
5679 * fr30.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
5680 (f-i20-4,f-i20-16,f-i20): New fields.
5686 * fr30.opc (CGEN_DIS_HASH_SIZE,CGEN_DIS_HASH): Define in opc.h.
5687 * m32r.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
5688 * mach.scm (arch-data): Ditto.
5689 (current-arch-default-insn-word-bitsize): Renamed from
5690 current-arch-default-insn-bitsize [ya, that's a pretty long name].
5691 (-arch-read): Update.
5693 * hardware.scm (hw:attr-list): Move here ...
5694 * opcodes.scm: ... from here.
5696 * ifield.scm (fld:bitrange): Delete.
5697 (fld:word-offset,fld:word-length): New procs.
5698 (ifield?): Use class-instance.
5699 (<ifield>, method field-start): Rewrite.
5700 (ifld:enum): New proc.
5701 (<ifield>, methods field-mask,field-value): Rewrite.
5702 (-ifield-parse): Rewrite.
5703 (<multi-ifield> support): Rewrite.
5704 (ifld-beyond-base?): Rewrite.
5705 (ifld:std-attrs): New variable.
5706 (ifld:attr-list): New proc.
5707 * iformat.scm (-compute-insn-mask): Rewrite.
5708 * insn.scm (-parse-insn-format): New arg errtxt, all callers updated.
5710 (-parse-insn-format-symbol,-parse-insn-format-list): New procs.
5711 * opcodes.scm (<hardware>): No longer forward gen-insert,gen-extract
5713 (<operand>): Ditto. Forward onto index instead.
5714 (gen-ifld-decls,gen-ifld-defns): New procs.
5715 (ifld:insert,ifld:extract): New procs.
5716 (<ifield>): New methods gen-insert, gen-extract.
5717 (<multi-ifield>): Ditto.
5718 (<hw-index>): Forward gen-insert,gen-extract onto value.
5719 (<hw-asm>): Delete insert/extract support.
5720 (<hw-register,hw-memory,hw-immediate>): Ditto.
5721 (gen-hash-defines): Use string-list.
5722 Define CGEN_MAX_IFMT_OPERANDS.
5723 (gen-switch): Use string-list,string-list-map.
5724 (gen-fget-switch,gen-fset-switch): Use string-list.
5725 (gen-parse-switch,gen-insert-switch): Ditto.
5726 (gen-extract-switch,gen-print-switch): Ditto.
5727 (gen-insert-switch,gen-extract-switch): New local `total_length'.
5728 (gen-ifmt-table-1,gen-ifmt-table): New procs.
5729 (gen-ifmt-entry): Renamed from gen-iformat-entry, rewrite.
5730 (gen-ivalue-entry): New proc.
5731 (gen-insn-table-entry): Use string-list. Update iformat,ivalue
5732 computation. Use 0 for operand ref table if ALIAS insn.
5733 (gen-minsn-table-entry): Use string-list.
5734 (gen-macro-insn-table): Temporarily emit format tables for ALIAS insns.
5735 (gen-opcode-open): Record address of ifield table.
5736 (cgen-opc.h): Call gen-ifld-decls.
5737 (cgen-opc.in): Call gen-ifld-defns, gen-ifmt-table.
5738 * types.scm (<bitrange>): New members word-offset,word-length.
5739 Delete member total-length. Delete methods start,mask,value.
5740 (bitrange:word-offset,bitrange:word-length): New procs.
5741 * sim-cpu.scm (gen-define-fields): Simplify.
5742 (gen-extract-fields): Simplify.
5743 * sim.scm (<ifield>, gen-ifld-extract): Rewrite.
5744 (<ifield>): New methods gen-ifld-extract-decl.
5745 Delete method gen-ifld-extract-beyond.
5746 (<multi-ifield>): New methods gen-ifld-extract-decl.
5747 (<multi-ifield>, method gen-ifld-extract): Implement.
5748 (-gen-ifld-extract-base,-gen-ifld-extract-beyond): New procs.
5749 (gen-ifld-exttact,gen-ifld-extract-beyond): Delete.
5751 * rtl.scm (-rtx-traverse-no-mode): Process operands.
5752 (-rtx-traverse-syntax-no-mode): New proc.
5753 (semantic-in-out-operands): Watch for `delay' and add DELAY-SLOT attr.
5754 (s-ifield): New proc.
5755 (s-shop): Don't prepend `unsigned' for unsigned modes.
5756 * rtx-funcs.scm (ifield): New rtx function.
5757 (ref,symbol): Use standard -rtx-traverse-syntax-no-mode.
5758 (delay): New rtx function.
5759 * insn.scm (insn:std-attrs): Add DELAY-SLOT.
5761 * cos.scm (-elm-make-method-getter): Fix typo.
5763 * utils.scm (backslash): Handle lists of strings.
5765 Thu Nov 26 11:47:29 1998 Dave Brolley <brolley@cygnus.com>
5767 * fr30.cpu (f-rel9): Correct for pc+2.
5768 (label9): Use print_label9.
5769 * fr30.opc (print_label9): New function.
5771 Tue Nov 24 11:19:35 1998 Dave Brolley <brolley@cygnus.com>
5773 * fr30.cpu: Change $r13,$r14,$r15 to uppercase.
5774 * fr30.opc (parse_low_register_list): Renamed.
5775 (parse_hi_register_list): Renamed.
5776 (print_hi_register_list): Renamed.
5777 (print_low_register_list): Renamed.
5779 Mon Nov 23 18:26:36 1998 Dave Brolley <brolley@cygnus.com>
5781 * fr30.cpu (f-rel9): Now a pc relative offset.
5783 1998-11-23 Doug Evans <devans@casey.cygnus.com>
5785 * opcodes.scm (op-asm): Move to here, from operands.scm.
5786 (<op-asm>, method parse!): Validate arguments.
5787 (<operand>, method gen-function-name): Fix thinko.
5788 * operand.scm (<operand>, method make!): Don't set op-asm here.
5789 * utils.scm (list-elements-ok?): New proc.
5791 * opcodes.scm: Clean up pass.
5793 1998-11-20 Doug Evans <devans@tobor.to.cygnus.com>
5795 * fr30.cpu (int): Defer saving of ps,pc and setting ibit,sbit to
5796 the fr30_int function.
5797 (h-cr): Remove PROFILE,CACHE-ADDR attributes.
5798 (h-dr): Add FUN-ACCESS attribute.
5800 1998-11-20 James E Wilson <wilson@wilson-pc.cygnus.com>
5802 * sim-model.scm (-gen-mach-defns): Use gen-sym instead of obj:name
5803 for C symbol for models array.
5805 Thu Nov 19 15:57:45 1998 Dave Brolley <brolley@cygnus.com>
5807 * fr30.opc (parse_reglist_low): New function.
5808 (parse_reglist_hi): New function.
5809 (print_reglist_low): New function.
5810 (print_reglist_hi): New function.
5811 * fr30.cpu: Finish remaining insn stubs.
5813 1998-11-19 Doug Evans <devans@tobor.to.cygnus.com>
5815 * sim.scm (-gen-extract-word): Handle fields shorter than entire word.
5817 * fr30.cpu (ldi32m): Don't use for disassembly.
5819 Wed Nov 18 21:34:41 1998 Dave Brolley <brolley@cygnus.com>
5821 * fr30.cpu (int): Implement it.
5823 1998-11-18 Doug Evans <devans@casey.cygnus.com>
5825 * rtx-funcs.scm (nop): Fix C code.
5827 * rtl.scm (semantic-in-out-operands): Fix setting of sem-attrs.
5829 * fr30.cpu (f-i32): New ifield.
5832 (ldi32m): New macro insn.
5833 (inte): Provide simple version for now.
5835 * sim-arch.scm: New file.
5836 * sim.scm: Move architecture support generation to sim-arch.scm.
5837 * cgen-sim.scm: Load sim-arch.scm.
5840 * hardware.scm (pc?) New proc.
5841 (class <hardware-base>): Rewrite method 'pc?.
5842 (class <hardware>): Forward 'pc? to the hardware type.
5843 (class <hw-pc>): New method 'pc?.
5845 Add support for variable length ISAs.
5846 * ifield.scm (ifld-beyond-base?): New proc.
5847 * m32r.cpu: Remove integral-insn? spec.
5848 * mach.scm (arch:derived,arch:set-derived!): New procs.
5849 (arch:app-data,arch:set-app-data!): New procs.
5850 (class <arch>): New members derived, app-data.
5851 (class <cpu>): Delete member integral-insn?.
5852 (cpu:integral-insn?): Delete.
5853 (-cpu-parse): Delete arg integral-insn?. All callers updated.
5854 (-cpu-read): Delete integral-insn? support.
5855 (state:decode-assist): Delete.
5856 (state:int-insn?): Delete.
5857 (<derived-arch-data>): New class.
5858 (-adata-set-derived!): New proc.
5859 (mach-finish!): Call it.
5860 * opcodes.scm (<hw-asm>, method gen-extract): Pass pc to C handler.
5861 (gen-operand-instance): Add COND_REF support.
5862 (gen-operand-instance-table): Ditto.
5863 (gen-hash-defines): Update.
5864 (gen-extract-switch): Update type of `insn_value' arg.
5865 (gen-opcode-open): Update type of `value' arg of dis_hash_insn.
5866 * rtl.scm (-rtx-ref-type): Renamed from -rtx-set?. All callers
5868 (semantic-in-out-operands): Compute UNCOND-CTI,COND-CTI from rtl.
5869 * sim-cpu.scm (gen-define-fields): Create vars to hold insn value
5870 beyond the base insn (for large insns).
5871 (-gen-extract-beyond-var-list): New proc.
5872 (gen-extract-fields): Handle large insns.
5873 (-gen-write-case): Update sem_arg computation.
5874 Update initial vpc computation.
5875 (gen-semantic-fn): Ditto. Update type of `insn'.
5876 (-gen-sem-case): Update sem_arg computation.
5877 Update initial vpc computation.
5878 * sim.scm (<ifield>, gen-ifld-extract): Renamed from `extract'.
5879 (-gen-extract-word): New proc.
5880 (<ifield>): New method gen-ifld-extract-beyond.
5881 (gen-ifld-extract-beyond): New proc.
5882 * types.scm (bitrange-overlap?): New proc.
5884 * utils.scm (bits->bytes): New proc.
5885 (bytes->bits): New proc.
5887 Move extraction support into decoder.
5888 * sim-cpu.scm (-gen-record-args,-gen-record-profile-args,
5889 -gen-extractor,-gen-all-extractors,cgen-extract.c): Move extraction
5890 support to sim-decode.scm.
5891 * sim-decode.scm (-gen-decode-insn-table): Change decoder data to
5892 be array of IDESC,FMT entries. Make the array const.
5893 (-gen-gcc-label-table): Make array const.
5894 (-gen-decode-switch): Branch to extraction code after insn has been
5896 (-gen-decode-insn-globals): Delete extract handler from
5898 (gen-decode-fn): Add extraction support.
5899 (-gen-sem-fn-decls): Delete extraction fn decls.
5900 (-gen-idesc-decls): Update @cpu@_decode decl.
5901 (-gen-idesc-init-fn): Delete extraction support.
5902 (-gen-extract-decls): New proc.
5904 * sim-cpu.scm (cgen-sem-switch.c): Update switch test.
5905 (sim-finish!): Surround pbb only code with #if WITH_SCACHE_PBB.
5907 * sim-decode.scm (build-decode-table-entry): New arg invalid insn.
5908 All callers updated.
5909 (table-entry:make): Record insn value as insn object, not name.
5912 * hobbit.scm (path_basename): Renamed from `basename' to avoid
5913 collision with C function.
5914 (path_dirname): Similarily.
5915 * hobbit.c,hobbit.h: Rebuild.
5917 Wed Nov 18 11:26:17 1998 Dave Brolley <brolley@cygnus.com>
5919 * fr30.cpu (dir2r15-predec-stub): Reference to R15 must be indirect.
5921 Mon Nov 16 19:19:50 1998 Dave Brolley <brolley@cygnus.com>
5923 * fr30.cpu: Implement more instruction stubs.
5925 Thu Nov 12 19:20:28 1998 Dave Brolley <brolley@cygnus.com>
5927 * fr30.cpu: Implement more instruction stubs.
5929 Tue Nov 10 10:53:55 1998 Doug Evans <devans@canuck.cygnus.com>
5931 * rtl.scm (-rtx-expr-mode-name): Handle sequence locals.
5933 * rtx-funcs.scm (zflag:,zflag,nflag:,nflag): New rtx fns.
5935 * operand.scm (<pc>, method make!): FAKE renamed to SEM-ONLY.
5936 (op:std-attrs): Ditto.
5937 * opcodes.scm (gen-operand-instance): Ditto.
5938 (gen-switch): Ditto.
5939 * m32r.cpu (condbit,accum): Update.
5940 * fr30.cpu (nbit,vbit,zbit,cbit): Update.
5942 Mon Nov 9 14:30:51 1998 Doug Evans <devans@seba.cygnus.com>
5944 * enum.scm (-enum-read): Fix typo.
5946 * iformat.scm (-ifmt-search-key): Simplify a little.
5948 Mon Nov 9 12:07:56 1998 Dave Brolley <brolley@cygnus.com>
5950 * doc/porting: semantics.c -> sem.c.
5951 * Makefile.in: Regenerate.
5952 * fr30.cpu (add): Change ADD to add. Add more registers and set
5953 status bits on 'add' instruction.
5955 Fri Nov 6 18:15:05 1998 James E Wilson <wilson@wilson-pc.cygnus.com>
5957 * sim.scm (-gen-arch-model-decls): Default MAX_UNITS to 1 instead
5960 Fri Nov 6 17:43:16 1998 Doug Evans <devans@seba.cygnus.com>
5962 * minsn.scm (minsn:enum): Update, call current-arch-name.
5964 * pmacros.scm (-pmacro-expand): Make `cep' a variable.
5966 * Makefile.am (CGEN_HOB_INPUT_FILES): Add pmacros.scm,enum.scm,
5967 mach.scm,model.scm,types.scm,ifield.scm,minsn.scm.
5968 (ARCH,CGEN,CGENFLAGS): New variables.
5969 (gas-test,sim-test): New rules.
5970 * Makefile.in: Rebuild.
5971 * configure.in (arch): Define.
5972 * configure: Rebuild.
5974 * cgen-hob.scm (*UNSPECIFIED*): Renamed from UNSPECIFIED.
5975 * All .scm files: Ditto.
5977 * dev.scm: Fix gas-test call to cpu-load.
5978 * gas-test.scm: Clean up pass to remove bit-rot.
5979 * sim-test.scm: Ditto.
5981 * enum.scm (read-enum): Fix typo in `vals' handling.
5983 * hardware.scm (-parse-hw-type): Fix typo.
5984 (parse-hardware): Rename `asm' to `aasm' to avoid GCC reserved word.
5985 (def-hardware,define-normal-hardware): Ditto.
5987 * hobbit.scm (*case-sensitive-flag*): New configuration variable.
5988 (display-var): Use it.
5989 * hobbit.c: Rebuild.
5990 * hobbit.h: Rebuild.
5992 * ifield.scm (-ifield-read): Rename local `length' to `length-' to
5993 avoid hobbit problem.
5994 * mach.scm (-cpu-read): Rename local `parallel-insns' to
5995 `parallel-insns-' to avoid hobbit problem.
5997 Fri Nov 6 17:19:12 1998 Doug Evans <devans@canuck.cygnus.com>
5999 * m32r.opc (parse_hi16): Fix call to cgen_parse_address.
6000 (parse_slo16,parse_ulo16): Ditto.
6001 * opcodes.scm (<hw-address>, method gen-parse): Ditto.
6003 Thu Nov 5 13:04:53 1998 Doug Evans <devans@canuck.cygnus.com>
6005 * Makefile.am (GUILELDFLAGS,GUILELDADD): New variables.
6006 (cgen_LDFLAGS,cgen_LDADD,hob.x): Use them.
6007 * Makefile.in: Rebuild.
6008 * insn.scm (define-normal-insn): Expand pmacros.
6009 * mode.scm (<mode>): New member `host?'. All uses updated.
6010 (mode:host?): New proc.
6011 * rtl.scm (define-rtx-node): Make a syntax proc, not a macro.
6012 (define-rtx-syntax-node,define-rtx-macro-node): Ditto.
6013 (define-rtx-dual-mode): Ditto.
6014 (s-index-of): New proc.
6015 (s-unop): Use plain C for host mode operations.
6016 (s-binop,s-shop,s-boolifop,s-cmpop): Ditto.
6017 * rtx-funcs.scm (index-of): New rtx function.
6018 * sim.scm (<hw-index>): New method cxmake-get.
6020 Wed Nov 4 23:58:08 1998 Doug Evans <devans@seba.cygnus.com>
6022 * sim-cpu.scm (-gen-engine-decls): Delete.
6024 Wed Nov 4 18:40:47 1998 Dave Brolley <brolley@cygnus.com>
6026 * doc/rtl (Example): Correct Typo.
6027 * doc/porting: Add 'make dep' step to opcodes port instructions.
6028 * fr30.opc: New file.
6029 * fr30.cpu: New file.
6031 Wed Oct 28 13:36:15 1998 Doug Evans <devans@canuck.cygnus.com>
6033 * configure.in: Handle guile $exec_prefix = $prefix/foo.
6034 * Makefile.am (GUILEINCDIR): New variable.
6036 * configure: Regenerate.
6037 * Makefile.in: Ditto.
6038 * aclocal.m4: Ditto.
6040 Mon Oct 19 13:19:34 1998 Doug Evans <devans@seba.cygnus.com>
6042 * sim-cpu.scm (cgen-extract.c): Delete #include cpu-sim.h
6043 (cgen-semantics.c): Ditto.
6044 * sim-decode.scm (cgen-decode.c): Delete #include cpu-sim.h,cpu-opc.h.
6045 * sim-model.scm (cgen-model.c): Ditto.
6046 * sim.scm (cgen-arch.h): Delete #include @arch@-opc.h.
6047 (cgen-arch.c): Delete #include cpu-sim.h,cpu-opc.h.
6049 * opcodes.scm (read-cpu.opc): Handle empty file.
6051 * cos.scm (-elm-make-method-setter): Fix typo.
6053 * cpu.scm (-init-parse-cpu!): Call types-init!.
6054 (-finish-parse-cpu!): Call types-finish!.
6055 * ifield.scm (<ifield>): Delete members start,length.
6056 New member bitrange.
6057 (<ifield>, methods field-start,field-length): Update.
6058 (fld:start): New arg insn-len. All callers updated.
6059 (<ifield>, methods field-mask,field-value): Update.
6060 (-ifield-parse): Update.
6061 (ifield-init!): Update.
6062 * iformat.scm (compute-insn-length): Simplify.
6063 (compute-insn-mask): Update.
6064 * insn.scm (insn:value): Update.
6065 * mach.scm (<arch-data>): New members default-insn-bitsize,insn-lsb0?.
6066 (current-arch-default-insn-bitsize): New proc.
6067 (current-arch-insn-lsb0?): New proc.
6068 (-arch-parse,-arch-read): Update.
6069 (<cpu>): New member file-transform.
6070 (-cpu-parse,-cpu-read): Update.
6071 * opcodes.scm (<hw-asm>, method gen-extract): Pass ex_info to handler.
6072 (gen-hash-defines): Define CGEN_INSN_LSB0_P.
6073 (CGEN_INT_INSN_P): Renamed from CGEN_INT_INSN.
6074 (gen-insert-switch): Update args of @arch@_cgen_insert_operand.
6075 (gen-extract-switch): Update args of @arch@_cgen_extract_operand.
6076 (gen-opcode-open): Set CGEN_OPCODE_INSN_ENDIAN.
6077 * operand.scm (op:start): Update call to field-start method.
6078 * sim-decode.scm (opcode-slots): New arg lsb0?.
6079 (fill-slot!,build-slots): Ditto.
6080 (build-decode-table-entry,build-decode-table-guts): Ditto.
6081 (gen-decoder-table,gen-decoder-switch,gen-decoder): Ditto.
6082 (gen-decode-fn): Ditto.
6083 (cgen-decode.c): Update call to gen-decode-fn.
6084 * sim.scm (gen-argbuf-type): Move `semantic' to cpu specific part.
6085 (-gen-cpu-header,-gen-cpuall-includes): New procs.
6086 (cgen-cpuall.h): Call -gen-cpuall-includes.
6087 * types.scm (<bitrange>): New class.
6088 (types-init!,types-finish!): New procs.
6089 * utils-cgen.scm (parse-number): New proc.
6090 (parse-boolean): New proc.
6091 * utils.scm (word-value): Renamed from shift-bits, rewrite.
6092 (word-mask): Rewrite.
6093 * m32r.cpu (define-arch): New fields default-insn-bitsize,insn-lsb0?.
6094 (m32rxf): New field `file-transform'.
6095 * m32r.opc (my_print_insn): print_int_insn -> print_insn.
6097 * hobbit.h: Fix include file name.
6099 Fri Oct 9 16:58:10 1998 Doug Evans <devans@seba.cygnus.com>
6101 * slib: New directory of slib files used by cgen/hobbit.
6102 * hobbit.scm: New file.
6103 * hobbit.c: New file.
6104 * hobbit.h: New file.
6105 * hobscmif.h: New file.
6106 * hob-main.c: New file.
6107 * hobslib.scm: New file.
6109 * Makefile.am: Add support for compiling hobbit, and using compiled
6110 version of hobbit to compile cgen.
6111 * Makefile.in: Regenerate.
6112 * configure.in: Support --with-hobbit.
6113 * configure: Regenerate.
6114 * acconfig.h (WITH_HOBBIT): Add.
6115 * config.in: Regenerate.
6117 * rtl.scm: New file, was cdl-c.scm.
6118 Definition of rtx funcs moved to rtx-funcs.scm.
6119 (semantic-in-out-operands): Rewrite to compute object form of
6121 * rtx-funcs.scm: New file.
6123 * cgen-gh.c: #include "config.h".
6124 (gh_cadddr,gh_cddddr): New fns.
6125 (cgh_vector_to_list): New fn.
6126 (cgh_map1,cgh_map2,cgh_map1_fn2): Rewrite.
6127 (cgh_init): Prefix qsort procs with "cgh-".
6128 * cgen-gh.h (gh_cadddr,gh_cddddr,cgh_vector_to_list): Declare.
6129 * cgen.c: #include "config.h".
6131 * attr.scm (bitset-attr?): New proc.
6132 (<bitset-attribute>, method parse-value): Value syntax changed from
6133 (val1 val2 ...) to val1,val2,....
6134 (<bitset-attribute>): New method gen-value.
6135 (<integer-attribute>): New method gen-value.
6136 (<enum-attribute>): New method gen-value.
6137 * cpu.scm: Disable debugging evaluator if (not (defined? 'DEBUG-EVAL)).
6138 (<reader>): New class.
6139 (CURRENT-ARCH,CURRENT-READER): New globals.
6140 (keep-mach?): Move here from mach.scm.
6141 * mach.scm (arch,arch-comment,arch-default-mach): Delete.
6142 (<arch>): New class.
6143 (<arch-data>): New class.
6144 (<cpu>): Make subclass of <ident>.
6145 (*ENDIAN* variables): Delete.
6146 (process-state-vars): Delete.
6147 (mach-finish!): Add `base' value to MACH attribute.
6148 * hardware.scm (<hardware>): Make subclass of <ident>.
6149 (hw:std-attrs): New global.
6150 (hw-profilable?): New proc.
6151 * ifield.scm (<ifield>): Make subclass of <ident>.
6152 (sort-ifield-list): Move here from iformat.scm.
6153 * iformat.scm (<iformat>): Renamed from <insn-format>.
6154 Make subclass of <ident>.
6155 (-ifmt-search-key): Include cti? in categorization of formats.
6156 (ifmt-analyze): Compile semantics (turn to object form).
6157 * insn.scm (<insn>): Make subclass of <ident>.
6158 New member compiled-semantics.
6159 (insn:std-attrs): Add SKIP-CTI, VIRTUAL.
6160 * mode.scm (<mode>): Make subclass of <ident>.
6162 * model.scm (<unit>): Make subclass of <ident>.
6163 New members inputs,outputs.
6164 (<model>): Make subclass of <ident>. New member state.
6165 (-unit-parse): Parse inputs,outputs.
6166 (<iunit>): New class.
6167 (-insn-timing-parse-model): New proc.
6168 (parse-insn-timing): Function unit spec rewritten.
6169 * operand.scm (<operand>): Make subclass of <ident>.
6170 New members sem-name,num,cond? New method gen-pretty-name.
6171 (hw-index-scalar): New global.
6172 (op-nub-hw): Move here from rtl.scm.
6173 (op:lookup-sem-name,op-profilable?): New procs.
6174 * pmacros.scm: Rewrite to pass through hobbit.
6175 * utils-cgen.scm (gen-attr-defn): Simplify using new gen-value method.
6176 * utils.scm (logit): Make a macro.
6177 (bit-set?): Rewrite.
6178 (high-part): Rewrite.
6180 * m32r.cpu (define-arch): Move to top of file.
6181 (cpu family m32rbf): Renamed from m32rb.
6182 (model m32r/d): Function unit spec rewritten.
6183 (all insns): Ditto. Replace UBI with BI.
6185 * opcodes.scm (gen-attr-table-decls): Declare
6186 @arch@_cgen_hw_attr_table.
6187 (gen-attr-table-defns): Generate hw attribute table.
6189 * sim-cpu.scm (-gen-engine-decls): New proc.
6190 (-gen-model-decls): New proc.
6191 (gen-parallel-exec-type): Add new member `written' to struct parexec.
6192 (-gen-record-args): Add SEM_BRANCH_INIT_EXTRACT if cti insn.
6193 (-gen-record-profile-args): Simplify.
6194 (-gen-parallel-sem-case): Delete.
6195 (gen-semantic-fn): Emit SEM_BRANCH_{INIT,FINI} if cti insn.
6196 New local `written'. Delete profiling code.
6197 (-gen-sem-case): Ditto.
6198 (-uncond-written-mask,-any-cond-written?): New procs.
6199 (cgen-sem-switch.c): Include duplicates of insns that can be executed
6200 parallelly or serially, and write-back handlers for all parallel insns.
6201 * sim-decode.scm (-gen-decode-insn-globals): Add parallel write-back
6202 support to initialization of struct insn_sem.
6203 (-gen-idesc-decls): Add parallel write-back support to struct idesc.
6204 (-gen-insn-sem-type): Add parallel write-back support to struct
6206 (-gen-idesc-init-fn): Add support for virtual insns.
6207 Add parallel write-back support.
6208 * sim-model.scm (gen-model-profile-fn): Delete
6209 (-gen-model-fn-decls): New proc.
6210 (-gen-model-insn-fn,-gen-model-insn-fns): New procs.
6211 (-gen-model-init-fn): New proc.
6212 (-gen-mach-defns): Initialize insn-name lookup and fast/full engine_fn
6213 members in @mach@_init_cpu.
6214 (cgen-model.c): Generate model handlers for each insn.
6215 * sim.scm (gen-define-field-macro): Cti insns handled differently.
6216 (<hw-pc>): New method gen-write.
6217 (<hw-register>, method gen-write): New arg `mode'.
6218 (<hw-register>): Delete method gen-record-profile!.
6219 New method gen-profile-index-type.
6220 (<hw-memory>, method gen-write): New arg `mode'.
6221 (<hw-address>, method gen-extract): Delete.
6222 (<hw-address>, method gen-write): New arg `mode'.
6223 (<hw-index>, method get-write-index): Rewrite.
6224 (<pc>, method cxmake-get-direct): Delete.
6225 (<pc>): New method cxmake-get. Comment out methods
6226 gen-set-quiet,gen-set-trace.
6227 (<operand>): New methods gen-argbuf-elm,gen-profile-argbuf-elm,
6228 gen-profile-index-type,gen-profile-code.
6229 Delete method gen-pretty-name. Rewrite method gen-write.
6230 Delete method cxmake-get-direct.
6231 (-op-gen-set-trace): Update `written'.
6232 (-op-gen-set-trace-parallel): Ditto.
6233 (-gen-hw-index-raw,-gen-hw-index): Handle strings.
6234 (gen-cpu-insn-enum-decl): Add extra entries for parallel
6235 insns and their write-back handlers.
6236 (insn-op-lookup): New proc.
6237 (<unit>): New method gen-profile-code.
6238 (<iunit>): New method gen-profile-code.
6239 (gen-argbuf-elm): Add profiling elements.
6240 (gen-argbuf-type): Define cti insns separately in their own struct.
6241 Add member `addr_cache' to this struct. Add entries for pbb virtual
6242 insns. Move semantic entries here from struct scache.
6243 Delete everything from struct scache except argbuf.
6244 (<insn>, method gen-profile-locals): Rewrite.
6245 (<insn>, method gen-profile-code): Rewrite.
6246 (sim-finish!): Create virtual pbb insns.
6248 Tue Sep 15 15:22:02 1998 Doug Evans <devans@canuck.cygnus.com>
6250 * m32r.cpu (h-cr): Add bbpc,bbpsw.
6251 (h-sm,h-bsm,h-ie,h-bie,h-bcond,h-bpc): Delete.
6252 (h-psw,h-bpsw,h-bbpsw): Define.
6253 (rte,trap): Handle bbpc,bbpsw.
6254 * opcodes.scm (max-operand-instances): Fix typo.
6255 * sim.scm (<hardware-base>, method 'fun-access?): Don't force virtual
6256 hardware elements to be fun-access.
6257 (-hw-gen-fun-get,-hw-gen-fun-set): Fix handling of scalars.
6259 Wed Sep 9 15:28:55 1998 Doug Evans <devans@canuck.cygnus.com>
6261 * m32r.cpu (trap): Pass `pc' to m32r_trap.
6263 Mon Aug 10 14:29:33 1998 Doug Evans <devans@canuck.cygnus.com>
6265 * opcodes.scm (gen-insn-table-entry): Comment out generation of cdx.
6267 Mon Aug 3 11:51:04 1998 Doug Evans <devans@seba.cygnus.com>
6269 * m32r.cpu (cpu m32rb): Renamed from m32r to distinguish from
6271 (mach m32r): Update.
6273 * mach.scm (mach:supports?): New proc.
6274 * sim-cpu.scm (gen-cpu-reg-access-{decls,defns}): Renamed from
6275 gen-reg-access-{decls,defns}.
6276 * sim.scm (gen-reg-access-{decl,defn}): New procs.
6277 (gen-mach-bfd-name): New proc.
6278 (gen-arch-reg-access-{decls,defns}): New procs.
6279 (cgen-arch.[ch]): Output register access cover fns.
6281 * hardware.scm (hardware-builtin!): Set print handlers for
6283 * m32r.opc (parse_hash,parse_hi16,parse_slo16,parse_ulo16): New arg
6285 (CGEN_PRINT_NORMAL,print_hash): Ditto.
6286 (my_print_insn): Ditto. Delete args buf, buflen.
6287 * opcodes.scm: Pass `od' (opcode-descriptor) to all C handlers.
6288 (-hw-asm-specs): Add `handlers' spec.
6289 (-parse-hw-asm): Lookup class at runtime. If no asm-spec, use
6291 (<hw-asm>): Renamed from <opval>. New elements parse,insert,extract,
6293 (<hw-asm>, gen-insert,gen-extract,gen-print): Use them.
6294 (<hw-asm>, parse!): New method.
6295 (gen-insn-table-entry): Print semantics.
6296 (gen-opcode-open): Renamed from gen-opcode-table.
6298 * utils.scm (string-write): No longer a macro.
6299 (-string-write): Handle procedure args.
6300 * opcodes.scm: Update all calls to string-write.
6301 * sim-cpu.scm: Ditto.
6302 * sim-decode.scm: Ditto.
6303 * sim-model.scm: Ditto.
6306 Fri Jul 31 14:40:38 1998 Doug Evans <devans@seba.cygnus.com>
6308 * opcodes.scm (cgen-ibd.h,gen-extra-ibd.h): New procs.
6309 (-gen-insn-builders,-gen-insn-builder): New procs.
6311 Fri Jul 24 11:38:59 1998 Doug Evans <devans@canuck.cygnus.com>
6313 * opcodes.scm (gen-syntax-entry): Fix bracketing for -Wall.
6314 (gen-opcode-table): Properly terminate comment.
6316 Tue Jul 21 10:51:42 1998 Doug Evans <devans@seba.cygnus.com>
6319 Clean up pass over everything, so starting fresh.