1 2005-10-18 Andreas Schwab <schwab@suse.de>
3 * cpu/m32r.opc (parse_slo16): Better version of previous patch.
5 2005-10-14 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
7 * cpu/m32r.opc (parse_slo16): Do not assume a 32-bit host word
10 2005-08-02 Dave Brolley <brolley@redhat.com>
12 * rtl-c.scm (s-unop): Don't dereference
13 CGEN_CPU_FPU (current_cpu)->ops->xxxxx in the generated code.
14 (s-binop, s-convop, s-cmpop): Likewise.
16 2005-07-29 Dave Brolley <brolley@redhat.com>
18 * sid-cpu.scm (-gen-scache-semantic-fn): Generate a declation of 'written'
19 if with-profile or with-parallel-write.
20 (cgen-semantics.cxx): Make the @prefix@ namespace available if with-parallel.
21 * operand.scm (op:new-mode): Convert (obj:name op) to a string for
24 2005-07-15 Alan Modra <amodra@bigpond.net.au>
26 * cpu/fr30.opc (print_register_list): Correct format strings.
27 * cpu/ip2k.opc: Likewise.
29 2005-07-05 Nick Clifton <nickc@redhat.com>
31 * cpu/iq2000.opc (parse_lo16, parse_mlo16): Make value parameter
32 unsigned in order to avoid compile time warnings about sign
35 2005-07-01 Nick Clifton <nickc@redhat.com>
37 * desc-cpu.scm: Update to ISO C90 function declaration style.
38 * opc-asmdis.scm: Likewise.
39 * opc-ibld.scm: Likewise.
40 * opc-itab.scm: Likewise.
41 * cpu/fr30.opc: Likewise.
42 * cpu/i960.opc: Likewise.
43 * cpu/ip2k.opc: Likewise.
44 * cpu/iq2000.opc: Likewise.
45 * cpu/m32r.opc: Likewise.
46 * cpu/openrisc.opc: Likewise.
47 * cpu/sh.opc: Likewise.
48 * cpu/sparc.opc: Likewise.
49 * cpu/xstormy16.opc: Likewise.
51 2005-06-15 Dave Brolley <brolley@redhat.com>
53 * sid-cpu.scm (-gen-hw-stream-and-destream-fns): New function.
54 (cgen-cpu.h): Call it.
56 Contributed on behalf of Graydon Hoare
57 2001-06-05 graydon hoare <graydon@redhat.com>
59 * utils.scm (foldl): Define.
63 (intersection): Simplify.
64 * sid.scm : Set APPLICATION to SID-SIMULATOR.
65 (-op-gen-delayed-set-maybe-trace): Define.
66 (<operand> 'gen-set-{quiet,trace}): Delegate to
67 op-gen-delayed-set-quiet etc. Note: this is still a little tangled
68 up and needs cleaning.
69 (-with-parallel?): Hardwire with-parallel to #t.
70 (<operand> 'cxmake-get): Replace with lookahead-aware code
71 * sid-decode.scm: Remove per-insn writeback fns.
72 (-gen-idesc-decls): Redefine sem_fn type.
73 * sid-cpu.scm (gen-write-stack-structure): Replace parexec stuff
74 with write stack stuff.
75 (cgen-write.cxx): Replace per-insn writebacks with single write
76 stack writeback. Add write stack reset function.
77 (-gen-scache-semantic-fn insn): Replace parexec stuff with write
79 * rtl-c.scm (xop): Clone operand into delayed operand if #:delayed
81 (delay): Set #:delayed attribute to calculated delay, update
82 maximum delay of cpu, check (delay ...) usage.
83 * operand.scm (<operand>): Add delayed slot to <operand>.
84 * mach.scm (<cpu>): Add max-delay slot to <cpu>.
85 * dev.scm (load-sid): Set APPLICATION to SID-SIMULATOR.
86 * doc/rtl.texi (Expressions): Add section on (delay ...).
88 2005-06-13 Jim Blandy <jimb@redhat.com>
90 * pmacros.scm (-pmacro-upcase, -pmacro-downcase): Handle symbols
93 2005-06-07 Zack Weinberg <zack@codesourcery.com>
95 * doc/porting.texi: Change all mention of md_apply_fix3 and
96 gas_cgen_md_apply_fix3 to md_apply_fix and gas_cgen_md_apply_fix
99 2005-05-18 Dave Brolley <brolley@redhat.com>
101 * utils-sim.scm (-gen-decode-default-entry): New function.
102 (-gen-decode-insn-entry): Now takes 'invalid-insn' argument. Generate
103 code to check that all opcodes bits match.
104 (-gen-decoder-switch): Use -gen-decode-default-entry.
106 2005-05-16 Jim Blandy <jimb@redhat.com>
108 * sid.scm (gen-ifetch): Require BITSIZE to be exactly the size
109 fetched by one of our GETIMEM* methods.
110 * utils-gen.scm (-extract-chunk-specs): Always fetch full
111 base-insn-sized chunks.
113 2005-05-10 Nick Clifton <nickc@redhat.com>
115 * Update the address and phone number of the FSF organization in
116 the GPL notices in the following files:
117 COPYING.CGEN, utils.scm, cpu/iq2000m.cpu, cpu/openrisc.cpu,
118 cpu/powerpc.cpu, slib/random.scm
120 2005-05-06 Jim Blandy <jimb@redhat.com>
122 * pprint.scm, cos-pprint.scm: Add documentation.
124 * pprint.scm (pprint): Don't wipe out elide-table after each call.
126 * pprint.scm, cos-pprint.scm: New files.
128 2005-04-04 Nick Clifton <nickc@redhat.com>
130 * opcodes.scm (-gen-parse-address): Initialise value to zero to
131 avoid a compile time warning.
133 2005-03-18 Nick Clifton <nickc@redhat.com>
135 * cpu/ip2k.opc (parse_lit8): Change wording of error message to
136 "percent-operand" from "%operand" as the latter confuses xgettext
137 into thinking that it is a C printf formating directive, which
138 prevents proper translation.
140 2005-02-23 Nick Clifton <nickc@redhat.com>
142 * opcodes.scm (gen-parse-number): Add a cast to the desired
143 pointer signed'ness in order to prevent compile time warnings.
144 * cpu/ip2k.opc: Fixed compile time warnings about differing
145 signed'ness of pointers passed to functions.
146 * cpu/iq2000.opc: Likewise.
147 * cpu/m32r.opc: Likewise.
148 * cpu/openrisc.opc: Likewise.
149 * cpu/xstormy16.opc: Likewise.
151 2005-02-22 Alan Modra <amodra@bigpond.net.au>
153 * desc-cpu.scm (gen-ifld-decls): Move cgen_ifld_table from here..
154 (cgen-desc.h): ..to here, after opcode/cgen.h include.
156 2005-02-16 Dave Brolley <brolley@redhat.com>
158 * utils.scm: Update copyright years.
159 * utils-gen.scm (gen-ifld-extract): Pass base-length to -gen-ifld-extract-base.
160 * sid.scm (gen-ifetch): Handle the case where bitsize == 24.
161 * operand.scm (-derived-operand-parse): Move logit message from level 1
164 2005-02-15 Nick Clifton <nickc@redhat.com>
166 * opc-itab.scm (-gen-ifmt-table-1): Add an ATTRIBUTE_UNUSED to
167 prevent compile time warning messages.
168 * opc-opinst.scm (-gen-operand-instance-table): Likewise.
169 * utils-gen.scm (attr-int-gen-defn): Likewise.
170 (attr-gen-defn): Likewise.
171 * cpu/ip2k.opc (parse_addr16_p): Remove unused function.
172 (print_dollarhex16): Remove unused function.
174 2005-02-15 Jim Blandy <jimb@redhat.com>
176 * guile.scm (cgen-call-with-debugging): Doc fix.
178 Make backtraces work more reliably.
179 * guile.scm: Set up debugging parameters, and enable debugging and
180 source positions while loading.
181 (cgen-call-with-debugging, cgen-debugging-stack-start): New
183 * read.scm: Don't set debugging parameters here.
184 (catch-with-backtrace): Function deleted.
185 (-cgen): Simply note the presence or absence of the -b option.
186 Pass the flag to cgen-call-with-debugging, so debugging is turned
187 off here if the user didn't request it, for faster computation.
188 (cgen): Call cgen-debugging-stack-start here, instead of
189 catch-with-backtrace.
191 * Makefile.am (GUILE): Explicitly load guile.scm here, and leave a
193 (desc, html, opcodes, sim-arch, sim-cpu, gas-test, sim-test):
194 Don't write out the trailing -s here.
195 * Makefile.in: Regenerated.
196 * cgen-doc.scm, cgen-gas.scm, cgen-stest.scm): Don't load
197 fixup.scm here; let the caller decide which Scheme's customization
199 * dev.scm: Load guile.scm, not fixup.scm.
200 * fixup.scm: Deleted; contents have all moved to guile.scm.
203 * guile.scm (debug-write): New function.
205 2005-02-14 Jim Blandy <jimb@redhat.com>
207 * pmacros.scm (pmacros-init!): For .eval macros, use eval1 as the
208 transformer procedure, not eval. Transformer procedures take one
211 2005-02-11 Nick Clifton <nickc@redhat.com>
213 * cpu/iq2000.opc (parse_jtargq10): Change type of valuep argument
214 to 'bfd_vma *' in order avoid compile time warning message.
216 2005-02-09 Jim Blandy <jimb@redhat.com>
218 * cgen-sim.scm (load-files): Don't load fixup.scm. (See
219 corresponding change in the sim/common directory.)
221 2005-02-07 Jim Blandy <jimb@redhat.com>
223 * cgen-opc.scm: Don't load fixup.scm here. (See corresponding
224 changes in the opcodes directory.)
226 * guile.scm: New file, containing Guile-specific definitions and
227 adaptations. This is loaded by the app-specific shell scripts.
228 Initially identical to fixup.scm.
229 * cgen-sid.scm: Don't load fixup.scm here.
231 * cos.scm: Profile elm-xset! when requested, not elm-set!; the
234 2005-01-27 Jim Blandy <jimb@redhat.com>
236 * utils.scm (string/symbol->append): Renamed from 'concat'.
237 * opcodes.scm (gen-switch): Use new name.
238 * insn.scm (-sub-insn-make!): Same.
239 * rtl.scm (rtx-dump): Same.
240 * semantics.scm (semantic-compile): Same.
242 2005-01-20 Jim Blandy <jimb@redhat.com>
244 * opcodes.scm (gen-switch): Use concat instead of string-map.
246 * utils.scm (concat): New function.
247 * insn.scm (-sub-insn-make!): Use concat instead of string-map.
248 * rtl.scm (rtx-dump): Same.
249 * semantics.scm (semantic-compile): Same.
251 2004-12-16 Jim Blandy <jimb@redhat.com>
253 * utils-cgen.scm (parse-name): Don't assume that string-map can be
254 applied to symbols. Process everything as strings, and then
255 convert to a symbol at the end.
257 * read.scm (debug-repl): Temporarily redirect input and output to
258 /dev/tty while we debug, so we don't interfere with whatever CGEN
259 is reading or writing.
260 * utils.scm (setter-getter-fluid-let, with-input-and-output-to):
263 2004-11-15 Michael K. Lechner <mike.lechner@gmail.com>
265 * cpu/iq2000.cpu: Added quotes around macro arguments so that they
266 will work with newer versions of guile.
268 2004-10-27 Nick Clifton <nickc@redhat.com>
270 * cpu/iq2000m.cpu: Import latest version from cpu/ directory.
271 * cpu/iq2000.cpu: Likewise.
273 2004-07-21 DJ Delorie <dj@redhat.com>
275 * cpu/xstormy16.cpu (movhmemgr): Use hmem8, not lmem8.
277 2003-03-14 Frank Ch. Eigler <fche@redhat.com>
279 * cpu/iq2000.opc (parse_jtargq10): Add ATTRIBUTE_UNUSED on unused args.
280 (parse_jtargq10, iq2000_cgen_isa_register, parse_mlo16): Declare.
282 2004-03-30 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
284 * cpu/m32r.opc (parse_hi16): Fixed shigh(0xffff8000) bug.
286 2004-03-22 Dave Brolley <brolley@redhat.com>
288 * utils.scm (copyright-fsf): Update copyright years.
289 (copyright-red-hat): Ditto.
290 * sid.scm (-op-gen-set-trace): Generate trace code before semantic
292 (-op-gen-set-trace-parallel): Ditto.
294 2004-02-10 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.dot.com>
296 * cpu/m32r.opc (my_print_insn): Fixed incorrect output when
297 disassembling codes for 0x*2 addresses.
299 2004-01-29 Dave Brolley <brolley@redhat.com>
301 * decode.scm (-opcode-slots): For short insns, generate 'opcode' with
302 zeroes in the extra bit positions and generate 'opcode-mask' with ones
303 in the extra bit positions.
305 2003-12-15 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
307 * cpu/m32r.cpu: Add PIPE_O attribute to "pop" instruction.
309 2003-12-04 Alan Modra <amodra@bigpond.net.au>
311 * cpu/openrisc.opc (openrisc_sign_extend_16bit): Don't rely on
312 "short" being 16 bit.
313 (parse_hi16): Likewise. Fix type-punned pointer warnings too, and
314 internationalize error message.
315 (parse_lo16): Likewise. Remove useless code.
317 2003-12-03 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
319 * cpu/m32r.cpu : Add new model m32r2.
320 Add new instructions.
321 Replace occurrances of 'Mitsubishi' with 'Renesas'.
322 Changed PIPE attr of push from O to OS.
323 Care for Little-endian of M32R.
324 * cpu/m32r.opc (CGEN_DIS_HASH, my_print_insn):
325 Care for Little-endian of M32R.
326 (parse_slo16): signed extension for value.
328 2003-10-26 Dave Brolley <brolley@redhat.com>
330 * sid-decode.scm (-gen-record-profile-args): Test trace_counter_p
331 and final_insn_count_p. Don't test WITH_PROFILE_MODEL_P.
332 (-gen-extract-fn): Call -gen-record-profile-args.
334 2003-10-21 Dave Brolley <brolley@redhat.com>
336 * sid-model.scm (-gen-model-class-decls): Generate MAX_UNITS as
338 * decode.scm (-opcode-slots): Correct typo in logit call.
340 2003-10-09 Jim Blandy <jimb@redhat.com>
342 * desc-cpu.scm (gen-hw-table-decls): Emit an 'extern' declaration
343 for @arch@_cgen_hw_table. GDB needs to be able to find this.
345 * mach.scm (def-isa-attr!): hardware can have ISA attributes, too.
347 2003-10-06 Dave Brolley <brolley@redhat.com>
349 * gen-all-doc: Add fr550.
351 2003-09-11 Doug Evans <dje@sebabeach.org>
353 * Makefile.am (ARCHFILE): New var.
354 (desc): Pass $(ARCHFILE) for -a parm, not $(ARCH).
355 (html,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Ditto.
356 * Makefile.in: Regenerate.
358 2003-09-08 Dave Brolley <brolley@redhat.com>
360 On behalf of Doug Evans <dje@sebabeach.org>
361 Pass in paths to input files, instead of assuming they live in
362 $srcdir/cpu. Plus misc. option processing cleanup.
363 * cgen-doc.scm (doc-arguments): Make options strings not symbols.
364 Add pre-process pass to all options.
365 * cgen-gas.scm (gas-arguments): Ditto.
366 * cgen-sid.scm (sim-arguments): Ditto.
367 * cgen-sim.scm (sim-arguments): Ditto.
368 * cgen-stest.scm (stest-arguments): Ditto.
369 * cgen-opc.scm (opc-arguments): Ditto. New argument -OPC.
370 (-opc-file-path): New global.
371 (opc-file-path): New fn.
372 * opcodes.scm (read-cpu.opc): Replace srcdir,cpu args with opc-file.
374 (gen-extra-cpu.h,gen-extra-cpu.c,gen-extra-opc.h,gen-extra-opc.c,
375 gen-extra-asm.c,gen-extra-dis.c,gen-extra-ibld.h,gen-extra-ibld.c):
376 Replace srcdir arg with opc-file. All callers updated.
377 * read.scm (-opt-spec-update): Delete.
378 (opt-get-first-pass,opt-get-second-pass): New fns.
379 (-cgen): Process application-specific arguments in two passes.
381 2003-08-29 Dave Brolley <brolley@redhat.com>
383 * cpu/frv.cpu: Removed.
384 * cpu/frv.opc: Removed.
386 2003-08-21 Nick Clifton <nickc@redhat.com>
388 * cpu/frv.cpu (mbtoh): Replace input parameter to
389 u-media-dual-expand and u-media-dual-btoh with output parameter.
390 (cmbtoh): Add profiling hack.
392 2003-08-19 Michael Snyder <msnyder@redhat.com>
394 * cpu/frv.cpu: Fix typo, Frintkeven -> FRintkeven
396 2003-08-07 Michael Meissner <gnu@the-meissners.org>
398 * opc-opinst.scm (-gen-operand-instance-table): Initialize all of
399 the elements for the END record of CGEN_OPINST, silencing warnings.
401 2003-07-15 Doug Evans <dje@sebabeach.org>
403 Add guile 1.6.4 support.
404 - empty list must be quoted
405 - string functions have stricter type checking
406 - eval now takes a second argument
407 - symbol-bound? is deprecated
408 * attr.scm (-attr-parse): Use stringsym-append to build errtxt.
409 (bitset-attr->list): Ensure arg to string-cut is a string.
410 (attr-parse): Ensure args to string-ref and string-drop1 are strings.
411 (<enum-attribute>,gen-value-for-defn): Fetch string name of self.
412 * cos.scm (-class-list): Must quote empty list.
413 (-class-parent-classes,-class-compute-class-desc): Ditto.
414 (class-make,make,object-reset!): Ditto.
415 (method-make-make!): Call eval1 instead of eval.
416 (method-make-forward!,method-make-virtual-forward!): Ditto.
417 * decode.scm (subdtable-add): Use stringsym-append instead of
419 (-gen-exprtable-name): Fetch string name of exprtable-entry-insn.
420 (-build-decode-table-entry): Fetch string name of insn.
421 * desc-cpu.scm (-gen-isa-table-defns): Fetch string name of isa.
422 (-gen-mach-table-defns): Ditto for mach.
423 (gen-ifld-defns): Ditto for ifld.
424 (gen-hw-table-defns): Ditto for hw.
425 (gen-operand-table): Ditto for op.
426 (gen-insn-table-entry): Ditto for insn.
427 * desc.scm (gen-attr-table-defn): Ditto for attr.
428 (<keyword>,gen-defn): Don't pass symbols to string-append.
429 * enum.scm (parse-enum-vals): Use symbolstr-append instead of
431 (enum-vals-upcase): Use symbol-upcase to build result.
432 (-enum-parse): Use stringsym-append to build errtxt.
433 * fixup.scm (*guile-major-version*,*guile-minor-version*): New globals.
434 (eval1): New function.
435 (symbol-bound?): Provide own version if >= guile 1.6.
436 * hardware.scm (define-keyword): Use string-append instead of
438 * html.scm (gen-html-header,gen-table-of-contents,gen-arch-intro,
439 cgen.html,cgen-insn.html): Convert current-arch-name to a string
441 (gen-list-entry): Handle either symbol or string `name' arg.
442 (gen-obj-doc-header): Fetch string name of `o' arg.
443 (define-cpu-intro): Ditto for cpu.
444 (gen-mach-intro): Ditto for mach.
445 (gen-model-intro): Ditto for model.
446 (gen-isa-intro): Ditto for isa.
447 (gen-machine-doc-1): Ditto for isa.
448 (gen-reg-doc-1): Convert mach to string first.
449 (gen-insn-doc-1): Ditto. Convert model/unit names to strings first.
450 (gen-insn-doc-list): Fetch string name of mach. Convert insn name
452 (gen-insn-categories): Fetch string name of mach. Convert
453 enum-val-name to string first.
454 (gen-insn-docs): Fetch string name of mach.
455 * ifield.scm (ifld-ilk): Result is a string.
456 * iformat.scm (-ifmt-search-key): Convert attr value to string first.
457 Fetch string name of ifld.
458 (-sfmt-search-key): Similarily for ifld and op.
459 * insn.scm (syntax-make): Fetch string name of syntax element.
460 * mach.scm (-cpu-parse): Use stringsym-append to build errtxt.
461 * minsn.scm (minsn-make-alias): Fetch string name of minsn.
462 * mode.scm (mode:c-type): Result is a string.
463 (mode:enum): Fetch string name of mode.
464 (-mode-parse): Use stringsym-append to build errtxt.
465 * model.scm (model:enum): Fetch string name of model.
466 (-model-parse): Use stringsym-append to build errtxt.
467 (parse-insn-timing): Must quote empty list.
468 * opc-itab.scm (-gen-minsn-table-entry): Fetch string name of minsn.
469 (-gen-minsn-opcode-entry): Ditto.
470 * opcodes.scm (<operand>,gen-function-name): `what' arg is a symbol,
472 (read-cpu.opc): Convert current-arch-name to a string before using.
473 * operand.scm (<operand>,gen-pretty-name): Ensure `name' is a string.
474 (<derived-operand>): Must quote empty list.
475 (op-sort): Simplify, call alpha-sort-obj-list to do sort.
476 * pgmr-tools.scm (pgmr-pretty-print-insn-value): Fetch string name
478 * pmacros.scm (-pmacro-build-lambda): Use eval1 instead of eval.
479 (-pmacro-sym): Must convert symbols to strings before passing to
481 (-pmacro-str): Ditto.
482 (pmacros-init!): Use eval1 instead of eval.
483 * read.scm (keep-mach-atlist?): Simplify, use bitset-attr->list.
484 (keep-isa-atlist?): Ditto.
485 (cmd-if): Use eval1 instead of eval.
486 * rtl-c.scm (<c-expr>,get-name): Fetch string name of self.
487 (-rtl-c-get): Fetch string name of src.
488 (s-unop): Ditto for mode.
489 (s-binop,s-binop-with-bit,s-shop,s-convop,s-cmpop): Ditto.
490 (-gen-par-temp-defns,subword): Ditto.
491 (join): Use stringsym-append instead of string-append.
492 * rtl-traverse.scm (rtx-option?): Convert option to string first.
493 (rtx-traverse-debug): Fetch string name of rtx-obj.
494 * rtl.scm (def-rtx-node): Use eval1 instead of eval.
495 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
496 (rtx-pretty-name): Result is a string.
497 (-rtx-hw-name): Use symbolstr-append instead of symbol-append.
498 * semantics.scm (semantic-compile): Simplify, use alpha-sort-obj-list.
499 * sid-cpu.scm (cgen-write.cxx): Convert current-arch-name to a string
501 (-gen-sfrag-case): Fetch string name of user.
502 * sid-model.scm (unit:enum): Fetch string name of unit.
503 * sid.scm (<hw-memory>,cxmake-get): Fetch string name of mode.
504 (<hw-memory>,gen-set-quiet): Ditto.
505 (gen-mode-defs): Ditto.
506 (sim-finish!): Convert current-arch-name to a string before using.
507 * sim-cpu.scm (-gen-scache-semantic-fn): Fetch string name of insn.
508 (-gen-no-scache-semantic-fn): Ditto.
509 (cgen-defs.h): Fetch string name of isa.
510 (cgen-read.c): Convert current-arch-name to a string before using.
511 (cgen-write.c): Ditto.
512 * sim-model.scm (unit:enum): Fetch string name of unit.
513 (gen-model-fn-decls): Use stringsym-append instead of string-append.
514 (-gen-model-timing-table): Fetch string name of model.
515 (-gen-mach-model-table): Ditto.
516 (-gen-mach-defns): Fetch string name of mach.
517 * sim.scm (gen-reg-access-defn): Fetch string name of hw.
518 (<hw-memory>,cxmake-get): Fetch string name of mode.
519 (<hw-memory>,gen-set-quiet): Ditto.
520 (gen-mode-defs): Ditto.
521 (sim-finish!): Must quote empty list.
522 * utils-cgen.scm (<ident>): Must quote empty list.
523 (obj:str-name): New fn.
524 (parse-comment): Result is a string.
525 (parse-symbol): Result is a symbol.
526 (parse-string): Result is a string.
527 (keyword-list?): Convert arg to string before calling string-ref.
528 (keyword-list->arg-list): Ditto.
529 (gen-attr-name): Convert attr-name to string first.
530 (alpha-sort-obj-list): Use symbol<? instead of string<?.
531 * utils-gen.scm (attr-gen-decl): Fetch string name of attr.
532 (gen-define-ifmt-ifields): Ditto for fld.
533 * utils.scm (gen-c-symbol): Ensure str is a string before calling
535 (gen-file-name): Ditto.
536 (symbol-downcase,symbol-upcase,symbol<?): New fns.
537 (stringsym-append,symbolstr-append,->string,->symbol): New fns.
538 (reduce): Call eval1 instead of eval.
539 * cpu/m32r.cpu (addi): Don't use `#.'.
541 * gen-all-sim: Fix some typos.
543 2003-07-08 Doug Evans <dje@sebabeach.org>
545 * gen-all-doc: Ensure run from cgen src dir.
546 * gen-all-opcodes: Build in ./tmp-opcodes. Don't delete dir when done.
547 * gen-all-sid: Similarily, in ./tmp-sid.
548 * gen-all-sim: Similarily, in ./tmp-sim.
550 2003-06-20 Doug Evans <dje@sebabeach.org>
552 * gen-all-sim: Add fr30,sh64 support. Only generate m32r by default.
554 2003-06-19 Doug Evans <dje@sebabeach.org>
556 * mach.scm (-ifld-already-defined?): New proc.
557 (current-ifld-add!): Use it.
558 (-op-already-defined?): New proc.
559 (current-op-add!): Use it.
560 (-insn-already-defined?): New proc.
561 (current-insn-add!): Use it.
562 (-minsn-already-defined?): New proc.
563 (current-minsn-add!): Use it.
564 (obj-isa-list): New proc.
565 (isa-supports?): Use it.
567 2003-06-10 Doug Evans <dje@sebabeach.org>
569 * insn.scm (insn-builtin!): RELAX renamed to RELAXABLE.
570 * cpu/m32r.cpu (all insns): Ditto.
572 * mach.scm (current-*-add!): Disallow redefinition. Make result
575 * gen-all-doc: Split arm and frv docs up a bit.
577 * cpu/arm.cpu: Add IDOC attribute.
578 * cpu/frv.cpu: Ditto.
579 * cpu/i960.cpu: Ditto.
580 * cpu/openrisc.cpu: Ditto.
581 * cpu/xstormy16.cpu: Ditto.
582 * cpu/m32r.cpu: Ditto.
583 (all insns): Explicitly specify IDOC attribute.
585 * Makefile.am (MACH,ISAS,INSN_FILE_NAME): New vars.
586 (desc,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Use MACH,ISAS.
587 (html): Use MACH,ISAS,INSN_FILE_NAME. Generate insn.html separately.
588 * Makefile.in: Regenerate.
589 * attr.scm (<integer-attribute>:parse-value-def): Implement.
590 (-attr-read): Defer computing default value until we know the type.
591 (attr-has-attr?): Delete, move contents to <attr-list>:has-attr?.
592 (<attr-list>:attr-present?): New method.
593 (atlist-attr-present?,obj-attr-present?): New fns.
594 (obj-has-attr-value?,obj-has-attr-value-no-default?): New fns.
595 (attr-builtin!): New insn attr IDOC.
596 * cgen-doc.scm (doc-arguments): New args -I,-N.
597 * enum.scm (parse-enum-vals): New arg errtxt, all callers updated.
598 Support comment as fourth element of enum value.
599 (enum-val-name,enum-val-value,enum-val-attrs,enum-val-comment): New fns.
600 * html.scm (gen-html-header): New arg kind, all callers updated.
601 (gen-table-of-contents): New arg insn-file, all callers updated.
602 (gen-list-entry,gen-doc-header): New fn.
603 (get-operands): Delete.
604 (gen-iformat-table): Rewrite.
605 (gen-insn-doc-1): Print constant-folded and trimmed semantics.
606 (gen-insn-doc-list): New args name, comment, insns. All callers updated.
607 (get-insn-properties,guess-insn-idoc-attr!): New fn.
608 (insn-sets-pc?,insn-refs-mem?,insn-uses-fpu?): New fns.
609 (get-insns-for-category,gen-categories-insn-lists): New fns.
610 (gen-insn-docs): Simplify each insn's semantics first.
611 Print insn tables sorted by IDOC categories.
612 (*insn-html-file-name*): New global.
613 (cgen-insn.html): New fn.
615 * insn.scm (<insn>): Create a setter for the `tmp' member.
616 * semantics.scm (insn-build-known-values): Renamed from
617 -build-known-values. All callers updated.
619 * rtl.scm: Move traveral/evaluation support to ...
620 * rtl-traverse.scm: New file.
621 * read.scm: Maybe-load rtl-traverse.scm.
623 * rtl.scm (-rtx-valid-types): Add SETRTX.
625 * rtx-funcs.scm (nop,parallel): Fix mode.
627 * utils.scm (eqv-lookup-index): New fn.
628 (assq-lookup-index): Renamed from lookup-index. All callers updated.
630 * dev.scm (load-doc): Set APPLICATION.
632 2003-06-10 Dave Brolley <brolley@redhat.com>
634 * sid-cpu.scm: Generate #include of config.h into @prefix@-sem.cxx.
635 * sid-decode.scm: Generate #include of config.h into
637 * sid-model.scm: Generate #include of config.h into @prefix@-model.cxx.
639 2003-06-07 Doug Evans <dje@sebabeach.org>
641 * gen-all-sid: New file.
642 * gen-all-opcodes: New file.
644 2003-06-05 Nick Clifton <nickc@redhat.com>
646 * cpu/frv.cpu (FRintieven): New operand. An even-numbered only
647 version of the FRinti operand.
648 (FRintjeven): Likewise for FRintj.
649 (FRintkeven): Likewise for FRintk.
650 (mdcutssi, media-dual-word-rotate-r-r, mqsaths,
651 media-quad-arith-sat-semantics, media-quad-arith-sat,
652 conditional-media-quad-arith-sat, mdunpackh,
653 media-quad-multiply-semantics, media-quad-multiply,
654 conditional-media-quad-multiply, media-quad-complex-i,
655 media-quad-multiply-acc-semantics, media-quad-multiply-acc,
656 conditional-media-quad-multiply-acc, munpackh,
657 media-quad-multiply-cross-acc-semantics, mdpackh,
658 media-quad-multiply-cross-acc, mbtoh-semantics,
659 media-quad-cross-multiply-cross-acc-semantics,
660 media-quad-cross-multiply-cross-acc, mbtoh, mhtob-semantics,
661 media-quad-cross-multiply-acc-semantics, cmbtoh,
662 media-quad-cross-multiply-acc, media-quad-complex, mhtob,
663 media-expand-halfword-to-double-semantics, mexpdhd, cmexpdhd,
664 cmhtob): Use new operands.
665 * cpu/frv.opc (CGEN_VERBOSE_ASSEMBLER_ERRORS): Define.
666 (parse_even_register): New function.
668 2003-06-04 Doug Evans <dje@sebabeach.org>
670 Better handling of 64 bit and mixed 32/64 bit architectures.
671 * hardware.scm (hw-update-word-modes!): New fn.
672 * mach.scm (define-cpu)): Call mode-set-word-modes!,
673 hw-update-word-modes!.
674 (state-word-bitsize): Replace FIXME with requested check.
675 (arch-analyze-insns!): Call mode-ensure-word-sizes-defined.
676 * mode.scm (mode-find): Ignore INT,UINT.
677 (-mode-word-sizes-kind): New global.
678 (mode-set-word-modes!,mode-set-identical-word-bitsizes!,
679 mode-set-biggest-word-bitsizes!,mode-ensure-word-sizes-defined): New fns.
680 (mode-init!): Initialize -mode-word-sizes-kind. Move initialization
682 (mode-builtin!): ... here. Initialize WI/UWI/AI/IAI to something
683 unusable, correct values set later.
684 (mode-finish!): Remove cruft.
685 * html.scm (doc-init!): Call mode-set-biggest-word-bitsizes!.
686 * opcodes.scm (opcodes-init!): Ditto.
687 * rtx-funcs.scm (annul): Fix mode of pc.
688 * cpu/ia64.cpu: Remove cruft that sets word modes.
689 * cpu/xstormy16.cpu (define-cpu): Set word-bitsize.
691 2003-06-03 Nick Clifton <nickc@redhat.com>
693 * cpu/frv.cpu (media-dual-word-rotate-r-r): Use a signed 6-bit
694 immediate value not unsigned.
696 2003-05-21 J"orn Rennecke <joern.rennecke@superh.com>
698 * cpu/sh.cpu: Amend comments to refer to SuperH.
699 * cpu/sh64-compact.cpu: Change comment to refer to SuperH.
700 * cpu/sh64-media.cpu: Likewise.
701 (Saturation): Update manual reference.
703 2003-05-15 Doug Evans <dje@sebabeach.org>
705 * Makefile.am (srcroot): New var.
707 * Makefile.in: Regenerate.
708 * cgen-doc.scm: New file.
709 * html.scm: New file.
710 * gen-all-doc: New file.
711 * dev.scm (cload): Handle DOC application.
713 * machs.scm (machs-for-cpu): New fn.
714 * model.scm (models-for-cpu): New fn.
715 * utils.scm (gen-c-copyright): Renamed from gen-copyright.
717 (iota): Rewrite to be identical to pmacro version. All uses updated.
718 * utils-cgen.scm (alpha-sort-obj-list): New fn.
720 * utils-sim.scm (-gen-decoder-switch): Back out patch of 2003-01-09.
721 (-gen-decode-bits): Instead put in better fix here.
723 * cpu/i960.cpu (index): Rename to indx. All uses updated.
725 2003-05-01 DJ Delorie <dj@redhat.com>
727 * cpu/xstormy16.cpu (alignfix-mem): Correct logic for unaligned
729 (set-alignfix-mem): Likewise.
731 2003-04-16 Dave Brolley <brolley@redhat.com>
733 * doc/rtl.texi (Iiming): Correct example to use 'model-name'.
734 * utils.scm (copyright-fsf): Update generate copyright years.
735 (copyright-cygnus): Ditto.
736 * sid.scm (-op-gen-set-trace): Generate code to fill in bitmask of modified
738 (-gen-arch-model-decls): Don't generate unit enum declaration or MAX_UNITS
740 (<operand>'gen-profile-code): New parameter 'when'.
741 (<iunit>'gen-profile-code): Ditto.
742 (<insn>'gen-profile-code): Ditto.
743 (<unit>'gen-profile-code): Ditto. Only generate 'referenced' and
744 'insn_reference' for the 'after' function.
745 * model.scm (unit:enum): Moved to sim-model.scm.
746 * sim-model.scm (unit:enum): Moved from model.scm.
747 * sid-decode.scm (-gen-scache-decls): Generate the 'written' field.
748 * cgen-sid.scm (sim-arguments): Document the generation of model.h.
749 * sid-model.scm (unit:enum): New version for sid.
750 (gen-model-class-name): New function.
751 (gen-model-unit-fn-decl): New function.
752 (gen-model-fn-decls): Call gen-model-unit-fn-decl.
753 (gen-model-unit-fn-name): New parameter 'when'.
754 (-gen-model-insn-fn-name): Ditto.
755 (-gen-model-insn-qualified-fn-name): New function.
756 (-gen-model-insn-fn-decl): New function.
757 (-gen-model-insn-fn-decls): New function.
758 (-gen-model-insn-fn): New parameter 'when'. Call
759 -gen-model-insn-qualified-fn-name.
760 (-gen-model-insn-fns): Generate the constructor for the model. Generate
761 functions for modelling insn before and after execution.
762 (-gen-model-class-decls): New function.
763 (" (gen-model-class-name model) "): New function.
764 (gen-model-classes): New function.
765 (-gen-insn-timing): Generate functions for modelling insn before and after
767 (-gen-insn-unit-timing): Generate class-qualified names.
768 (-gen-model-timing-table): Ditto.
769 (cgen-model.cxx): Generate #include for @cpu@.h. Omit generation of code
770 not needed (yet) by sid.
771 (cgen-model.h): New function.
773 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
775 * cpu/sh.cpu: Replace occurrances of 'Hitachi' with 'Renesas'.
776 * cpu/sh64-compact.cpu: Likewise.
777 * cpu/sh64-media.cpu: Likewise.
779 2003-03-21 DJ Delorie <dj@redhat.com>
781 * cpu/xstormy16.cpu (basic-psw): New argument ws (wordsize),
782 which indicates if the sign flag is set from bit 15 or 7.
784 (set-psw): New argument ws, propogate it.
785 (set-psw-nowrite): Likewise.
786 (set-mem-psw): Likewise.
787 (set-psw-carry): Likewise. Use temporaries to prevent
788 prematurely overwriting needed inputs.
789 (set-psw-rrotate17): Fix logic.
790 (shrgrgr): Preserve carry for zero-bit shifts.
791 (shrgrimm): Likewise.
793 (shlgrimm): Likewise.
795 (asrgrimm): Likewise.
798 2003-03-12 Frank Ch. Eigler <fche@redhat.com>
800 * sid.scm: Set APPLICATION to SID-SIMULATOR.
802 2002-03-05 DJ Delorie <dj@redhat.com>
804 * cpu/xstormy16.cpu (set-psw-add): Use temporaries to prevent
805 prematurely overwriting needed inputs.
806 (set-psw-sub): Likewise.
808 Fri Feb 21 19:48:19 2003 J"orn Rennecke <joern.rennecke@superh.com>
810 * cpu/sh64-media.cpu (make-mextr): Fix setting of count.
812 2003-02-18 DJ Delorie <dj@redhat.com>
814 * xstormy16.cpu (set-mem-alignfix-psw): Remove.
815 (movlmemimm): Just mask the address.
816 (movhmemimm): Likewise.
817 (movlmemgr): Likewise.
818 (movhmemgr): Likewise.
819 (set-psw): Always set the psw last.
820 (set-psw-carry): Likewise.
821 (set-psw-add): Likewise.
822 (set-psw-sub): Likewise.
824 * xstormy16.cpu (set-psw-rrotate17): New. Choose the correct set
825 of 16 patterns from the set-psw-rotate17 function.
826 (movgrigr, movgripostincgr, movgripredecgr, movgriigr,
827 movgriipostincgr, movgriipredecgr): Set psw correctly.
828 (movfgrigr, movfgripostincgr, movfgripredecgr, movfgriigr,
829 movfgriipostincgr, movfgriipredecgr): Fix semantics.
830 (rrcgrgr, rrcgrimm4): Use new set-psw-rrotate17 function.
832 2003-02-11 Dave Brolley <brolley@redhat.com>
834 * desc-cpu.scm (gen-ifld-defns): Add all ifields to the
835 @arch@_cgen-ifld_table.
836 (gen-maybe-multi-ifld): Use the ifield enumerators to index the
837 @arch@_cgen-ifld_table.
839 2003-02-03 Frank Ch. Eigler <fche@redhat.com>
841 * sid-cpu.scm (-gen-sfrag-engine-fn): Generate more hygienic C++.
843 2003-01-09 Graydon Hoare <graydon@redhat.com>
845 * utils-sim.scm (-gen-decoder-switch): Fix edge condition for
848 2003-01-07 Graydon Hoare <graydon@redhat.com>
850 * utils-gen.scm (attr-int-gen-defn): Define.
852 2002-12-21 Doug Evans <dje@sebabeach.org>
854 * ifield.scm (-ifield-parse): Rewrite <bitrange> computation.
855 (-get-ifld-word-offset,-get-ifld-word-length): New fns.
857 * dev.scm (cload): Update location of .cpu files.
859 2002-12-19 Doug Evans <dje@sebabeach.org>
861 * utils-sim.scm (gen-profile-sym): New fn.
862 (<operand>,sbuf-profile-sym): New method.
863 (<operand>,sbuf-profile-elm): Use it.
864 * sim.scm (<operand>,gen-record-profile): Use sbuf-profile-sym instead
865 of hardcoding symbol name.
866 (<operand>,gen-profile-code): Ditto.
867 (<unit>,gen-profile-code): Use gen-profile-sym instead of hardcoding
870 * mode.scm (mode-sem-mode): New fn.
871 * operand.scm (op:new-mode): Update. mode-name.
872 (op-natural-mode?) New fn.
873 * rtl.scm (hw): Set hw-name,mode-name.
875 Back out sim*.scm changes of 2001-04-02 Ben Elliston <bje@redhat.com>
877 * sim-decode.scm (-gen-decode-insn-globals): Use @PREFIX@_INSN__MAX
878 as size of IDESC-TABLE-VAR.
879 (@prefix@_init_idesc_table): Ditto.
880 * sim-model.scm (-gen-mach-defns): Ditto.
881 * sim.scm (gen-cpu-insn-enum-decl): Rename last elm from max to -max.
883 * utils-sim.scm (-gen-decode-insn-entry): Fix some spacing in output.
885 * insn.scm (-parse-insn-format-symbol): Improve error message.
886 (-parse-insn-format): Ditto.
888 * gen-all-sim: New script.
890 2002-12-16 DJ Delorie <dj@delorie.com>
892 * cpu/xstormy16.opc (parse_immediate16): Add prototype.
894 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
896 * cpu/xstormy16.cpu (imm16): Call handler immediate16.
897 * cpu/xstormy16.opc (parse_small_immediate): Return on '@'.
898 (parse_immediate16): Handle immediate16 values, which now include
899 @hi(label) and @lo(label)
901 2002-12-03 Alan Modra <amodra@bigpond.net.au>
903 * desc-cpu.scm (gen-maybe-multi-ifld): Remove superfluous parens.
904 Add braces and cast for union field.
905 (gen-multi-ifield-nodes): Add braces and cast for union field.
906 (cgen_operand_table): Similarly fix sentinel.
907 (cgen_cpu_close): Constify "insns". Formatting.
908 (cgen-desc.c): Include xregex.h.
909 * cpu/ip2k.opc (ip2k_cgen_insn_supported): Move to opc.c section.
911 <opc.c>: Include safe-ctype.h.
912 (ip2k_asm_hash): Use ISSPACE and TOLOWER.
913 (PARSE_FUNC_DECL): Declare. Use to prototype parse_fr, parse_addr16,
914 parse_addr16_p, parse_addr16_cjp, parse_lit8 and parse_bit3.
915 (parse_fr): Constify "old_strp". Correct type of "tempvalue".
916 Don't test it for >= 0. Use ISSPACE rather than isspace. Formatting.
917 (parse_addr16): Correct type of "value". Formatting.
918 (parse_addr16_p): Likewise.
919 (parse_addr16_cjp): Likewise.
920 (parse_lit8): Likewise.
921 (parse_bit3): Formatting.
922 (PRINT_FUNC_DECL): Define. Use to prototype print_fr, print_dollarhex,
923 print_dollarhex8, print_dollarhex16, print_dollarhex_addr16h,
924 print_dollarhex_addr16l, print_dollarhex_p, print_dollarhex_cj and
926 (print_fr): Add ATTRIBUTE_UNUSED on unused args. Formatting.
927 (print_dollarhex): Add ATTRIBUTE_UNUSED on unused args.
928 (print_dollarhex8): Likewise.
929 (print_dollarhex16): Likewise.
930 (print_dollarhex_addr16h): Likewise.
931 (print_dollarhex_addr16l): Likewise.
932 (print_dollarhex_p): Likewise.
933 (print_dollarhex_cj): Likewise.
934 (print_decimal): Likewise.
935 * cpu/xstormy16.opc (parse_mem8): Use ISALNUM rather than isalnum.
937 2002-11-30 Hans-Peter Nilsson <hp@axis.com>
939 * doc/rtl.texi (Model variants): Mention current limitations for
940 unit inputs and outputs.
941 (Hardware elements) <attribute PROFILE>: Be slightly more
943 (Instructions) <timing>: input/output overrides have a direction
946 2002-11-25 DJ Delorie <dj@redhat.com>
948 * xstormy16.cpu (sdiv, divlh, sdivlh): Fix sdivlh/divlh encodings.
950 2002-11-21 Jeff Johnston <jjohnstn@redhat.com>
952 * cpu/iq10.cpu: New file.
953 * cpu/iq2000.cpu: Likewise.
954 * cpu/iq2000.opc: Likewise.
955 * cpu/iq2000m.cpu: Likewise.
957 2002-11-19 DJ Delorie <dj@redhat.com>
959 * cpu/xstormy16.cpu (sdiv, divlh, sdivlh): New.
961 2002-11-05 Frank Ch. Eigler <fche@redhat.com>
963 * dev.scm: Call getenv with a string, not a symbol.
965 2002-10-08 Doug Evans <dje@transmeta.com>
966 Hans-Peter Nilsson <hp@axis.com>
968 * types.scm (bitrange-overlap?): Handle lsb0?.
970 2002-09-07 Frank Ch. Eigler <fche@redhat.com>
972 From Robert Cragie <rcc@jennic.com>:
973 * cpu/arm7.cpu (ldm*-sw*, stm*-sw*): New instructions.
975 2002-07-17 Frank Ch. Eigler <fche@redhat.com>
976 Ben Elliston <bje@redhat.com>
977 John Healy <jhealy@redhat.com>
978 Jeff Johnston <jjohnstn@redhat.com>
979 Alan Lehotsky <alehotsky@redhat.com>
980 Ubicom Inc. <SupportDesk@ubicom.com>
982 * cpu/ip2k.cpu: New file.
983 * cpu/ip2k.opc: Likewise.
985 2002-07-01 Hans-Peter Nilsson <hp@axis.com>
987 * utils-gen.scm (-gen-extract-word): Handle lsb0?.
989 2002-06-25 J"orn Rennecke <joern.rennecke@superh.com>
991 * cpu/sh64-compact.cpu (movw5): Use Correct operand field for reg.
992 * cpu/sh64-media.cpu (-ldhi-byte, -ldhi-word, -ldhi-long): New macros.
993 (-ldlo-byte, -ldlo-word, -ldlo-long): Likewise.
994 (-sthi-word, -sthi-long -stlo-byte, -stlo-word, -stlo-long): Likewise.
995 (ldhil, ldhiq, ldlol, ldloq, stlol, stloq): Implement.
996 (mshfhib, mshfhil, mshfhiw, mshflob, mshflol, mshflow): Fix indices.
997 (-sthi-byte): If there is a single byte to store, store it at
999 (sthil, sthiq): Fix big-endian behaviour.
1000 (mcnvslw, mcnvswb, mcnvswub, mmacfxwl, mmacnfx.wl): Fix indices.
1001 (mmulfxl, mmulfxw, mmulfxrpw, mmulhiwl, mmullowl): Likewise.
1002 (saturate): Use Dimode to check if saturation operation is required.
1003 (usaturate): Likewise.
1005 (-maddsl, -maddsub): Compute to-be-saturated value in wider mode.
1006 (-maddsw, mmacfxwl, mmacnfx.wl, -mshaldsl, -mshaldsw): Likewise.
1007 (-mshardl, -mshardw, -msubsl, -msubsub, -msubsw): Likewise.
1008 (msadubq): Fix subword index in second operand of first subtraction.
1010 2002-06-20 Hans-Peter Nilsson <hp@axis.com>
1012 * sim-cpu.scm (gen-semantic-code): Prepend with setup-semantics
1015 2002-06-18 Dave Brolley <brolley@redhat.com>
1017 * cpu/frv.cpu: New cpu description.
1018 * cpu/frv.opc: New cpu support code.
1020 2002-05-21 Dave Brolley <brolley@redhat.com>
1022 * decode.scm (-opcode-slots): Don't consider bits beyond the
1025 2002-05-17 Johan Rydberg <jrydberg@rtmk.org>
1027 * cpu/powerpc.cpu: New file.
1029 2002-05-01 Graydon Hoare <graydon@redhat.com>
1031 * desc-cpu.scm (@arch@_cgen_cpu_close): Fix memory leaks.
1033 2002-03-20 Hans-Peter Nilsson <hp@axis.com>
1035 * doc/pmacros.texi (Symbol concatenation): Mention that .sym
1036 results are expanded recursively.
1038 2002-03-19 Hans-Peter Nilsson <hp@axis.com>
1040 * pmacros.scm (-pmacro-expand,scan): If result is a symbol,
1041 call scan-symbol on it, to enable recursive macro-expansion.
1043 2002-01-25 Frank Ch. Eigler <fche@redhat.com>
1045 * sid-cpu.scm (-gen-hardware-types): Generate single hardware union
1046 for multiple-isa configurations.
1047 * sid-decode.scm (-gen-decode-fn): Tolerate empty insn list.
1049 2002-02-04 Ben Elliston <bje@redhat.com>
1051 * cpu/sh.cpu, cpu/sh.opc: New files.
1052 * cpu/sh64-comact.cpu, cpu/sh64-media.cpu: Likewise.
1054 2002-01-29 Hans-Peter Nilsson <hp@axis.com>
1056 * doc/rtl.texi: Fix typo: define-attr, not define-attribute.
1057 (Enumerated constants): Mention that an ifield must not specify a
1059 (Instruction operands): Ditto for index.
1060 (Expressions) <parallel>: Remove misplaced mention of local
1062 <if>: Mention that mode must be specified and non-VOID when the
1065 2002-01-28 Hans-Peter Nilsson <hp@axis.com>
1067 * doc/porting.texi: When referring to *.opc, mention they are in
1068 the cpu subdir. Call top-level directory toplevel, not devo.
1069 Close string in define-normal-insn example.
1071 * doc/pmacros.texi: Fix .substr typo to .substring.
1072 Mention that .sym expansions are not further expanded.
1074 2002-01-22 Graydon Hoare <graydon@redhat.com>
1076 * desc-cpu.scm (ifld-number-cache): Add.
1078 (gen-maybe-multi-ifld-of-op): Add.
1079 (gen-maybe-multi-ifld): Add.
1080 (gen-multi-ifield-nodes): Add.
1081 (cgen-desc.c): Add call to gen-multi-ifield-nodes.
1083 2002-01-10 matthew green <mrg@redhat.com>
1085 * cpu/xstormy16.cpu (gr-Rbj-names): Rename this ...
1086 (gr-Rb-names): ... to this.
1087 (h-Rb): New hardware piece.
1088 (h-Rbj): Use gr-Rb-names.
1090 (holdx): New instruction.
1092 2002-01-07 Ben Elliston <bje@redhat.com>
1094 * utils.scm (package-cygnus-simulators): Rename from this ..
1095 (package-red-hat-simulators): .. to this.
1096 * opcodes.scm (option-set!): Use package-red-hat-simulators.
1097 * sid-cpu.scm (cgen-desc.h): Likewise.
1098 (cgen-cpu.h): Likewise.
1099 (cgen-defs.h): Likewise.
1100 (cgen-write.cxx): Likewise.
1101 (cgen-semantics.cxx): Likewise.
1102 (cgen-sem-switch.cxx): Likewise.
1103 * sid-decode.scm (cgen-decode.h): Likewise.
1104 (cgen-decode.cxx): Likewise.
1105 * sid-model.scm (cgen-model.cxx): Likewise.
1106 * sid.scm (option-set!): Likewise.
1107 * sim.scm (option-set!): Likewise.
1109 2002-01-07 Ben Elliston <bje@redhat.com>
1111 * utils.scm (copyright-fsf): Add 2002.
1112 (copyright-cygnus): Rename to copyright-red-hat.
1113 (copyright-red-hat): Add 2002.
1114 (CURRENT-COPYRIGHT): Update comment.
1115 * opcodes.scm (option-set!): Update callers.
1116 * sid-model.scm (cgen-model.cxx): Likewise.
1117 * sid-cpu.scm: Likewise.
1118 * sid-decode.scm: Likewise.
1119 * sid.scm (option-set!): Handle "redhat" as an option for
1120 "copyright"; use copyright-red-hat.
1121 * sim.scm (option-set!): Likewise.
1123 2002-01-03 Dave Brolley <brolley@redhat.com>
1125 * decode.scm (-distinguishing-bit-population): Compute num-insns, the
1126 number of insns in the list. Update the population count function to
1127 identify and prioritize 3 catgories of useful bits.
1128 (-population-top-few): Don't consider bits with a population count of
1130 (-build-decode-table-entry): Don't call
1131 filter-harmlessly-ambiguous-insns. Filter out non-specialized and
1132 identical insns at the next tree level.
1133 * insn.scm (filter-harmlessly-ambiguous-insns): Note in a comment that
1134 this function is no longer used.
1135 (filter-non-specialized-ambiguous-insns): New function.
1136 (filter-identical-ambiguous-insns): New function.
1137 (find-identical-insn): New function.
1138 (filter-harmlessly-ambiguous-insns): Removed.
1140 2001-11-26 Geoffrey Keating <geoffk@redhat.com>
1141 matthew green <mrg@redhat.com>
1142 Frank Ch. Eigler <fche@redhat.com>
1143 Nick Clifton <nickc@cambridge.redhat.com>
1145 * cpu/xstormy16.cpu: New file.
1146 * cpu/xstormy16.opc: New file.
1148 2001-11-26 Frank Ch. Eigler <fche@redhat.com>
1150 * doc/sim.texi, rtl.texi, porting.texi: Correct texinfo markup typos.
1152 2001-11-14 Dave Brolley <brolley@redhat.com>
1154 * utils-gen.scm (-gen-extract-word): Correct computation of the length
1155 of the field being extracted.
1157 2001-10-29 Johan Rydberg <johan@rydberg.com>
1159 * doc/rtl.texi (Expressions): Document the (error ..), (sqrt ..),
1160 (cos ...) and (sin ..) rtx.
1162 2001-10-13 Nick Clifton <nickc@cambridge.redhat.com>
1164 * desc-cpu.scm: Do not include ctype.h in generated desc
1165 files. They will inherit safe-ctype.h instead.
1167 2001-10-08 Nick Clifton <nickc@cambridge.redhat.com>
1169 * desc-cpu.scm: Add missing function prototypes (for generated
1170 C files). Fix compile time warning messages about unused
1171 parameters (for generated C files).
1172 * opc-asmdis.scm: The same.
1173 * opc-ibld.c: The same.
1174 * opc-itab.scm: The same.
1175 * cpu/fr30.opc: The same.
1176 * cpu/m32r.opc: The same.
1177 * cpu/openrisc.opc: The same.
1179 2001-09-17 graydon hoare <graydon@redhat.com>
1181 * insn.scm (syntax-break-out): Correct logic in handling escaped
1184 2001-07-12 Jeff Johnston <jjohnstn@redhat.com>
1186 * opc-itab.scm (@arch@_cgen_init_opcode_table): Unconditionally
1187 call @arch@_cgen_build_insn_regex now that regex support is in
1190 2001-07-12 Frank Ch. Eigler <fche@redhat.com>
1192 * insn.scm (filter-harmlessly-ambiguous-insns): Fix msg typo.
1193 (mask-superset?): Look for strict supersets to allow rejection of
1196 2001-07-11 Frank Ch. Eigler <fche@redhat.com>
1198 * sid-cpu.scm (-gen-mach-params): New proc to emit ...CHUNK_BITSIZE...
1199 (cgen-desc.h): Call it.
1200 * sid-decode.scm (-gen-decode-fn): Use base-insn-bitsize as
1202 * utils-sim.scm (-gen-decode-insn-entry): For SID only, prepare
1203 entire_insn for extraction, if it's shorter than base-insn-bitsize.
1205 2001-07-11 Frank Ch. Eigler <fche@redhat.com>
1207 * desc-cpu.scm (-gen-mach-table-defns): Emit fourth field: the
1208 mach->cpu insn-chunk-bitsize.
1209 (-gen-cpu-open): In @arch@_cgen_rebuild_tables, process above new
1210 field toward CGEN_CPU_TABLE->insn_chunk_bitsize.
1211 * mach.scm (<cpu>): New field insn-chunk-bitsize.
1212 (-cpu-parse, -cpu-read): Parse/initialize it.
1213 * doc/rtl.texi (define-cpu): Document it.
1215 2001-07-09 Geoffrey Keating <geoffk@redhat.com>
1217 * ifield.scm (<ifield> 'field-start): Don't look at word-len.
1219 2001-07-06 Ben Elliston <bje@redhat.com>
1221 * opcodes.scm (read-cpu.opc): Read .opc files from subdir/cpu.
1223 2001-07-05 Ben Elliston <bje@redhat.com>
1227 * read.scm (include): Include files from srcdir/cpu.
1228 (-cgen): Likewise for loading .cpu files.
1229 * sid.scm (sim-finish!): Read .sim files from srcdir/cpu.
1230 * *.cpu: Move all cpu descriptions into cpu subdirectory.
1232 * simplify.inc: Likewise.
1234 2001-07-04 Ben Elliston <bje@redhat.com>
1236 * read.scm (include): Log "Including file" message at level 1,
1237 rather than outputting it with (display).
1238 (cpu-load): Log "Loading cpu description" and "Processing cpu
1239 description" messages at levels 1 and 2, respectively, rather than
1242 2001-06-14 Geoffrey Keating <geoffk@redhat.com>
1244 * desc.scm (<keyword> 'gen-defn): Add extra zero into
1245 CGEN_KEYWORD_ENTRY initializers.
1247 * gas-test.scm (gen-gas-test): Create 8 testcases, not just 5.
1248 (<operand> 'test-data): Involve both the index and the hardware
1249 in testcase generation.
1250 (<hw-indx> 'test-data): Generate test data from the underlying
1252 (<ifield> 'test-data): Generate test data by computing bit
1253 patterns for the field, then decoding them.
1254 (<hw-address> 'test-data): Allow for new calling convention.
1255 (<hw-iaddress> 'test-data): Likewise.
1256 (<keyword> 'test-data): Convert index values into keywords.
1257 (<hw-asm> 'test-data): Convert index values into integer strings.
1259 * gas-test.scm (cgen-build.sh): Escape '.' as well.
1261 2001-06-01 Frank Ch. Eigler <fche@redhat.com>
1263 * rtl.scm (hw): Encode hw access mode into <operand> name, since this
1264 is required for multi-mode hw types (memory).
1266 2001-05-11 Ben Elliston <bje@redhat.com>
1268 * gas-test.scm (cgen-build.sh, gentest): Escape $ with a backslash
1269 when generating allinsn.d from objdump output. Without it, the
1270 testsuite will treat $ as the regular expression for end of line.
1272 2001-05-09 Ben Elliston <bje@redhat.com>
1274 * doc/porting.texi (Doing a GAS port): Replace `cgen_opcode_open'
1275 with `cgen_cpu_open'; documentation had become out of date.
1276 * doc/rtl.texi (Instruction operands): Likewise.
1278 2001-05-07 Frank Ch. Eigler <fche@redhat.com>
1280 * iformat.scm (compute-insn-base-mask-length): Rewrite to tolerate
1281 various-base-length instruction sets.
1283 2001-04-02 Ben Elliston <bje@redhat.com>
1285 * sid-cpu.scm (-last-insn): New function.
1286 (-gen-sem-switch-engine): Loop through idesc while less than or
1287 equal to the last instruction enum, not less than the MAX enum.
1288 (-gen-sfrag-engine-fn): Clean up frag_label_table initialisation.
1289 * sid-decode.scm (-gen-decode-insn-globals): Define the idesc
1290 table's size to be the last instruction enum plus one, not
1292 * sid.scm (gen-cpu-insn-enum-decl): Do not append a dummy `max'
1293 instruction onto the instruction list.
1295 * sim-decode.scm (@prefix@_init_idesc_table): Compute tabsize
1296 using the size of the table and its elements.
1297 (-gen-decode-insn-globals): Define the idesc table's size to be
1298 the last instruction enum plus one, not @PREFIX@_INSN_MAX.
1299 * sim-model.scm (-gen-mach-defns): Define CPU_MAX_INSNS as the
1300 last instruction enum plus one, not @CPU@_INSN_MAX.
1302 2001-03-28 Ben Elliston <bje@redhat.com>
1304 * doc/version.texi (UPDATED, EDITION): Update.
1305 * doc/stamp-vti: Likewise.
1307 2001-03-26 Ben Elliston <bje@redhat.com>
1309 * doc/credits.texi (Credits): Update.
1311 * gas-test.scm (<keyword>,test-data): Prefix keywords by their
1312 specified prefix and, if necessary, escape `$' in gas-build.sh to
1313 prevent unwanted shell variable expansion.
1315 2001-03-24 Ben Elliston <bje@redhat.com>
1317 * gas-test.scm (<hw-asm>,test-data): Choose pseudo-random data.
1318 (<keyword>,test-data): Likewise.
1319 (<hw-address>,test-data): Likewise.
1320 (<hw-iaddress>,test-data): Likewise.
1321 (-collate-test-set): New function.
1322 (build-test-set): Use it.
1323 (gen-gas-test): Generate five test cases per instruction.
1324 (cgen-allinsn.exp): Include "-*- Tcl -*-" in DejaGNU test file.
1326 * read.scm: Load "slib/random" if random is not defined.
1327 * slib/random.scm: New file.
1329 * utils.scm: Remove comments about the Hobbit compiler.
1330 (copyright-cygnus): Add 2001.
1331 (package-cygnus-simulators): Replace "Cygnus" with "Red Hat".
1332 (package-gnu-simulators): Tidy.
1334 2001-03-23 Ben Elliston <bje@redhat.com>
1336 * cgen-gas.scm: Inline documentation improvements.
1338 2001-03-21 Ben Elliston <bje@redhat.com>
1340 * opc-itab.scm (compute-syntax): Emit a parse error if an operand
1341 given in a syntax string is undefined.
1343 * opc-itab.scm (compute-syntax): Emit a parse error if an operand
1344 name is empty or invalid -- eg. "$(rs)" instead of "($rs)".
1346 2001-03-20 Patrick Macdonald <patrickm@redhat.com>
1348 * desc-cpu.scm (@arch@_cgen_cpu_open): Correct machine calculation
1349 for arg_type CGEN_CPU_OPEN_BFDMACH.
1351 2001-03-20 Ben Elliston <bje@redhat.com>
1353 * opc-itab.scm (-gen-insn-enum): Do not append a dummy `max'
1354 instruction onto the instruction list. Define MAX_INSNS to be the
1355 value of the last instruction enum plus one.
1357 2001-03-14 Nick Clifton <nickc@redhat.com>
1359 * utils.scm (copyright-fsf): Add 2001. Remove (C).
1361 2001-03-05 Dave Brolley <brolley@redhat.com>
1363 * sim-decode.scm (-gen-extract-case): Generate declaration of "insn"
1364 if the number of ifields is greater than zero.
1366 2001-03-01 Frank Ch. Eigler <fche@redhat.com>
1368 * sid.cpu (-op-gen-set-trace[-parallel], -create-virtual-insns!):
1369 Emit LIKELY/UNLIKELY branch probability hints.
1370 * sid-decode.cpu (-gen-record-args): Ditto.
1372 2001-02-02 Patrick Macdonald <patrickm@redhat.com>
1374 * desc-cpu.scm (-gen-hash-defines): Rename
1375 CGEN_ACTUAL_MAX_SYNTAX_BYTES to CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS.
1377 2001-01-26 Frank Ch. Eigler <fche@redhat.com>
1379 * sid-cpu.scm (gen-parallel-exec-type): Use unsigned long long for
1381 (-gen-write-fn, -gen-sem-case, -gen-sfrag-case): Ditto.
1382 * sid-decode.scm (-gen-scache-decls): Exclude writeback tracking field
1384 * sid.scm (<operand> gen-write): Use unsigned long long expression
1386 (-op-gen-set-trace, -op-gen-set-trace-parallel): Ditto.
1387 (<unit> gen-profile-code): Ditto.
1389 2001-01-23 Johan Rydberg <jrydberg@opencores.org>
1391 * doc/rtl.texi (Expressions): Document the (index-of ...) and
1394 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
1396 * operand.scm (<operand> pretty-sem-name): New field.
1397 (<operand> make): Initialize it from hw-name.
1398 (op:set-pretty-sem-name!): New function.
1399 (<operand> gen-pretty-name): Default to fetching new field.
1400 * rtl.scm (hw): Copy hw-name to pretty-sem-name instead. Restore
1401 sem-name setting from -rtx-hw-name.
1403 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
1405 * rtl.scm (hw): Copy hw-name to new operand's sem-name, to simplify
1406 its subsequent gen-pretty-name.
1408 * read.scm: Increase thread working stack limit and backtrace
1411 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
1413 * doc/rtl.texi: Deprecate and depreciate the decode-assist construct.
1415 2001-01-06 Johan Rydberg <jrydberg@opencores.org>
1417 * openrisc.cpu (or32): Setup semantics for h-delay-insn to
1418 current insn plus 4.
1419 (h-delay-insn): New hardware register.
1420 (l-jal): Uses h-delay-insn instead of pc when setting link register.
1424 * openrisc.opc (parse_hi16): Sign extend value.
1425 (parse_lo16): Likewise.
1427 2001-01-06 Ben Elliston <bje@redhat.com>
1429 * utils-gen.scm (gen-sfmt-enum-decl): Use @prefix@ and @PREFIX@
1430 instead of @cpu@ and @CPU@ to generically prefix symbol names.
1431 * sim-cpu.scm (-gen-sem-fn-table-entry): Likewise.
1432 (-gen-semantic-fn-table): Likewise.
1433 (-gen-scache-semantic-fn): Likewise.
1434 (-gen-no-scache-semantic-fn): Likewise.
1435 (cgen-read.c): Likewise.
1436 (cgen-sem-switch.c): Likewise.
1437 * desc-cpu.scm (cgen-desc.c): Use @arch@, not @prefix@, since this
1438 is a filename prefix.
1439 * sim-decode.scm (IDESC-TABLE-VAR): Use @prefix@, et al.
1440 (-gen-decode-insn-globals): Likewise.
1441 (-gen-idesc-decls): Likewise.
1442 (cgen-decode.h): Likewise.
1443 (cgen-decode.c): Likewise.
1444 * sim.scm (gen-cpu-insn-enum-decl): Likewise.
1445 (gen-cpu-insn-enum): Likewise.
1446 (sim-finish!): Likewise.
1448 2001-01-05 Johan Rydberg <jrydberg@opencores.org>
1450 * openrisc.cpu: New file.
1451 * openrisc.opc: Likewise.
1453 2000-12-12 Ben Elliston <bje@redhat.com>
1455 * doc/rtl.texi (Expressions): Document the (delay ..) rtx.
1457 2000-12-07 Ben Elliston <bje@redhat.com>
1459 * sim-decode.scm (-gen-extract-case): Do not emit a definition for
1460 "insn" when there are zero ifields to extract.
1462 2000-12-04 Frank Ch. Eigler <fche@redhat.com>
1464 * utils-sim.scm (gen-define-argbuf-macro): Handle sfmt=#f case, to be
1465 used by simple/non-scache simulators.
1466 * sim-cpu.scm (-gen-read-case): Call gen-define/undef-field-macro
1467 regardless of with-scache?.
1468 (-gen-write-case, -gen-no-scache-semantic-fn, -gen-sem-case): Ditto.
1470 2000-12-03 Ben Elliston <bje@redhat.com>
1472 * desc-cpu.scm (cgen-desc.h): Clarify generated filenames.
1473 (cgen-desc.c): Likewise.
1475 2000-12-01 Greg McGary <greg@mcgary.org>
1477 * desc.scm (<keyword>,gen-defn): Prepend prefix to keyword names.
1479 2000-12-01 Ben Elliston <bje@redhat.com>
1481 * sim-cpu.scm (cgen-cpu.h): Only emit argbuf, scache and extract
1482 definitions if run without with-multipla-isa?.
1483 (cgen-defs.h): New function. Emit an ISA-specific defs file.
1484 * cgen-sim.scm (sim-arguments): Accept -G option to generate defs.
1486 2000-11-24 Ben Elliston <bje@redhat.com>
1488 * sim-cpu.scm (-gen-hardware-struct): New function.
1489 (-gen-hardware-types): If with-multiple-isa is specified, emit all
1490 hardware elements wich have share one or more ISAs with the ISAs
1493 * sim.scm (-with-multiple-isa?): New symbol.
1494 (with-multiple-isa?): New function.
1495 (option-init!): Initialise -with-multiple-isa?.
1496 (option-set!): Handle with-multiple-isa option.
1498 2000-11-21 Ben Elliston <bje@redhat.com>
1500 * utils.scm (copyright-fsf): Add the year 2000.
1502 2000-11-20 Frank Ch. Eigler <fche@redhat.com>
1504 * opc-itab.scm (-gen-ifmt-table, -gen-macro-insn-table: Remove
1505 unneeded "\n\n" from F() macro definition.
1507 2000-11-15 Greg McGary <greg@mcgary.org>
1509 * utils-cgen.scm (gen-define-with-symcat): New function.
1510 * desc-cpu.scm (gen-ifld-defns): Use it.
1511 (gen-hw-table-defns): Use it.
1512 (-gen-hash-defines): Use it.
1513 (gen-operand-table): Use it.
1514 (gen-insn-table): Use it. Remove spurious `#undef MNEM'.
1515 * opc-itab.scm (-gen-ifmt-table): Use it.
1516 (-gen-insn-opcode-table): Use it.
1517 (-gen-macro-insn-table): Use it.
1518 * opc-opinst.scm (-gen-operand-instance-tables): Use it.
1519 * sim-cpu.scm (cgen-semantics.c): Use it.
1520 (cgen-sem-switch.c): Use it.
1522 2000-11-10 Frank Ch. Eigler <fche@redhat.com>
1524 * utils-sim.scm (-gen-decode-insn-entry): Add fn? parameter to signal
1525 request to emit calls to insn extractors as functions rather than
1526 branches to inline blocks.
1527 (-gen-decode-expr-set-itype, -gen-decode-expr-entry): Ditto.
1528 (-gen-decode-table-entry, -gen-decoder-switch, gen-decoder): Ditto.
1530 * sim-decode.c (-gen-decode-fn): Tell (gen-decode) to emit branches
1531 to extractor clauses.
1533 2000-11-10 Frank Ch. Eigler <fche@redhat.com>
1535 * decode.scm (-distinguishing-bit-population): Significantly
1536 improve popularity heuristic. Renamed from
1537 (-mask-bit-population): Gone.
1538 (-population-above-threshold): Sort new bit numbers in order of
1540 (-population-top-few): Allow up to three more bits to be selected
1541 than requested. Correct selection order to prefer better bits.
1542 Correct bug in fewer-than-requested case. Keep threshold as
1544 (decode-best-get-bits): Pass also the insn-values.
1546 * utils-sim.scm (-gen-decoder-switch): Add comment suggesting a
1547 future optimization.
1549 * utils.scm (message): Format nested lists better.
1551 2000-11-09 Doug Evans <dje@casey.transmeta.com>
1553 * dev.scm: Add srcdir to %load-path.
1555 * rtx-funcs.scm (subword): Mode of argument can be different
1556 than mode of result, so don't use OP0 to specify argument's mode.
1558 2000-11-02 Ben Elliston <bje@redhat.com>
1560 * doc/porting.texi (Building a GAS test suite): Document my change
1563 2000-11-01 Ben Elliston <bje@redhat.com>
1565 * sim-test.scm (cgen-build.sh): Include "-*- Asm -*-" in test cases.
1567 2000-10-31 Ben Elliston <bje@redhat.com>
1569 * gas-test.scm (cgen-build.sh): Allow the generated script to run
1570 with no command line arguments if the gas build directory can be
1573 2000-10-26 Doug Evans <dje@casey.transmeta.com>
1575 * insn.scm (-parse-insn-format-symbol): Fix spelling error,
1576 op-ifld -> op-ifield.
1578 2000-10-23 Frank Ch. Eigler <fche@redhat.com>
1580 * thumb.scm (cc-tests): Add (ISA thumb) attribute.
1582 2000-10-13 matthew green <mrg@cygnus.com>
1584 * utils-cgen.scm (get-ifetch): Move from here ...
1585 * sim.scm (get-ifetch): ... to here.
1586 * sid.scm (get-ifetch): Copy and port to c++.
1588 2000-10-06 Dave Brolley <brolley@redhat.com>
1590 * utils-gen.scm (-gen-ifld-extract-base): Compute start position as
1591 ifld-start + ifld-word-offset.
1592 (gen-ifld-extract): Check adata-integral-insn? before checking whether
1593 the field is beyond the base number of bits.
1594 (gen-define-ifields): Use a base-length of 32 if adata-integral-insn?.
1595 (gen-extract-ifields): Ditto.
1596 * gas-test.scm (gentest): Generate backslashes before '[' and ']'
1597 characters in the regular expression.
1599 2000-10-02 Frank Ch. Eigler <fche@redhat.com>
1601 * desc-cpu.scm: (gen-operand-decls): Emit MAX_OPERANDS as a
1602 preprocessor constant.
1604 2000-09-21 Frank Ch. Eigler <fche@redhat.com>
1606 * slib/logical.scm: New file from slib. Provides robust bitwise
1607 logical operations for large integers.
1608 * read.scm: maybe-load it.
1610 2000-09-15 Frank Ch. Eigler <fche@redhat.com>
1612 * enum.scm (define-full-insn-enum): Filter with keep-isa predicate.
1613 * ifield.scm (-ifield-parse, -multi-ifield-parse): No longer assert
1614 single-isa predicate, but support keep-isa filtering.
1616 2000-09-08 Frank Ch. Eigler <fche@redhat.com>
1618 * rtl-c.scm (s-sequence): Handle nested c-calls in both
1619 statement-expression and comma-expression contexts.
1620 (s-c-call, s-c-raw-call): Add warning comment about bad assumption.
1622 2000-09-08 Frank Ch. Eigler <fche@redhat.com>
1624 * decode.scm (-population-top-few): Signal error gracefully if
1625 decoding is about to become ambiguous.
1627 2000-09-06 Frank Ch. Eigler <fche@redhat.com>
1629 * doc/rtl.texi (decode-assist): Describe this field as optional.
1631 2000-09-06 Frank Ch. Eigler <fche@redhat.com>
1633 * utils-gen.scm (gen-multi-ifld-extract): Handle case of multi-ifield
1636 2000-09-05 Dave Brolley <brolley@redhat.com>
1638 * sim.scm (sim-finish!): Honour the definition of FAST_P when calling
1639 @cpu@_pbb_begin. Use 0 if FAST_P is not defined.
1641 2000-08-29 Dave Brolley <brolley@redhat.com>
1643 * utils-gen.scm (gen-ifld-extract): Pass total-len if
1644 adata-integral-insn is true for this architecture.
1646 2000-08-24 Frank Ch. Eigler <fche@redhat.com>
1648 * hardware.scm (<hw-immediate> get-index-mode): Define method.
1649 * operand.scm (<operand> gen-pretty-name): Tolerate no op:sem-name.
1650 * rtl-c.scm (-c-rtl-get): Improve an error message.
1651 * sim.scm (-op-gen-set-trace): Support <derived-operand> lvalues.
1653 2000-08-22 Frank Ch. Eigler <fche@redhat.com>
1655 * Makefile.in (DIST_COMMON): Regenerated.
1656 * ifield.scm (<derived-ifield> needed-iflds): New method.
1657 * iformat.scm (-ifmt-lookup-sfmt!): Use base ifields for
1658 sfmts built from <derived-ifield>s.
1659 * operand.scm (-derived-parse-encoding): Give <derived-ifield> a fixed
1660 type symbol 'derived-ifield, not an unparseable string.
1661 * utils-sim.scm (op-needed-iflds) Handler 'derived-ifield case.
1662 (-sfmt-contents): Add tracing.
1664 From Doug Evans <dje@transmeta.com>:
1665 * sim.scm (<operand> cxmake-get): Result is a <c-expr>, not a string of
1668 2000-08-20 Doug Evans <dje@casey.transmeta.com>
1670 * rtl-c.scm (rtl-c-expr-with-estate): New fn.
1671 (rtl-c-expr-parsed,rtl-c-expr): New fns.
1672 (-rtl-c-get): Rename from rtl-c-get.
1673 (rtl-c-get): New fn for getter logging.
1675 2000-07-28 Ben Elliston <bje@redhat.com>
1679 2000-07-25 Ben Elliston <bje@redhat.com>
1681 * doc/credits.texi (Credits): Add Frank Eigler.
1683 2000-07-24 Dave Brolley <brolley@redhat.com>
1685 * opc-itab.scm (gen-insn-opcode-table): Initialize the first element
1687 * desc.scm (gen-attr-table-defn): Initialize all elements fully.
1688 (<keyword>): Initialize all elements fully.
1689 * desc-cpu.scm (-gen-isa-table-defns): Initialize the last element
1691 (-gen-mach-table-defns): Ditto.
1692 (-gen-ifld-defns): Ditto.
1693 (-gen-operand-table): Ditto.
1694 (-gen-insn-table): Ditto.
1695 (-gen-cpu-open): Nothing to do for the mach table.
1697 2000-07-13 Ben Elliston <bje@redhat.com>
1699 * doc/version.texi (UPDATED): Update.
1701 2000-07-05 Ben Elliston <bje@redhat.com>
1703 * configure.in (AC_PATH_PROG): Remove.
1704 * configure: Regenerate.
1705 * Makefile.am (GUILE): Locate guile dynamically.
1706 * Makefile.in: Regenerate.
1707 * doc/Makefile.in: Likewise.
1709 2000-07-03 Ben Elliston <bje@redhat.com>
1711 * desc-cpu.scm (cgen-desc.c): Include "libiberty.h".
1712 * opc-itab.scm (cgen-opc.c): Likewise.
1714 2000-06-28 Frank Ch. Eigler <fche@redhat.com>
1716 * rtl.scm (-rtx-traverse-locals): Correct call to `symbol?' for
1717 guile 1.4 compatibility.
1718 (rtx-env-dump): Comment out buggy display calls.
1720 2000-06-15 matthew green <mrg@redhat.com>
1722 * opc-itab.scm (-gen-ifmt-table-1): Add extra braces to pacify GCC.
1724 2000-06-14 Frank Ch. Eigler <fche@redhat.com>
1726 * Makefile.in: Regenerated.
1728 * desc-cpu.scm (gen-ifld-decls): Exclude derived ifields.
1729 (gen-ifld-defns): Ditto.
1730 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
1731 * rtl.c (rtl-finish!): Ditto.
1732 * opc-itab.scm (-gen-ifield-decls): Ditto.
1733 * opcodes.scm (gen-switch): Exclude derived operands.
1734 * operand.scm (op-iflds-used): Expand derived operands.
1735 (hw-index-derived): New dummy function to create dummy object.
1736 (-derived-operand-parse): Fix mode arg passed to <derived-operand>
1737 constructor. Set object's hw-name and index fields.
1738 (-anyof-merge-subchoices): Set instance object's index also.
1739 (-anyof-name): New helper function.
1740 (anyof-merge-semantics): Correct replacement of operand names in
1742 (op-ifield): Tolerate derived-operands and their funny indices better.
1743 * ifield.scm (ifld-known-values): Expand derived ifields.
1744 (non-multi-ifields, non-derived-ifields): New utility functions.
1745 (ifld-decode-mode): Tolerate objects with unbound decode field.
1746 * iformat.scm (compute-insn-length): Expand derived ifields.
1747 (compute-insn-base-mask): Ditto.
1748 * insn.scm (insn-base-ifields): Remove.
1749 (<insn>): Add iflds-values entry to cache ifld-base-ifields values.
1750 (insn-value): Call ifld-base-ifields and ifld-constant? instead.
1751 * mach.scm (arch-analyze-insns!): Exclude multi-insns.
1752 * sem-frags.scm (sim-sfrag-analyze-insns!): Ditto.
1753 (-frag-test-data): Ditto.
1754 * sid-cpu.scm (cgen-write.cxx,-gen-sem-switch): Ditto.
1755 (-gen-sem-switch-engine); Ditto.
1756 * sid-model.scm (-gen-model-insn-fns, -gen-model-timing-table): Ditto.
1757 * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
1758 (-gen-record-args): Tolerate unbound op-ifield.
1759 * sid.scm (<derived-operand> cxmake-get): New sketch implementation.
1760 (-gen-arch-model-decls, scache-engine-insns, pbb-engine-insns):
1761 Exclude multi-insns.
1762 * sim-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
1763 * utils-sim.scm (op-extract?): Handle derived operands.
1765 * gas-test.scm (cgen-build.sh): Quote '*' chars printed by objdump.
1766 * semantics.scm (-build-operand!): Handle 'DFLT case during parsing.
1767 * hardware.scm (hardware-for-mode): New function.
1769 * insn.scm (filter-harmlessly-ambiguous-insns): New function for
1770 cleaning up decode tables.
1771 (mask-superset?): Little helper function for above.
1772 * decode.scm (-build-decode-table-entry): Call it.
1773 (-opcode-slots): Add some more tracing.
1774 * arm.cpu: Disable decode-splits construct due to implementation
1775 conflict with `filter-harmlessly-ambiguous-insns'
1777 * decode.scm (-population-top-few): New function for better decode
1778 bit generation. Includes minor helper functions.
1779 (decode-get-best-bits): Call it instead.
1780 (OLDdecode-get-best-bits): Renamed previous version of above.
1783 2000-06-13 Ben Elliston <bje@redhat.com>
1785 * configure.in: Use AC_EXEEXT with Cygnus mode. Remove AC_ARG_WITH
1786 for the Guile library directory.
1787 * configure: Regenerate.
1788 * Makefile.in, doc/Makefile.in: Regenerate.
1790 * Makefile.in, doc/Makefile.in: Regenerate.
1791 * configure.in: Remove unnecessary tests. Move to version 1.0.
1792 * acconfig.h, config.in: Remove.
1793 * configure, aclocal.m4: Regenerate.
1794 * doc/stamp-vti, doc/version.texi: Likewise.
1795 * AUTHORS: New file.
1797 2000-06-07 Ben Elliston <bje@redhat.com>
1799 * fixup.scm (symbol-bound?): Reduce debugging output.
1801 2000-06-02 matthew green <mrg@redhat.com>
1803 * insn.scm (insn-base-ifields): Returns all the instruction fields for
1804 a given instruction, replacing derived fields with their subfields.
1805 (insn-value): Use `insn-base-ifields' to find all constant values.
1806 (multi-insn-instantiate!): Comment some debug messages.
1808 2000-06-01 Ben Elliston <bje@redhat.com>
1810 * doc/rtl.texi (Expressions): Document a hazard with the choice of
1811 symbol names used in a (c-call ..) rtx.
1813 * sim-test.scm (build-test-set): Return (()) for an instruction
1814 with no operands, so it too is included in the generated test set.
1816 2000-05-31 Ben Elliston <bje@redhat.com>
1818 * Makefile.am (gas-test): Ensure $(ISA) is not empty.
1819 (sim-test): Likewise.
1820 * Makefile.in: Regenerate.
1822 2000-05-30 Frank Ch. Eigler <fche@redhat.com>
1824 * read.scm (-cgen): In debugging mode (-b), ask guile for untruncated
1825 stack traceback, in an order that resembles gdb's `bt'.
1827 2000-05-24 Frank Ch. Eigler <fche@redhat.com>
1829 * desc-cpu.scm (-gen-hash-defines): Use ifmt-ifields again.
1830 * opc-itab.scm (-gen-ifmt-table-1): Ditto.
1831 * gas-test.scm (gas-test-analyze!, cgen-build.sh): Filter out
1833 * ifield.scm (multi-ifield): Define workable field-mask and field-value
1835 (ifld-base-ifields): New routine to replace ifmt-expanded-ifields.
1836 * iformat.scm (ifmt-expanded-ifields): Gone.
1837 (ifields-base-ifields): New function. Call ifld-base-ifields for real
1839 (-ifmt-lookup-ifmt!): Use it to expand derived/multi combos in new
1842 * opcodes.scm (multi-ifield gen-extract): Correct spacing in generated
1845 2000-05-23 Frank Ch. Eigler <fche@redhat.com>
1847 * sid.scm (with-any-profile?): New function clone.
1849 2000-05-19 Frank Ch. Eigler <fche@redhat.com>
1851 * utils-gen.scm (gen-multi-ifld-extract): Fix decode hook for sim.
1853 2000-05-18 Frank Ch. Eigler <fche@redhat.com>
1855 * ifield.scm (-multi-ifield-parse): Add encode/decode args.
1856 (-multi-ifield-read): Parse them.
1857 (define-full-multi-ifield): Pass #f/#f as defaults for them.
1858 * opcodes.scm (multi-ifield gen-insert): Add encode hook.
1859 (multi-ifield gen-extract): Add decode hook.
1860 * utils-gen.scm (gen-multi-ifld-extract): Add decode hook for sim.
1862 * insn.scm (syntax-break-out): More correctly handle \-escaped
1864 (syntax-make-elements): Ditto.
1865 * opc-itab.scm (compute-syntax): Ditto.
1867 2000-05-17 Ben Elliston <bje@redhat.com>
1869 * gas-test.scm (cgen-build.sh): Log the correct script filename.
1871 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
1873 * gas-test.scm (build-test-set): Return (()) for an instruction
1874 with no operands, so it too is included in the generated test set.
1876 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
1878 * desc-cpu.scm (-gen-hash-defines): Define CGEN_ACTUAL_MAX values for
1879 IFMT_OPERANDS and SYNTAX_BYTES.
1881 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
1883 * sim.scm (with-any-profile?): New function.
1884 * utils-sim.scm (-sfmt-contents): Use above instead of `with-profile?'
1885 to decide whether or not to include profiling counters.
1887 2000-05-10 Frank Ch. Eigler <fche@redhat.com>
1889 Fuller derived-operand support for opcodes.
1890 * insn.scm (non-multi-insns): New filter to oppose `multi-insns'.
1891 * desc-cpu.scm (-define-hash-defines): Compute CGEN_MAX_SYNTAX_BYTES.
1892 Correctly compute ..._IFMT_OPERANDS. Omit useless ..._INSN_OPERANDS.
1893 (gen-operand-table): Omit derived- and anyof- operands from table.
1894 (gen-insn-table): Omit multi-insns from table.
1895 * iformat.scm (ifmt-expanded-fields): New function to expand
1896 subfields of derived-ifields.
1897 (ifmt-compute!): Ignore remaining multi-insns.
1898 * mach.scm (isa-min-insn-bitsize, isa-max-insn-bitsize): Ignore
1900 * opc-itab.scm (-gen-ifmt-table-1): Use ifmt-expanded-ifields.
1901 (-gen-insn-enum, -gen-insn-opcode-table): Ignore multi-insns.
1902 * opcodes.scm (derived-operand): Define abort()ing gen-insert,
1903 gen-extract, gen-fget, gen-fset, gen-parse, gen-print functions.
1904 (gen-switch): Omit anyof-operands.
1905 * operand.scm (-anyof-syntax): New function.
1906 (-anyof-merge-syntax): Call it.
1907 * utils.scm (collect): New idiomatic function.
1909 2000-05-10 Ben Elliston <bje@redhat.com>
1911 * m68k.cpu: New file (work in progress).
1913 2000-05-05 Frank Ch. Eigler <fche@redhat.com>
1915 * Makefile.am (all-local): New target. Create stamp-cgen.
1916 * Makefile.in: Regenerated.
1917 * doc/Makefile.in: Regenerated.
1919 2000-04-26 Frank Ch. Eigler <fche@redhat.com>
1921 * operand.scm (-operand-g/setter-syntax): Correct off-by-one error.
1922 (-operand-parse-setter): Ditto.
1923 * utils-sim.scm (needed-iflds): Store ifield (index) in argbuf, even
1924 for CACHE-ADDR operands.
1925 * sid-decode.scm (-gen-record-args): Remove newly duplicated extract
1926 trace entries. Widen byte-wide values for printing.
1927 * sid.scm (-op-gen-set-trace): Enhance result trace with op indices.
1928 Widen byte-wide values for printing. Hexify memory addresses.
1930 2000-04-23 matthew green <mrg@redhat.com>
1932 * m32r.cpu: Fix a typo.
1934 Fri Apr 21 22:18:48 2000 Jim Wilson <wilson@cygnus.com>
1936 * ia64.cpu (define-model): Change merced to Itanium.
1937 (f-qp): Change quilifying to qualifying.
1938 (movbr_ph, movbr_pvec): Delete.
1939 (I-I21): Delete uses of movbr_ph and movbr_pvec.
1941 2000-04-07 Ben Elliston <bje@redhat.com>
1943 * doc/porting.texi (Building a simulator test suite): Clarify
1944 where generated test cases are placed.
1946 2000-04-07 Ben Elliston <bje@redhat.com>
1948 * Makefile.am (gas-test): Remove dependency on `cgen'.
1950 * Makefile.in: Regenerate.
1952 2000-04-04 Frank Ch. Eigler <fche@redhat.com>
1954 * hardware.scm (<hw-pc> parse): Allow user to set type for pc register.
1955 * mode.scm (mode-finish!): Add placeholder code for mach-dependent
1956 type reconfiguration.
1957 * utils-sim.scm (-sfmt-contents): Add profile-counters only if
1960 2000-03-30 Ben Elliston <bje@redhat.com>
1962 * doc/rtl.texi (Enumerated constants): Add concept index entries.
1964 2000-03-24 Ben Elliston <bje@redhat.com>
1966 * Makefile.am (stamp-cgen): Reinstate target.
1967 * Makefile.in: Regenerate.
1969 2000-03-22 Ben Elliston <bje@redhat.com>
1971 * slib/ppfile.scm: Remove; unused.
1972 * slib/defmacex.scm: Likewise.
1974 2000-03-21 Ben Elliston <bje@redhat.com>
1976 * doc/internals.texi (Source file overview): Document.
1978 * Makefile.am (GUILEDIR): Remove.
1979 (CGEN): Ditto. Callers use $(GUILE) instead.
1980 (GUILEFLAGS): Ditto.
1982 (APPDESCFILES): Ditto.
1983 (OPCODESFILES): Ditto.
1985 (pkgdata_SCRIPTS): Ditto.
1986 (stamp-cgen): Remove target.
1987 * Makefile.in: Regenerate.
1989 * configure.in: Remove header and library tests.
1990 * configure: Regenerate.
1991 * config.in: Likewise.
1993 2000-03-20 Ben Elliston <bje@redhat.com>
1995 * read.scm: Cease loading "hob-sup.scm".
1996 * utils.scm: Inherit the fastcall family of procedures (for now).
1997 * hob-sup.scm: Remove.
1999 2000-03-20 Ben Elliston <bje@redhat.com>
2001 * configure.in (AC_OUTPUT): Do not emit .gdbinit.
2002 * configure: Regenerate.
2003 * gdbinit.in: Remove.
2005 2000-03-17 Ben Elliston <bje@redhat.com>
2007 * Makefile.am (CGEN): Use guile, not cgen.
2008 (CGENCFLAGS, LIBIBERTY, INCLUDES): Remove.
2009 (bin_PROGRAMS, cgen_SOURCES): Likewise.
2010 (CGENFILES): Fold CGEN_HOB_INPUT_FILES and CGEN_NOHOB_FILES.
2011 (HOBBIT_INPUT_FILES, HOBBIT_OUTPUT_FILE): Remove.
2012 (HOB_OBJS): Likewise.
2013 (CGEN_HOB_SRC, CGEN_HOB_OBJ): Likewise.
2014 (CGENOBJS): Likewise.
2015 (cgen_DEPENDENCIES, cgen_LDFLAGS, cgen_LDADD): Likewise.
2016 (hobbit, hobbit.o, hobbit.c): Remove targets.
2017 (cos.o, cgen.o, cgen-gh.o, hob-sup.o): Likewise.
2018 (CLEANFILES): Update.
2019 * acconfig.h (WITH_HOBBIT): Remove.
2020 * configure.in: Do not test for 3 arg scm_make_vector. Remove
2021 option --with-cgen-hobbit.
2022 * cos.h, cos.c, hob-main.c, hob-sup.c, hob-sup.h, hob.sh: Remove.
2023 * cgen-gh.h, cgen-gh.c, cgen-hob.scm, cgen.c: Likewise.
2024 * hobbit.c, hobbit.h, hobbit.scm: Likewise.
2025 * hobscmif.h, hobslib.scm, scmhob.h: Likewise.
2026 * Makefile.in: Regenerate.
2027 * config.in: Likewise.
2028 * aclocal.m4: Likewise.
2029 * configure: Likewise.
2030 * README (Hobbit support): Remove.
2031 * doc/internals.texi (Conventions): Do not mention Hobbit.
2032 * doc/porting.texi (Supported Guile versions): Likewise.
2034 2000-03-16 Frank Ch. Eigler <fche@redhat.com>
2036 * sid-cpu.scm (-gen-sem-switch-engine): Adjust calling &
2037 callback convention to new sid sidutil::basic_cpu code.
2038 (-gen-sfrag-engine-fn): Ditto.
2039 * sid.scm (-create-virtual-insns!): Ditto.
2040 (-hw-gen-set-quiet-pc): Mark delay slot execution specially in pbb
2042 (cxmake-skip): Implement properly for pbb mode.
2044 2000-03-03 Ben Elliston <bje@redhat.com>
2046 * doc/internals.texi: New file.
2048 2000-02-29 Ben Elliston <bje@redhat.com>
2050 * doc/rtl.texi (Derived operands): Remove unnecessary footnote.
2051 * doc/porting.texi: Formatting tweaks.
2053 2000-02-25 Nick Clifton <nickc@cygnus.com>
2055 * desc-cpu.scm (*_cgen_cpu_open): Initialise signed_overflow_ok_p
2058 Thu Feb 24 14:09:01 2000 Doug Evans <devans@seba.cygnus.com>
2060 * operand.scm (<anyof-operand>,make!): Initialize mode-name, not
2063 2000-02-23 Andrew Haley <aph@cygnus.com>
2065 * m32r.cpu (pcmpbz): Make pcmpbz a special (i.e. hidden)
2068 2000-02-24 Ben Elliston <bje@redhat.com>
2070 * doc/rtl.texi (Derived operands): Add some cindex entries.
2072 2000-02-23 Ben Elliston <bje@redhat.com>
2074 * ia32.cpu (dndo): Move general purpose macro from here ..
2075 * simplify.inc (dndo): .. to here.
2077 2000-02-18 Frank Ch. Eigler <fche@redhat.com>
2079 * arm.cpu (h-tbit): Add c-call setter function.
2082 2000-02-17 Frank Ch. Eigler <fche@redhat.com>
2084 * sem-frags.scm (-frag-hash-compute!): Add appstuff arg for traversal.
2085 (-frag-cost-compute!): Ditto.
2086 * utils.scm (copyright-cygnus): Add Y2K.
2087 * sid-cpu.scm (@prefix@_pbb_run): Add unsigned& argument.
2089 2000-01-25 Nick Clifton <nickc@cygnus.com>
2091 * desc-cpu.scm (@arch@_cgen_cpu_open): Add code to initialise
2092 flags field of the CGEN_CPU_TABLE structure.
2094 Sun Dec 12 14:20:36 1999 Doug Evans <devans@seba.cygnus.com>
2096 * operand.scm (<anyof-instance>): Renamed from <anyof-value>.
2097 All references updated.
2099 Tue Nov 30 11:06:22 1999 Doug Evans <devans@seba.cygnus.com>
2101 * ia32.cpu: Rewrite addressing mode support.
2103 * ifield.scm (<ifield>): New member `follows'.
2104 (ifld-known-values): New proc.
2105 (<ifield>): New method set-word-offset!.
2106 (ifld-set-word-offset!): New proc.
2107 (ifld-new-word-offset): New proc.
2108 (<ifield>): New method next-word.
2109 (<multi-ifield>): New method next-word.
2110 (ifld-next-word): New proc.
2111 (ifld-precedes?): New proc.
2112 (-ifield-parse): New args word-offset,word-length,follows.
2113 All callers updated. Handle CISC-style vs RISC-style ifields.
2114 (-ifield-read): Recognize word-offset,word-length,follows specs.
2115 (-ifld-parse-follows): New proc.
2116 (-multi-ifield-make-default-insert): New proc.
2117 (-multi-ifield-make-default-extract): New proc.
2118 (-multi-ifield-parse): Provide default values for insert,extract
2119 handlers if not specified.
2120 (<derived-ifield>): New class.
2121 (derived-ifield?): New predicate.
2122 (ifld-derived-operand?): New predicate.
2123 (f-anyof): New global.
2124 (ifld-anyof?,ifld-anyof-operand?): New predicates.
2125 (f-derived,ifld-derived?): Delete.
2126 (ifield-builtin!): Delete init of f-derived. Init f-anyof.
2127 * insn.scm (-sub-insn-ifields): New proc.
2128 (-sub-insn-make!): New proc.
2129 (multi-insn-instantiate!): Provide initial implementation.
2130 (-insn-parse): If insn contains "anyof" operands, create a
2131 <multi-insn> object instead of a plain <insn>.
2132 (-parse-insn-format-symbol): Rewrite derived operand handling.
2133 Add anyof operand handling.
2134 (-parse-insn-format-ifield-spec): Rewrite.
2135 (-parse-insn-format-operand-spec): Delete.
2136 (-parse-insn-format-list): Delete support for `(operand value)'.
2137 (anyof-operand-format?): Replaces derived-operand-format?.
2138 * operand.scm (-operand-parse-getter): Improve error messages.
2139 (-operand-parse-setter): Ditto.
2140 (<derived-operand>): New members args,syntax,base-ifield,encoding,
2142 (<anyof-operand>): Change baseclass from <derived-operand> to
2143 <operand>. Delete member values. New members base-ifield,choices.
2144 (anyof-operand?): New predicate.
2145 (-derived-parse-encoding,-derived-parse-ifield-assertion): New procs.
2146 (-derived-operand-parse): Rewrite.
2147 (-derived-operand-read): Rewrite.
2148 (-anyof-parse-choice): New proc.
2149 (-anyof-operand-parse): Rewrite.
2150 (-anyof-operand-read,define-anyof-operand): New procs.
2151 (<anyof-value>): Rewrite.
2152 (-anyof-initial-known): New proc.
2153 (anyof-satisfies-assertions?): New proc.
2154 (-anyof-merge-syntax,-anyof-merge-encoding): New procs.
2155 (-anyof-merge-getter,-anyof-merge-setter): New procs.
2156 (-anyof-merge-semantics,-anyof-merge-ifield-assertion): New procs.
2157 (-anyof-merge-subchoices,-anyof-all-subchoices): New procs.
2158 (-anyof-value-from-derived): New proc.
2159 (-anyof-all-choices-1,anyof-all-choices): New procs.
2160 (operand-init!): Create define-anyof-operand reader command.
2162 * insn (syntax-break-out): Take syntax as argument instead of insn.
2163 All callers updated.
2164 (syntax-make): Move here, from ???.
2166 * types.scm (<bitrange>): Rename accessors from bitrange:foo to
2167 bitrange-foo. All uses updated.
2168 (bitrange-next-word): New proc.
2170 * semantics.scm (-solve-expr-fn,rtx-solve): New procs.
2172 * rtl.scm (rtx-canonicalize): Provide initial implementation.
2173 (rtx-make-const,rtx-make-enum): New procs.
2174 (rtx-arg1,rtx-arg2): Renamed from -rtx-arg[12]. All callers updated.
2175 (rtx-mem-addr,rtx-mem-sel): New procs.
2176 (rtx-change-address): New proc.
2177 (rtx-make-ifield,rtx-make-operand,rtx-make-local): New proc.
2178 (rtx-make-set,rtx-single-set?): New procs.
2179 (rtx-combine): New proc.
2181 * rtl.scm (rtx-traverse): New arg `appstuff'. All callers updated.
2182 (rtx-traverse-with-locals): Ditto.
2183 (-rtx-traverse,-rtx-traverse-*): Ditto.
2185 * rtl.scm (define-subr): New proc.
2186 (rtl-init!): Create reader command `define-subr'.
2188 * cos.c (_object_mi_p): Ensure argument is an object.
2189 (indent): New function.
2190 (_object_print_elms): Add pretty-printing support.
2191 (_object_print): Ditto.
2193 * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall7.
2194 (*floats-s->c-fun-table*): Ditto.
2195 * hobbit.c,hobbit.h: Rebuild.
2196 * hob-sup.c (fastcall7): New proc.
2197 * hob-sup.h (fastcall7): Declare.
2198 * hob-sup.scm (fastcall7): New macro.
2200 * mach.scm (<arch>): New member subr-list.
2201 (current-subr-list,current-subr-add!,current-subr-lookup): New procs.
2202 (arch-finish!): Reverse recorded subr list.
2204 * read.scm (debug-env): New global.
2205 (debug-var-names,debug-var,debug-repl-env): New procs.
2206 (debug-repl): Rewrite. New arg `env-list'. All callers updated.
2207 (debug-quit): Renamed from `continue'.
2209 * simplify.inc (dsmf): New pmacro.
2211 * utils.scm (plus-scan): New proc.
2212 (split-bits): Rewrite.
2213 (split-value): New proc.
2215 1999-10-13 Doug Evans <devans@casey.cygnus.com>
2217 * doc/Makefile.am (DOCFILES): Add notes.texi.
2218 * doc/Makefile.in: Rebuild.
2220 1999-10-11 Doug Evans <devans@casey.cygnus.com>
2222 * ifield.scm (ifld-derived?): New proc.
2223 (f-derived): New global.
2224 (ifield-builtin!): Create ifield f-derived.
2225 (<multi-insn>): New class.
2226 (multi-insn?): New predicate.
2227 (multi-insn-instantiate!): New proc.
2228 (-insn-parse): Create <multi-insn> objects for insns with derived
2230 (-parse-insn-format-symbol): Handle derived ifields.
2231 (-parse-insn-format-ifield-spec): New proc.
2232 (-parse-insn-format-operand-spec): New proc.
2233 (-parse-insn-format-list): Simplify.
2234 (-parse-insn-format): No longer allow (ifield-object value) spec.
2235 (derived-operand-format?): New proc.
2236 (insn-alias?): New proc.
2237 (non-alias-insns): Rewrite.
2238 (insn-real?): Renamed from real-insn?, all callers updated.
2239 (virutal-insns): Rewrite.
2240 (multi-insns): New proc.
2241 * mach.scm (arch-analyze-insns!): Instantiate multi-insns if present.
2242 * operand.scm (op-ifield): Renamed from op:ifield, all callers updated.
2243 Return #f if operand doesn't have an index or if index is not an
2245 (hw-index-anyof): New proc.
2246 (-operand-parse): Allow integer indices.
2247 (<derived-operand>): New class.
2248 (derived-operand?): New predicate.
2249 (<anyof-operand>): New class.
2250 (<anyof-value>): New class.
2251 (-anyof-parse-value,-anyof-operand-parse): New procs.
2252 (-derived-operand-parse,-derived-operand-read): New procs.
2253 (define-derived-operand,define-full-derived-operand): New procs.
2254 (operand-init!): New reader command define-derived-operand.
2256 * utils.scm (list-take): Handle negative amount.
2257 (element?): Rewrite.
2259 1999-10-10 Doug Evans <devans@casey.cygnus.com>
2261 * dev.scm: quick-utils.scm renamed to ~/.cgenrc.
2263 1999-10-04 Richard Henderson <rth@cygnus.com>
2265 * ia64.cpu: Checkpoint.
2267 1999-09-29 Doug Evans <devans@casey.cygnus.com>
2269 * sim-cpu.scm (-gen-semantic-fn-table): Virtual insns are always valid.
2271 * sim.scm (sim-finish!,x-invalid): Always set pc. Set vpc based on
2272 default-insn-bitsize. Pass vpc to sim_engine_invalid_insn.
2274 Wed Sep 29 14:39:39 1999 Dave Brolley <brolley@cygnus.com>
2276 * sim.scm (sim-finish!): Don't call sim_io_error for invalid insn. Use
2277 PC returned by sim_engine_invalid_insn.
2279 1999-09-28 Doug Evans <devans@casey.cygnus.com>
2281 * ia32.cpu: New file.
2283 1999-09-25 Doug Evans <devans@casey.cygnus.com>
2285 * utils.scm (bit-set?): Fix off by one error.
2287 * rtl-c.scm (s-sequence): Fix non-void-mode result output.
2289 * rtl.scm (hw): Check for valid hardware element before trying to
2292 * arm.cpu (arm7f cpu): Renamed from arm. All users updated.
2293 * arm7.cpu (bx): Fix name of target address operand in assembler spec.
2294 (*): arm_compute_operand2_foo renamed to compute_operand2_foo.
2295 * thumb.cpu (*): arm_compute_operand2_foo renamed to
2296 compute_operand2_foo.
2298 * cgen-sid.scm (sim_arguments): Add support for building defs.h.
2299 * sid.scm (-hw-gen-set-quiet-pc): Handle #:delay modifier.
2300 Call delayed_branch/branch methods instead of assigning to `vpc'.
2301 (<hw-pc>,cxmake-skip): Call skip method.
2302 (-gen-hw-selector): Call rtl-c++ instead of rtl-c.
2303 (<pc>,cxmake-skip): Ditto.
2304 (-create-virtual-insns!): Ditto.
2305 (op:read): Call estate-make-for-normal-c++ instead of estate-...-c.
2307 (op:record-profile): Specify #:output-language "c++".
2308 * sid-cpu.scm (-gen-insn-attr-decls): Rename @cpu@_insn_attr to
2310 (cgen-desc.h): Use @arch@ namespace instead of @cpu@.
2312 (-gen-reg-access-defns): Use rtl-c++ instead of rtl-c.
2313 (gen-semantic-code): Ditto.
2314 (-gen-sem-case,-gen-sfrag-code): Ditto.
2315 (-gen-hardware-types): Delete class @cpu@_cpu_base.
2316 (cgen-cpu.h): File is now #included by main cpu class, rather than
2318 (cgen-defs.h): New proc.
2319 (-gen-scache-semantic-fn): Change result type to sem_status.
2320 New local `status'. Call done_cti_insn/done_insn method at end.
2321 (cgen-semantics.cxx): Include @cpu@.h instead of @arch@-main.h,
2323 (cgen-sem-switch.cxx): Ditto.
2324 * sid-decode.scm (-gen-idesc-decls): Update return type of
2326 (cgen-decode.h): Add using namespace @arch@.
2327 (cgen-decode.cxx): Include @cpu@.h instead of @arch@-main.h.
2329 * rtl-c.scm (<rtl-c-eval-state>): New member output-language.
2330 (estate-output-language-c?,estate-output-language-c++?): New procs.
2331 (<rtl-c-eval-state>,vmake!): Handle #:output-language.
2332 (estate-make-for-normal-rtl-c++): New proc.
2333 (rtl-c++-parsed,rtl-c++): New proc.
2334 (s-c-call): Invoke cpu class method if c++.
2335 (join): Use s-c-raw-call.
2337 * rtl-c.scm (subword): Don't pass current_cpu to SUBWORD.
2340 * rtl-c.scm (delay): Mark the sequence as #:delay'd.
2341 * rtl.scm (<eval-state>): New member `modifiers'.
2342 (<eval-state>,vmake!): Handle #:modifiers.
2343 (estate-with-modifiers): New proc.
2345 * rtl.scm (rtx-side-effects?): New proc.
2346 (rtx-canonical-bool): Don't change expr if it has side effects.
2347 * semantics.scm (-simplify-expr-fn): Handle exprs with side-effects
2350 1999-09-23 Doug Evans <devans@casey.cygnus.com>
2352 * sim.scm (gen-scache-type): Fix typo in last patch.
2354 Tue Sep 21 17:12:55 1999 Dave Brolley <brolley@cygnus.com>
2356 * sim.scm (gen-scache-type): Add last_insn_p flag for parallel support.
2358 1999-09-05 Doug Evans <devans@casey.cygnus.com>
2360 * sid.scm (<hw-pc>,cxmake-skip): New method.
2361 (<pc>,cxmake-skip): New method.
2363 * decode.scm (decode-build-table): Delete args startbit,index-list.
2364 All callers updated.
2365 * utils-sim.scm (gen-decoder): Delete args startbit,index-list.
2366 All callers updated.
2367 * sim-decode.scm (-gen-decode-fn): Always pass 0 for startbit
2368 to decode-get-best-bits.
2369 * sid-decode.scm (-gen-decode-fn): Ditto.
2371 * hardware.scm (hw-bits): New proc.
2372 (-hw-parse): New arg layout. All callers updated.
2373 (define-full-hardware): New arg layout. All callers updated.
2374 (-hw-validate-layout): New proc.
2375 (-hw-create-[gs]etter-from-layout): New procs.
2376 (<hw-register>,parse!): Handle layout spec.
2377 * types.scm (type-bits): New proc.
2379 * sem-frags.scm (-frag-cost-compute!): Fix calculation of
2380 UNARY, BINARY, TRINARY rtxs.
2382 * attr.scm (<enum-attribute>,parse-value): Allow strings.
2383 * enum.scm (parse-enum-vals): Use reverse! instead of reverse.
2384 Support '- as "unused spot" indicator.
2386 1999-09-03 Doug Evans <devans@casey.cygnus.com>
2388 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Fix typo.
2390 1999-09-02 Doug Evans <devans@casey.cygnus.com>
2392 * rtx-funcs.scm (subword): Fix mode spec of `value'.
2394 * rtl.scm (-rtx-traverse-operands): Fix debugging message
2396 (tstate-make): New arg `depth'. All callers updated.
2397 (tstate-depth,tstate-set-depth!): New procs.
2398 (tstate-incr-depth!,tstate-decr-depth!): New procs.
2399 (-rtx-traverse-operands): Indent debugging output by traversal depth.
2400 (-rtx-traverse): Ditto. Keep track of traversal depth.
2402 1999-09-01 Doug Evans <devans@casey.cygnus.com>
2404 * sim-decode.scm (-gen-decoder+supporting cast): Move to utils-sim.scm.
2405 * sid-decode.scm (-gen-decoder+supporting cast): Ditto.
2406 * utils-sim.scm: Decoder generator support moved here.
2407 (-decode-equiv-entries?,-decode-sort-entries): New procs.
2408 (-gen-decoder-switch): Sort entries for more fall-throughs.
2410 * Makefile.am (gas-test,sim-test): Specify ISA when invoking cgen.
2411 * Makefile.in: Rebuild.
2412 * sim-test.scm (build-sim-testcase): Add logging message.
2413 * dev.scm (cload): Recognize SIM-TEST application.
2414 (load-stest): Set APPLICATION to SIM-TEST.
2416 * desc-cpu.scm (-gen-hash-defines): Add \n to output.
2418 * ifield.scm (-ifield-parse): Allow bit numbers up to 127.
2419 * mach.scm (-isa-parse): Allow insn bitsizes from 8 to 128.
2420 * mode.scm (mode-make-int,mode-make-uint): Allow values up to 64 bits.
2422 * insn.scm (syntax-break-out): Handle ${foo}.
2424 Sun Aug 29 11:11:15 1999 Doug Evans <devans@canuck.cygnus.com>
2426 * Makefile.am (noinst_PROGRAMS,noinst_LIBRARIES): Delete.
2427 (bin_PROGRAMS): Define.
2428 (CGEN_HOB_INPUT_FILES): Remove $(srcdir)/.
2429 (cgen-hob.c): Prepend $(srcdir)/ here.
2430 (APPDESCFILES,OPCODESFILES,SIMFILES,pkgdata_SCRIPTS): Define.
2431 (libcpu_a_SOURCES): Delete.
2432 (cgen_DEPENDENCIES,cgen_LDADD): Rewrite.
2433 (CGEN_HOB_OBJ,CGENOBJS): New variables.
2434 * configure.in (LIBS): Replace -Wl,-rpath with -R.
2435 Add AC_CHECK_LIB(guile,main).
2436 * Makefile.in: Rebuild.
2437 * doc/Makefile.in: Rebuild.
2438 * aclocal.m4: Rebuild.
2439 * config.in: Rebuild.
2440 * configure: Rebuild.
2442 1999-08-28 Doug Evans <devans@casey.cygnus.com>
2444 Rename rtx functions from name: to name, accept optional leading
2446 VM -> VOID, DM -> DFLT, use DFLT instead of VM for default mode.
2447 * attr.scm (-attr-eval): Update.
2448 * hardware.scm (hw-mode-ok?): Rename arg mode to new-mode-name.
2449 (<hw-register>,mode-ok?): Disallow VOID.
2450 (<hw-immediate>,mode-ok?): Disallow VOID.
2451 (<hw-address>,mode-ok?): Disallow VOID.
2452 * mode.scm (mode-name?): New proc.
2453 (VOID): Renamed from VM.
2454 (DFLT): Renamed from DM.
2455 (mode-builtin!): Update.
2456 * opcodes.scm (<ifield>,gen-insert): Update.
2457 (<ifield>,gen-extract): Update.
2458 (<multi-ifield>,gen-insert,gen-extract): Update.
2459 * operand.scm (op:mode): Update.
2460 (<pc>,make!): Update.
2461 (op:new-mode): Update.
2462 (-operand-read): Update.
2463 * rtl.scm (-rtx-valid-types): Add OPTIONS, EXPLNUMMODE,
2464 NONVOIDMODE, DFLTMODE. Rename VMMODE to VOIDMODE.
2465 (def-rtx-dual-mode,define-rtx-dual-mode): Delete.
2466 (-rtx-lazy-sem-mode): Renamed from -rtx-mode. All callers updated.
2467 (rtx-make): Call -rtx-munge-mode&options.
2468 (rtx accessors): Rewrite.
2469 (rtx-pretty-name): Update.
2470 (-rtx-traverse-*): Update.
2471 (-rtx-traverse-explnummode,-rtx-traverse-nonvoidmode): New procs.
2472 (-rtx-traverse-voidmode,-rtx-traverse-dfltmode): New procs.
2473 (-rtx-make-traverse-table): Update.
2474 (-rtx-traverse-operands): Update.
2475 (-rtx-option?,-rtx-option-list?): New procs.
2476 (-rtx-munge-mode&options): New proc.
2477 (-rtx-traverse-expr): Call -rtx-munge-mode&options.
2478 (-rtx-traverse): Update.
2479 (rtx-traverse,rtx-traverse-with-locals,rtx-compile): Update.
2480 (rtx-compile-time-constant?): Update.
2481 (rtx-true?,rtx-false?,rtx-true,rtx-false): Update.
2482 (rtx-value): Update.
2483 (hw,reg,mem): Renamed from foo:. Update. All callers updated.
2484 * rtx-funcs.scm (*): Update.
2485 * rtl-c.scm (rtl-c-get): Update.
2486 (rtl-c-set-quiet,rtl-c-set-trace): Update.
2487 (s-c-call,s-c-raw-call): Update.
2488 (s-boolifop,s-convop,s-if,s-cond): Update.
2489 (s-case-vm,-gen-non-vm-case-test,s-case): Update.
2490 (-par-replace-set-dests,-par-replace-set-srcs): Update.
2491 (s-parallel,s-sequence): Update.
2492 (rtl-c-build-table): Update.
2493 * sem-frags.scm (-frag-hash-compute!): Update.
2494 (-frag-cost-compute!): Improperly handle unary,binary,trinary ops
2495 for temporary bug compatibility with previous version.
2496 (-frag-expr-locals,-frag-expr-stmts): Update.
2497 (-frag-compute-desired-frags,-frag-pick-best): Update.
2498 * semantics.scm (-simplify-expr-fn): Update.
2499 (rtx-simplify): Update.
2500 (-rtx-ref-type): Update. Account for modifiers.
2501 (-build-operand!,-build-reg-operand!,-build-mem-operand!): Update.
2502 (-build-ifield-operand!): Update.
2503 (-build-known-values): Update.
2504 (semantic-compile): Update.
2505 (-gen-reg-access-defns): Update.
2506 (gen-semantic-code,-gen-sem-case): Update.
2507 (-gen-sfrag-code,-gen-sfrag-case): Update.
2508 * sim-cpu (gen-semantic-code): Update.
2509 * sim.scm (<hw-pc>,gen-write,cxmake-skip): Update.
2510 (<hw-register>,gen-write,gen-set-macro,cxmake-get-raw): Update.
2511 (-hw-cxmake-get): Update.
2512 (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
2513 (<hw-index>,cxmake-get): Update.
2514 (<operand>,gen-type,gen-read,cxmake-get): Update.
2515 (<operand>,gen-set-quiet,gen-set-trace): Update.
2516 (<pc>,cxmake-get): Update.
2517 (sim-finish!): Update.
2518 * utils-gen.scm (-gen-ifld-extract-base): Update.
2519 (-gen-ifld-extract-beyond): Update.
2520 (gen-multi-ifld-extract): Update.
2521 * sid-decode.scm (-decode-expr-ifield-values-used): Update.
2522 * sid.scm (<hw-pc>,gen-write): Update.
2523 (-gen-decode-insn-globals): Update.
2524 (-hw-cxmake-get): Update.
2525 (<hw-register>,cxmake-get-raw): Update.
2526 (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
2527 (<hw-index>,cxmake-get): Update.
2528 (<operand>,gen-type,gen-read,cxmake-get): Update.
2529 (<operand>,gen-set-quiet,gen-set-trace): Update.
2530 (<pc>,cxmake-get): Update.
2531 (-create-virtual-insns!): Update.
2532 (-decode-split-build-assertion): Update.
2534 * simplify.inc: Update.
2536 1999-08-20 Doug Evans <devans@casey.cygnus.com>
2538 * sim.scm (-op-gen-queued-write): Fix memory address calculation.
2539 Prefix queue function name with sim_ instead of @cpu@_.
2541 * sim.scm (-with-parallel-only?): New global.
2542 (option-init!): Initialize it.
2543 (option-set!): Set it.
2544 (with-parallel-only?): New proc.
2545 * sim-decode.scm (-gen-decode-insn-globals): Don't include parallel
2546 and writeback markers if with-parallel-only.
2547 (-gen-idesc-init-fn): Update.
2548 * sim-cpu.scm (cgen-cpu.h): Don't generate struct parexec if
2551 Wed Aug 18 15:04:30 1999 Doug Evans <devans@canuck.cygnus.com>
2553 * sim-cpu.scm (-gen-semantic-fn-table): Handle unsupported insns
2554 with the invalid insn handler.
2556 * utils.scm (list-maybe-ref): New proc.
2558 * mach.scm (-isa-parse): Signal error if isa wasn't specified in
2560 (-mach-parse): Signal error if mach wasn't specified in define-arch.
2562 * i960.cpu (test*-*): Delete `expr' arg.
2563 (test-op,branch-op): Update.
2565 1999-08-09 Doug Evans <devans@casey.cygnus.com>
2567 * sim.scm (gen-reg-getter-fn,gen-reg-setter-fn): New procs.
2568 (gen-reg-access-decl): Replace `name' arg with `hw'. All callers
2570 (gen-reg-access-defn): Ditto.
2571 (-gen-hw-addr): Rewrite.
2572 (-op-gen-queued-write): Rewrite.
2573 * sim-cpu.scm (-gen-cpu-reg-access-decls):
2574 (-gen-scache-semantic-fn): Handle with-generic-write.
2575 (-gen-no-scache-semantic-fn): Ditto.
2577 1999-08-08 Doug Evans <devans@casey.cygnus.com>
2579 * utils-gen.scm (gen-define-ifmt-ifields): Tweak output.
2581 * sim.scm (-with-generic-write?): New global.
2582 (option-init!): Initialize it.
2583 (option-set!): Set it.
2584 (with-generic-write?): New proc.
2585 (-gen-hw-addr): New proc.
2586 (-op-gen-queued-write): New proc.
2587 (-op-gen-set-{quiet,trace}-parallel): Use it if with-generic-write?.
2589 * sim-cpu.scm (-gen-hardware-types): Output code with parallel support
2591 (-gen-sem-switch): Preserve existing with-parallel? value.
2592 (-gen-sem-parallel-switch): Ditto.
2593 (-gen-write-case): Add /indent support.
2594 (cgen-write.c): Rewrite.
2596 * utils.scm (-current-print-state): New global.
2597 (make-print-state): New proc.
2598 (pstate-indent,pstate-set-indent!): New procs.
2599 (pstate-cmd?,pstate-cmd-do): New procs.
2600 (/indent): New global.
2601 (/indent-set,/indent-add): New procs.
2602 (string-write): Set -current-print-state.
2603 (-string-write): New arg pstate, all callers updated.
2604 Handle print-state commands.
2605 (-string-list-flatten): New proc.
2606 (string-list->string): Use it.
2608 * sim-cpu.scm (-gen-sem-fn-name): Move here from sim-decode.scm.
2609 (-gen-sem-fn-table-entry): New proc.
2610 (-gen-semantic-fn-table): New proc.
2611 (-gen-scache-semantic-fn): Make fn static.
2612 (-gen-no-scache-semantic-fn): Ditto.
2613 (cgen-semantics.c): Define macro SEM_FN_NAME.
2614 * sim-decode.scm (-gen-decode-insn-globals): Delete FMT,TYPE,IDX,
2615 FAST,FULL. Update @cpu@_insn_sem contents.
2616 (-gen-semf-fn-name): Delete.
2617 (-gen-sem-fn-decls): Delete.
2618 (-gen-idesc-decls): Output prototypes of @cpu@_sem_init_idesc_table,
2619 @cpu@_semf_init_idesc_table.
2620 (-gen-idesc-init-fn): Update. Don't initialize pointers to semantic
2622 (cgen-decode.h): Print sfmt enum.
2623 * sid-decode.scm (-gen-semf-fn-name): Delete.
2624 * utils-gen.scm (gen-sfmt-enum-decl): New proc.
2626 * iformat.scm (sfmt-build): Rename sformats from fmt-foo to sfmt-foo.
2627 (ifmt-compute!): Ditto.
2628 * sim-decode.scm (-gen-decoder-switch): Ditto.
2629 * sid-decode.scm (-gen-decode-expr-entry): Ditto.
2630 (-gen-decoder-switch): Ditto.
2632 * insn.scm (insn-virtual?): New proc.
2634 * enum.scm (gen-enum-decl): Speed up, build string as list and then
2636 * mach.scm (<arch>): attr-list is now a pair of lists.
2637 (current-attr-list): Rewrite.
2638 (current-attr-add!,current-attr-lookup): Rewrite.
2639 * sim.scm (gen-cpu-insn-enum-decl): Replace append with append!.
2641 1999-08-06 Richard Henderson <rth@cygnus.com>
2643 * ia64.cpu: Initial checkpoint.
2645 1999-08-06 Doug Evans <devans@casey.cygnus.com>
2647 * pmacros.scm (-pmacro-apply): Fix definition, takes only 1 arg.
2648 (pmacros-init!): Update .apply help string.
2650 1999-08-03 Doug Evans <devans@casey.cygnus.com>
2652 * sim.scm (-hw-gen-set-quiet-pc): Update call to SEM_BRANCH_VIA_CACHE.
2653 (<hw-pc>,cxmake-skip): New method.
2654 (<pc>,cxmake-skip): New method.
2655 (-gen-argbuf-fields-union): Add branch_target to `chain' member.
2656 (gen-argbuf-type): New member `skip_count'.
2657 (sim-finish!): Update calls to @cpu@_pbb_cti_chain.
2658 * utils-cgen.scm (atlist-cti?): Don't include SKIP-CTI insns.
2660 * utils-sim.scm: New file.
2661 * dev.scm (load-sim): Load it.
2662 (load-sid): Load it.
2663 * cgen-sid.scm: Load it.
2664 * cgen-sim.scm: Load it.
2665 * iformat.scm (<sformat>): New member sbuf, not initialized by
2667 * rtx-funcs.scm (skip): Rewrite.
2668 * rtl-c.scm (skip): Rewrite.
2669 * m32r.cpu (sc,snc): Update `skip' usage.
2670 * mode.scm (mode-real-mode): New proc.
2671 * sem-frags.scm (-frag-split-by-sbuf): Rename from -frag-split-by-sfmt.
2672 Distinguish fragments by the <sformat-abuf> they use.
2673 * sim.scm (gen-profile-index-type): Delete.
2674 (ifield argbuf support): Move to utils-sim.scm and sim-decode.scm.
2675 (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
2676 (hardware argbuf support): Move to utils-sim.scm and sim-decode.scm.
2677 (operand argbuf support): Move to utils-sim.scm and sim-decode.scm.
2678 (-gen-argbuf-elm): Rewrite.
2679 (-gen-argbuf-hw-elm): Delete.
2680 (-gen-argbuf-fields-union): Generate structs for each sbuf instead
2682 (-sim-sformat-argbuf-list,-sim-insns-analyzed?): New globals.
2683 (sim-init!): Initialize them.
2684 (sim-analyze-insns!): Set them.
2685 (current-sbuf-list): New proc.
2686 * sim-cpu.scm (-gen-no-scache-semantic-fn): Update calls to
2687 gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns.
2688 * sim-model.scm (-gen-model-insn-fn): Ditto.
2689 * sim-decode.scm (-gen-extract-decls): Delete.
2690 (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
2691 (<hardware-base>,gen-extract,gen-trace-extract): Move here from
2693 (<hw-register,gen-extract,gen-trace-extract): Ditto.
2694 (<hw-address,gen-extract,gen-trace-extract): Ditto.
2695 (-gen-op-extract,-gen-op-trace-extract): New procs.
2696 (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
2697 gen-sfmt-argvars-foo and rewrite.
2698 (-gen-record-args): Rewrite.
2699 (-gen-extract-case): Tweak.
2700 * sid.scm (gen-profile-index-type): Delete.
2701 (ifield argbuf support): Move to utils-sim.scm.
2702 (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
2703 (hardware argbuf support): Move to utils-sim.scm and sid-decode.scm.
2704 (operand argbuf support): Move to utils-sim.scm and sid-decode.scm.
2705 (-sim-sformat-argbuf-list): New global.
2706 (sim-init!): Initialize it.
2707 (sim-analyze-insns!): Set it.
2708 (current-sbuf-list): New proc.
2709 * sid-decode.scm (-gen-argbuf-elm): Rewrite.
2710 (-gen-argbuf-hw-elm): Delete.
2711 (-gen-argbuf-fields-union): Generate structs for each sbuf instead
2713 (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
2714 (-gen-extract-decls): Delete.
2715 (<hardware-base>,gen-extract,gen-trace-extract): Move here from
2717 (<hw-register,gen-extract,gen-trace-extract): Ditto.
2718 (<hw-address,gen-extract,gen-trace-extract): Ditto.
2719 (-gen-op-extract,-gen-op-trace-extract): New procs.
2720 (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
2721 gen-sfmt-argvars-foo and rewrite.
2722 (-gen-record-args): Rewrite.
2723 (-gen-extract-case): Tweak.
2725 * cgen-gh.c (gh_putc,gh_puts): New functions.
2726 * cgen-gh.h (gh_putc,gh_puts): Declare them.
2727 * cos.c (_object_print_elms,_object_print): Use them.
2728 * hob-sup.c (fastcall_print): Use them.
2729 * configure.in: Check for scm_gen_puts, scm_puts.
2730 * config.in: Rebuild.
2731 * configure: Rebuild.
2732 * aclocal.m4: Rebuild.
2733 * Makefile.in: Rebuild.
2735 * dev.scm (load-opc): Use load instead of maybe-load.
2736 (load-gtest,load-sim,load-stest): Ditto.
2739 1999-07-23 Doug Evans <devans@casey.cygnus.com>
2741 * sid-cpu.scm (-gen-sem-switch-engine): Move definition of `count'
2742 up to avoid g++ 'goto crosses initialization' warning.
2743 (-gen-sfrag-engine-fn): Delete vpc arg to NEXT_FRAG.
2744 (-gen-sfrag-case): Update use of NEXT_FRAG.
2746 1999-07-22 Doug Evans <devans@casey.cygnus.com>
2748 * cos.c (cos_init): Protect _make_x_symbol from garbage collection.
2750 * read.scm: Load sem-frags.scm.
2751 * sem-frags.scm (*): Lots rewritten.
2752 * sid.scm (-with-sem-frags?): New global
2753 (with-sem-frags?): New proc.
2754 (option-init!): Initialize -with-sem-frags?.
2755 (option-set!): Recognize with-sem-frags.
2756 (sim-init!): Call sim-sfrag-init! if with-sem-frags.
2757 * sid-cpu.scm (cgen-sem-switch.cxx): Generate semantic frag version
2759 (-gen-sfrag-engine-decls): New proc.
2760 (-gen-sfrag-code,-gen-sfrag-case,-gen-sfrag-enum-decl): New procs.
2761 (-gen-sfrag-engine-frag-table,-gen-sfrag-engine-fn): New procs.
2762 (-gen-sfrag-engine): New proc.
2763 (-gen-sem-case): Emit setup-semantics if specified.
2764 (-gen-sem-switch-engine): Update init/use of computed goto label.
2765 * sid-decode.scm (-gen-decode-expr-entry): Fetch ifield values
2767 (-gen-idesc-decls): Replace sem_address with cgoto.
2768 (-gen-scache-decls): Rewrite definition of `execute' member.
2769 * arm.cpu (arm isa): Enable decode-splits.
2770 * arm7.cpu (multiply insns): Rename result to mul-result.
2772 Rename decode-specialize to decode-split.
2773 * decode.scm (*): Update.
2774 * insn.scm (*): Update.
2775 * mach.scm (*): Update.
2776 * sid.scm (*): Update.
2778 1999-07-19 Doug Evans <devans@casey.cygnus.com>
2780 Record objects as a smob.
2781 * cos.c (scm_tc16_object): New static global.
2782 (cos_init): Initialize it.
2783 (OBJECT_P,OBJECT_ELEMENTS,OBJECT_CLASS_DESC): Update macros.
2784 (OBJECT_CLASS,OBJECT_ELEMENT_OFFSET): Update.
2785 (_object_tag): Delete.
2786 (_object_make_smob): New function.
2787 (_object_make_x,_object_make_with_values_x): Rewrite.
2788 (_object_elements,_object_class_desc): Rewrite.
2789 (_object_copy,object_p): Rewrite.
2790 (_object_specialize): Rewrite.
2791 (_object_print_elms,_object_print): New functions.
2792 (object_smob): New static global.
2793 (default_make_x): Use OBJECT_ELEMENT_OFFSET instead of magic number.
2795 * cos.c (_make_x_symbol): New static global.
2796 (object_make): Use it.
2797 (cos_init): Initialize it.
2799 1999-07-15 Doug Evans <devans@casey.cygnus.com>
2801 * rtl-c.scm (ifield): Back out last patch, use estate-ifield-var?
2802 instead to determine whether to use FLD macro.
2803 (<rtl-c-eval-state>): New member ifield-var?.
2804 (<rtl-c-eval-state>,vmake!): Recognize #:ifield-var?.
2805 * utils-gen.scm (-gen-ifld-extract-base): Specify #:ifield-var? #f.
2806 (-gen-ifld-extract-beyond,gen-multi-ifld-extract): Ditto.
2808 * rtl.scm (rtx-sequence-assq-locals): New proc.
2810 * cos.scm (-object-error): Don't crash on non-objects.
2812 * Makefile.am (CLEANFILES): Add hobbit.
2813 * Makefile.in: Rebuild.
2815 * rtl-c.scm (s-c-call): Delete unnecessary code.
2817 1999-07-14 Doug Evans <devans@casey.cygnus.com>
2819 * rtl-c.scm (ifield): Always reference value via `FLD'.
2821 * cos.c (elm_bound_p): Return problem SCM boolean values.
2823 * utils-cgen.scm (display-argv): New proc.
2824 * cgen-opc.scm (cgen): Call it.
2825 * cgen-sim.scm (cgen): Ditto.
2826 * cgen-gas.scm (cgen): Ditto.
2827 * cgen-stest.scm (cgen): Ditto.
2828 * cgen-sid.scm (cgen): Ditto.
2830 1999-07-05 Doug Evans <devans@casey.cygnus.com>
2832 * opc-asmdis.scm (-gen-parse-switch): New local var `junk'.
2833 * opc-ibld.scm (-gen-insert-switch): Initialize result to NULL.
2834 (-gen-extract-switch): Initialize result to 1.
2835 * opcodes.scm (gen-ifield-default-type): New proc.
2836 (gen-ifield-value-decl): Renamed from gen-ifield-type. All callers
2838 (<hw-index>,gen-insert): Handle non-ifield indices.
2839 (<hw-index>,gen-extract): Ditto.
2840 (<hw-asm>,gen-parse): Ditto.
2841 (<hw-asm>,gen-print): Ditto.
2842 (<keyword>,gen-parse): Ditto.
2843 (<keyword>,gen-print): Ditto.
2844 (<operand>,gen-fget): Ditto.
2845 (<operand>,gen-fset): Ditto.
2847 * sim.scm (-gen-hw-index-raw): Handle scalar indices.
2848 (-gen-hw-index): Ditto.
2849 * sid.scm (-gen-hw-index-raw): Handle scalar indices.
2850 (-gen-hw-index): Ditto.
2852 * sem-frags.scm: New file.
2854 * attr.scm (attr-parse): Add better checking of input.
2856 * hardware.scm (-hw-parse-getter): Renamed from -hw-parse-get.
2858 (-hw-parse-setter): Renamed from -hw-parse-set. All uses updated.
2860 * ifield.scm (ifld-nil?): New proc.
2862 * operand.scm (<operand>): New members getter,setter.
2863 (<operand>,make!): New args getter,setter. All uses updated.
2864 (op:getter,op:setter): New procs.
2865 (<hw-index>,field-start): Return 0 for non-ifield indices.
2866 (<hw-index>,field-length): Return 0 for non-ifield indices.
2867 (-operand-parse-getter,-operand-parse-setter): New procs.
2868 (-operand-parse): New args getter,setter. All callers updated.
2869 Always use hw-index-scalar for scalar operands.
2870 (-operand-read): Handle getter,setter.
2871 (define-full-operand): New args getter,setter. All uses updated.
2872 * semantics.scm (-build-ifield-operand!): Update.
2873 (-build-index-of-operand!): Update.
2874 * sim.scm (<operand>,cxmake-get): If operand has getter, use it.
2875 * simplify.inc (define-normal-operand): Update.
2877 * rtl.scm (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
2878 * rtl-c.scm (s-unop): Indirect fp ops through fpu op vector.
2879 (s-binop,s-cmpop,s-convop): Ditto.
2880 (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
2881 * sparc.cpu (insn-fmt2): Add FPOPS1,FPOPS2.
2882 (fcc-tests): New insn-enum.
2883 (fcc-value): Rename from fcc-type.
2884 * sparcfpu.cpu: New file. All fp support moved here.
2886 * rtl.scm (<rtx-func>): New member class.
2887 (rtx-class-*?): New procs.
2888 (def-rtx-node): New arg class. All callers updated.
2889 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-dual-node): Ditto.
2890 * rtx-funcs.scm (*): Specify class.
2892 * utils-cgen.scm (context-make-reader): New proc.
2894 * utils.scm (assert-fail-msg): New variable.
2896 (list-drop,list-tail-drop): New procs.
2898 1999-06-22 Doug Evans <devans@casey.cygnus.com>
2900 * desc-cpu.scm (-gen-hash-defines): Restore generation of
2901 CGEN_MIN_INSN_SIZE deleted on March 22.
2903 * ifield.scm (<ifield>,needed-iflds): New method.
2904 (<multi-ifield>,needed-iflds): New method.
2905 (ifld-needed-iflds): New proc.
2906 (multi-ifield?): New proc.
2907 * iformat.scm (<sfmt>): Delete member ifmt. New members length,iflds.
2908 (-sfmt-search-key): Include insn length in key.
2909 (-sfmt-order-iflds,-sfmt-used-iflds): New procs.
2910 (<fmt-desc>): Delete members ifmt-key,sfmt-key. New member used-iflds.
2911 (-ifmt-lookup-ifmt!): Compute key here.
2912 (-ifmt-lookup-sfmt!): Compute key here. Delete arg ifmt.
2913 All callers updated.
2914 (ifmt-build): Delete arg desc. New args search-key,iflds.
2915 All callers updated.
2916 (sfmt-build): Delete args desc,ifmt. New args search-key,cti?,
2917 in-ops,out-ops,sorted-used-iflds. All callers updated.
2918 * minsn.scm (minsn-make-alias): Use insn-set-ifmt!. Update call
2920 * operand.scm (op-iflds-used): New proc.
2921 * utils-gen.scm (gen-ifld-type): Move here from sim.scm
2923 And from sid.scm,sid-cpu.scm as well.
2924 (gen-ifld-extract-decl,-gen-ifld-extract-base): Ditto.
2925 (-gen-extract-word,-gen-ifld-extract-beyond): Ditto.
2926 (gen-ifld-extract,gen-multi-ifld-extract): Ditto.
2927 (gen-extracted-ifld-value): Ditto.
2928 (-extract-chunk-specs): Ditto.
2929 (gen-define-ifields,gen-define-ifmt-ifields): Ditto.
2930 (-extract-chunk,-gen-extract-beyond-var-list): Ditto.
2931 (gen-extract-ifields,gen-extract-ifmt-ifields): Ditto.
2932 (-extract-insert-subfields): New function.
2933 * sim.scm (gen-record-argbuf-ifld): Renamed from gen-ifld-extract.
2934 (gen-record-argvar-ifld): Renamed from gen-ifld-extract-argvar.
2935 * sim-cpu.scm (-gen-extract-ifmt-macro): Replace calls to
2936 gen-define-ifields with gen-define-ifmt-ifields. Ditto for
2938 (-gen-no-scache-semantic-fn): Ditto.
2939 (-gen-sem-case): Ditto.
2940 (-gen-read-case): Update calls to gen-define-ifields,
2941 gen-extract-ifields.
2942 * sim-decode.scm (-gen-record-args): Update.
2943 (-gen-sfmt-argvars-assigns): Update.
2944 (-gen-extract-case): Update.
2945 * sim-model.scm (-gen-model-insn-fn): Replace calls to
2946 gen-define-ifields with gen-define-ifmt-ifields. Ditto for
2948 * sid.scm (gen-ifld-argbuf-defn): Use gen-ifld-type.
2949 (gen-record-argbuf-ifld): Rename from gen-ifld-extract.
2950 (gen-record-argvar-ifld): Rename from gen-ifld-extract-argvar.
2951 * sid-decode.scm (-gen-decode-expr-entry): Update calls to
2952 gen-define-ifields, gen-extract-ifields.
2953 (-gen-record-args): Update.
2954 (gen-sfmt-argvars-assigns): Update.
2955 (-gen-extract-case): Replace calls to gen-define-ifmt-ifields
2956 with gen-define-ifields. Ditto for gen-extract-foo.
2957 (-gen-decode-fn): Use gen-ifld-extract-decl/gen-ifld-extract
2958 procs rather than method calls.
2960 1999-06-18 Doug Evans <devans@casey.cygnus.com>
2962 * sid.scm (-create-virtual-insns!): New local `context', pass it
2965 * rtl.scm (-rtx-traverse): Output symbol shortcuts in source form,
2966 (operand name) not (operand object), (local name) not (local object).
2967 (rtx-traverse-with-locals): New proc.
2968 (-compile-expr-fn): New proc.
2969 (rtx-compile): Rewrite.
2970 * rtl-c.scm (rtl-c-get): Handle operand/local names for src arg.
2971 (rtl-c-set-quiet): Don't accept operand/local names for dest arg.
2972 (rtl-c-set-trace): Ditto.
2973 (operand define-fn): Recognize operand name argument.
2974 (local define-fn): Recognize sequence temp name argument.
2975 * rtx-funcs.scm (operand): Argument is operand name, not object,
2976 so call current-op-lookup.
2977 (local): Similarily, so call rtx-temp-lookup.
2979 * rtl.scm (rtx-field?): Use rtx-name instead of car.
2980 (rtx-operand?): Ditto.
2981 (rtx-pretty-name): Ditto.
2982 (rtx-local-obj): Flag symbol argument as an error.
2983 (rtx-local-name): New proc.
2984 (rtx-sequence-locals,rtx-sequence-exprs): New procs.
2986 * rtl.scm (-rtx-traverse-operands): Fix debugging output of arg-types.
2988 * read.scm (debug-repl): Renamed from -debug-repl. All callers
2991 * arm7.cpu (do-word/byte-store): Use (trunc: QI rd) rather than
2994 * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall4, fastcall6.
2995 (*floats-s->c-fun-table*): Ditto.
2996 * hobbit.c,hobbit.h: Rebuild.
2997 * rtl.scm (-rtx-traverse-expr): Use fastcall6.
2998 * semantics.scm (rtx-simplify): Use /fastcall-make.
3000 * iformat.scm (-sfmt-search-key): Don't include memory modes.
3002 * insn.scm (<insn>): Delete members condition, compiled-condition.
3003 (<insn>,make!): Update
3004 (<insn> getters,setters): Update.
3005 (-insn-parse,insn-read,define-full-insn): Update.
3006 * minsn.scm (minsn-make-alias): Update.
3007 * iformat.scm (ifmt-analyze): Delete insn-condition reference.
3008 (ifmt-compute!): Ditto.
3009 * sim.scm (sim-finish!): Update.
3010 * simplify.inc: (define-normal-insn): Update.
3011 * sid-cpu.scm (gen-semantic-code): Update.
3013 * iformat.scm (-ifmt-lookup-ifmt!): Use insn-set-ifmt!.
3014 (-ifmt-lookup-sfmt!): Use insn-set-sfmt!.
3015 (ifmt-compute!): Ditto.
3017 1999-06-16 Doug Evans <devans@casey.cygnus.com>
3019 * minsn.scm (minsn-compute-iflds): Print better error message for
3022 1999-06-12 Doug Evans <devans@casey.cygnus.com>
3024 * rtl.scm (tstate->estate): Don't copy over expr-fn.
3026 * Makefile.am (HOBFLAGS): New variable.
3027 (cgen-hob.c): Use it.
3029 (libcpu_a_SOURCES): Add hob-sup.c.
3030 (hob-sup.o): New rule.
3031 * Makefile.in: Rebuild.
3032 * cgen.c: #include hob-sup.h.
3033 (cgen_init_c): Call hobbit_init_support.
3034 * hobbit.scm (*fastcall-make*,*c-symbol*): New variables.
3035 (*special-scm->c-functions*): Add them.
3036 (display-c-expression): Handle *c-symbol*.
3037 (*reckless-s->c-fun-table*): Add *fastcall-make*, fastcall5.
3038 (*floats-s->c-fun-table*): Ditto.
3039 (normalize): Recognize /fastcall-make.
3040 (normalize-fastcall-make): New proc.
3041 * hobbit.c,hobbit.h: Rebuild.
3042 * hob-sup.scm: New file.
3043 * hob-sup.c: New file.
3044 * hob-sup.h: New file.
3045 * read.scm: Load hob-sup.scm.
3046 * rtl.scm (-rtx-name-list): New variable.
3047 (rtx-name-list): New proc.
3048 (rtx-lookup): Try symbol first.
3049 (def-rtx-node): Add name to -rtx-name-list.
3050 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
3051 (-rtx-traverse-anymode): New proc.
3052 (-rtx-traverse-{emode,intmode,floatmode,nummode,vmmode}): New procs.
3053 (-rtx-traverse-{rtx,setrtx,testrtx,condrtx,casertx}): New procs.
3054 (-rtx-traverse-{locals,env,attrs,symbol,string,number}): New procs.
3055 (-rtx-traverse-{symornum,object}): New procs.
3056 (-rtx-make-traverse-table): Rewrite.
3057 (-rtx-traverse-operands): Rewrite arg-types handling.
3058 Handle #f result of traverser.
3059 (-rtx-traverse): Renamed from -rtx-traverse-normal.
3060 Move debug handling here.
3061 (-rtx-traverse-debug): Delete.
3062 (rtl-finish!): Change -rtx-traverse-table into list of handlers
3064 * semantics.scm (semantic-compile:process-expr!): Fix call to
3066 * utils.scm (map1-improper): New proc.
3068 1999-06-08 Doug Evans <devans@casey.cygnus.com>
3070 * arm.sim (h-tbit): Replace FUN-ACCESS with FUN-SET.
3072 * sid.scm (-hw-cxmake-get): s/FUN-ACCESS/FUN-GET/.
3073 (-hw-gen-set-quiet): s/FUN-ACCESS/FUN-SET/.
3074 (<operand>,cxmake-get): Tweak.
3075 (sim-finish!): Delete FUN-ACCESS attribute. Create FUN-GET,FUN_SET.
3077 1999-06-07 Doug Evans <devans@casey.cygnus.com>
3079 * thumb.cpu (dnti): Delete timing spec.
3082 * arm.cpu (arm isa): New fields condition, setup-semantics.
3083 (thumb isa): New field setup-semantics.
3084 (h-gr): Add attribute CACHE-ADDR.
3085 * arm7.cpu (dnai): Delete condition.
3086 (eval-cond): Delete.
3088 * mach.scm (<isa>): New member setup-semantics.
3089 (-isa-parse-setup-semantics): New proc.
3090 (-isa-parse): New arg setup-semantics.
3091 (-isa-read): Recognize setup-semantics.
3093 * sid-cpu.scm (gen-extract-fields): Split into two:
3094 gen-extract-ifields, gen-extract-ifmt-ifields.
3095 (-gen-scache-semantic-fn): Delete `taken_p'. Delete
3096 tracing begin/end messages (done by caller now).
3097 (-gen-sem-case): Delete `taken_p'. Add npc,br_status. Delete
3098 tracing begin/end messages (done by x-before,x-after virtual insns).
3099 (-gen-sem-switch-engine): Redo vpc initialization. Save vpc at
3100 end so don't have to look it up again next time.
3101 * sid-decode.scm (-decode-expr-ifield-values): New proc.
3102 (-decode-expr-ifield-tracking-key): New proc.
3103 (-decode-expr-ifield-tracking): New proc.
3104 (-decode-expr-ifield-values-used): New proc.
3105 (-decode-expr-ifield-mark-used!): New proc.
3106 (-gen-decode-expr-set-itype): New proc.
3107 (-gen-decode-expr-entry): Rewrite.
3108 (-gen-decode-table-entry): New proc.
3109 (-gen-decoder-switch): Use it.
3110 (-gen-virtual-insn-finder): New proc.
3111 (-gen-argbuf-elm): Move here from sid.scm.
3112 (-gen-argbuf-hw-elm): Ditto.
3113 (-gen-argbuf-fields-union): Add entries for chain,before insns.
3114 (-gen-scache-decls): Add `cond' member to @prefix@_scache for
3115 conditional-execution isas.
3116 (-gen-decode-fn): Record conditional-exec ifield.
3117 * sid.scm (-current-pbb-engine?): New global.
3118 (current-pbb-engine?,set-current-pbb-engine?!): New procs.
3119 (<ifield>,gen-ifld-extract): New arg `indent'.
3120 (<multi-ifield>,gen-ifld-extract): Ditto.
3121 (-hw-gen-set-quiet-pc): Add pbb support. Delete `taken_p'.
3122 (-op-gen-set-trace): Don't print tracing messages for pbb engine.
3123 (-gen-arch-model-decls): Only scan real insns.
3124 (scache-engine-insns,pbb-engine-insns): New procs.
3125 (-create-virtual-insns!): New proc.
3126 (sim-finish!): Call it.
3127 (-decode-specialize-insn?): New proc.
3128 (-decode-specialize-build-assertion): New proc.
3129 (-decode-specialize-insn-1): New proc.
3130 (-decode-specialize-insn): New proc.
3131 (-fill-sim-insn-list!): New proc.
3132 (sim-analyze!): Create copies of insns to be specialized.
3133 * utils-cgen.scm (obj-set-name!): New proc.
3135 * attr.scm (-attr-eval): Rewrite calls to rtx-simplify/rtx-compile.
3136 * iformat.scm (ifmt-analyze): Pass `insn' to semantic-compile,
3138 (ifmt-compute!): Delete arg `arch'. Result is list of iformats,
3140 * mach.scm (arch-analyze-insns!): Update call to ifmt-compute!.
3141 * rtl-c.scm (rtl-c-get): Use DM for default mode instead of VM.
3142 Avoid infinite loop when rtx-eval-with-estate leaves expr alone.
3143 (attr): Rewrite test for insn owner.
3144 (member): New rtx function.
3145 * rtl.scm (rtx-* accessors): Define as cxr directly rather than
3146 as separate function.
3147 (rtx-ifield?,rtx-ifield-name): New procs.
3148 (rtx-operand-obj): Rewrite.
3149 (rtx-operand-name): New proc.
3150 (rtx-cmp-op-mode,rtx-cmp-op-arg): New procs.
3151 (rtx-number-list-values,rtx-member-value,rtx-member-set): New procs.
3152 (tstate-make): New args owner, known. All callers updated.
3153 (tstate-known-lookup): New proc.
3154 (rtx-traverse): New arg owner. All callers updated.
3155 (rtx-make-bool): New proc.
3156 (rtl-find-ifields): Rewrite.
3157 (rtx-simplify,rtx-simplify-eq-attr-{insn,mach}): Moved to ...
3158 * semantics.scm: ... here.
3159 (rtx-const-equal,rtx-const-list-equal): New procs.
3160 (-build-known-values): New proc.
3161 (semantic-compile): New arg `insn'. Call rtx-simplify.
3162 (semantic-attrs): Ditto.
3163 * rtx-funcs.scm (member,number-list): New rtx functions.
3165 * attr.scm (attr-remove-meta-attrs-alist): Delete leading '-' in name.
3166 Rewrite. Delete arg `all-attrs'. All callers updated.
3167 (attr-remove-meta-attrs): Delete leading '-' in name. All callers
3169 * utils-cgen.scm (gen-bool-attrs): Remove meta attrs.
3171 * decode.scm (subdtable-add): Handle `expr' entries.
3172 (exprtable-entry-make): Use vector. Record ifields refered to by expr.
3173 (exprtable-entry-*): Update.
3174 (exprtable-entry-iflds): New proc.
3175 (exprentry-cost): New proc.
3176 (exprtable-sort,-gen-exprtable-name): New procs.
3177 (exprtable-make): New arg `name'. All callers updated. use vector.
3178 (exprtable-*): Update.
3179 (-build-decode-table-entry): Don't issue collision warning if all are
3180 specialized insns. Sort exprtable entries before building table.
3182 * read.scm (-reader-process-expanded-1): Move pretty printing of
3183 input to logging level 4.
3185 * utils.scm (string-list->string): New proc.
3187 * insn.scm (<insn>): Define setters for ifield-assertion, condition,
3189 (insn-read): Delete leading '-' in name. All callers updated.
3190 (real-insn?): New proc.
3191 (real-insns): Rewrite.
3192 (insn-has-ifield?): New proc.
3193 (insn-builtin!): Create insn attribute SPECIALIZED.
3195 * mach.scm (<arch>): Delete member app-data.
3196 (current-raw-insn-list): New proc.
3197 (insn-list-car,insn-list-splice!): New procs.
3198 (<decode-specialize>): New class.
3199 (-isa-parse-decode-specialize): New proc.
3200 (-isa-parse-decode-specializes): New proc.
3201 (<isa>): New members `condition', `decode-specializes'.
3202 (-isa-parse-condition): New proc.
3203 (-isa-parse): New args condition, decode-specializes.
3204 (-isa-read): Recognize condition, decode-specializes.
3205 (-isa-add-decode-specialize!): New proc.
3206 (modify-isa): New proc.
3207 (isa-conditional-exec?,state-conditional-exec?): New procs.
3208 (arch-init!): New reader command `modify-isa'.
3210 * mode.scm (mode-class-signed?,mode-class-unsigned?): New procs.
3211 (mode-signed,mode-unsigned?): New procs.
3213 Thu Jun 3 16:00:40 1999 Doug Evans <devans@canuck.cygnus.com>
3215 * types.scm (<array>): New method get-shape.
3216 * hardware.scm (<hardware-base>): Forward get-shape,get-num-elms
3218 (hw-shape,hw-num-elms): New procs.
3219 * sim.scm (<hw-register>,gen-profile-index-type): Use "unsigned short"
3220 if there's more than 255 registers.
3221 * sid.scm (<hw-register>,gen-profile-index-type): Ditto.
3223 * hardware.scm (-hw-parse): Flag as error CACHE-ADDR specified
3226 1999-05-21 Doug Evans <devans@casey.cygnus.com>
3228 * cgen-sid.scm (sim-arguments): Add -X.
3229 * sid-cpu.scm (-gen-hardware-types): Comment out scache vars.
3230 (-gen-all-semantic-fns): Don't include PBB support virtual insns.
3231 (-gen-sem-case): Use CASE/NEXT macros again. Tweak indenting.
3232 Simplify by supporting pbb engine only.
3233 (-gen-sem-switch-init): New proc.
3234 (-gen-sem-switch-engine): Rename from -gen-sem-switch-fn.
3235 (cgen-sem-switch.cxx): New proc.
3236 * sid-decode.scm (-gen-decode-insn-globals): Replace with-sem-switch?
3237 with with-pbb?. Support dual scache/pbb engines.
3238 (-gen-idesc-decls): Replace with-sem-switch? with with-pbb?.
3239 Support dual scache/pbb engines.
3240 (cgen-decode.h): Generate semantic fn decls if with-scache?.
3241 * sid.scm (*) with-pbb? replaces with-sem-switch?.
3242 (sim-finish!): Create pbb support virtual insns if with-pbb?.
3244 1999-05-10 Ben Elliston <bje@cygnus.com>
3246 * arm7.cpu: Remove coprocessor related fields, operands and insn
3247 definitions for now. Take the undefined instruction trap instead.
3248 (ldmda-wb): New instruction.
3249 (ldmib-wb): Likewise.
3250 (ldmdb-wb): Likewise.
3251 (stmdb-wb): Likewise.
3252 (stmib-wb): Likewise.
3253 (stmda-wb): Likewise.
3255 1999-05-08 Doug Evans <devans@casey.cygnus.com>
3257 * sid.scm (<hw-memory>,cxmake-get): Call GETMEM method, not function.
3258 (<hw-memory>,gen-set-quiet): Call SETMEM method, not function.
3260 * utils-cgen.scm (keyword-list->arg-list): Fix call to substring,
3261 hobbit can't handle optional third arg.
3263 1999-05-07 Doug Evans <devans@casey.cygnus.com>
3265 * arm.cpu (h-tbit): Delete set spec.
3266 (h-mbits): Don't call arm_mbits_set in set spec.
3267 * arm.sim: New file.
3268 * hardware.scm (modify-hardware): New proc.
3269 (hardware-init!): Add modify-hardware command.
3270 * sid.scm (-hw-cxmake-get): Use method call if FUN-ACCESS specified.
3271 (-hw-gen-set-quiet): Ditto.
3272 (sim-finish!): Call invalid_insn method. Define FUN-ACCESS builtin
3273 hardware attribute. Load $arch.sim file if present.
3274 * utils-cgen.scm (keyword-list?): New proc.
3275 (keyword-list->arg-list,arg-list-validate-name): New procs.
3276 (arg-list-check-no-args,arg-list-symbol-arg): New procs.
3278 * arm7.cpu (eval-cond): Pass pc to @cpu@_eval_cond handler.
3280 * sid-cpu.scm (-gen-hardware-types): Rename @cpu@_cpu to
3283 * attr.scm (obj-prepend-atlist!): New proc.
3285 * opc-opinst.scm (cgen-opinst.c): Analyze instructions if necessary.
3287 * sid.scm (<operand>,profilable?): Use op:type.
3288 * sim.scm (<operand>,profilable?): Use op:type.
3290 1999-05-04 Doug Evans <devans@casey.cygnus.com>
3292 * utils.scm (find-index,find): Be more stack friendly.
3294 * arm7.cpu (arith-imm-op): Compute pc before setting cpsr.
3297 1999-05-01 Doug Evans <devans@casey.cygnus.com>
3299 * arm.cpu (h-gr-usr): New hardware element.
3300 (h-gr-fiq,h-gr-svc,h-gr-abt,h-gr-irq,h-gr-und): New hardware elements.
3301 (arm-mode): New keyword.
3302 (h-mbits): Add set spec.
3303 (h-spsr): Implement get/set specs.
3305 * read.scm: Load slib/pp.scm, slib/genwrite.scm.
3306 (-reader-process-expanded-1): Pretty print logging output.
3308 * sid-cpu.scm (-gen-reg-access-defns): Make getters `const'.
3309 (cgen-cpu.h): Print enums before hardware elements.
3310 (cgen-semantics.cxx): @arch@-cgen.h renamed to @arch@-main.h.
3311 * sid-decode.scm (cgen-decode.cxx): Ditto.
3312 * sid-model.scm (cgen-model.cxx): Ditto.
3314 * utils-cgen.scm (context-error): Accept variable number of
3317 * rtx-funcs.scm (error:): New rtx function.
3318 * rtl-c.scm (s-case-vm): New proc.
3319 (-gen-non-vm-case-get,s-case-non-vm): New procs.
3320 (s-case): Simplify, handle non-VM result.
3321 (error:): New rtx function.
3323 1999-04-30 Doug Evans <devans@casey.cygnus.com>
3325 * arm.cpu (h-pc): Add set spec to zero bottom bits.
3326 (test-hi,test-ls): Fix cbit handling.
3327 (shift-type,h-operand2-shifttype): Move here ...
3328 * arm7.cpu: ... from here.
3329 (set-cond,set-cond-maybe,dnix): Delete, unused.
3330 (set-zn-flags,set-logical-cc,set-add-flags,set-sub-flags): Move ...
3331 * arm.cpu: ... to here.
3332 * thumb.cpu (cmp,alu-cmp): Use set-sub-flags.
3333 (alu-cmn): Use set-add-flags.
3334 (alu-tst): Use set-zn-flags.
3335 (alu-cmp): Use set-sub-flags.
3336 (lsl,lsr,asr): Set condition codes.
3337 (add,addi,sub,subi,mov,addi8,subi8): Ditto.
3338 (alu-op): Split into three: alu-logical-op,alu-arith-op,
3340 (hireg-op): Split sem-fn into lo-dest-sem-fn,hi-dest-sem-fn.
3341 All callers updated.
3342 (sub-sp): Rename from add-sp-neg.
3343 (f-lbwl-offset): Delete.
3344 (f-lbwl-hi,f-lbwl-lo): New ifields.
3345 (lbwl-hi,lbwl-lo): Update.
3346 (bl-hi): Add 4 to pc.
3347 (push-reg,pop-reg): Simplify.
3348 (push,push-lr): Push registers in correct order.
3349 (pop,pop-pc): Pop registers in correct order.
3350 (save-reg-inc,load-reg-inc): Simplify.
3351 (ldmia): Save registers in correct order.
3353 1999-04-30 Ben Elliston <bje@cygnus.com>
3355 * arm7.cpu (f-op-hdt): Remove; unused.
3356 (f-ror-imm8-value,f-ror-imm-rotate): New fields.
3357 (f-ror-imm8): New multi-ifield.
3358 (f-operand2-bit7): Remove; use the generic `f-bit7' instead. All
3360 (f-uimm12): New field.
3361 (ror-imm8): New operand.
3363 (hdt-offset8): Reinstate operand.
3364 (offset4-hi,offset4-lo): Remove.
3365 (set-cond): Remove macro; unused.
3366 (set-cond-maybe): Likewise.
3367 (load-word/byte): Use uimm12 operand for a true 12-bit immediate.
3368 (store-word/byte): Likewise.
3369 (load-halfword): Use hdt-offset8 multifield operand instead of two
3370 4-bit operands that are explicitly combined by semantic code.
3371 (do-halfword-store): Bug fix. Set address when not preindexing.
3372 (store-halfword): Also use hdt-offset8 operand.
3373 (arith-op): Avoid clobbering source registers when one of them is
3374 the destination register.
3375 (arith-imm-op): Likewise.
3376 (tst-imm): Use ror-imm8 operand. Handle special case of rot 0.
3377 (teq-imm): Likewise.
3378 (ldm-p): Rename to ldmdb.
3379 (stm-pw): Rename to stmdb-wb.
3380 (multi-action): New macro; test reg-list bits and execute a
3381 semantic fn if the bit is set.
3382 (ldmda,ldmib,ldmia,ldmia-wb,ldmdb): New multiple load insns.
3383 (stmdb,stmib,stmia,stmia-wb,stmda,stmdb-wb): Store insns.
3384 (all insns): Use dnai entries for simplicity rather than dni.
3385 (*): Use short-form of (const ..).
3387 1999-04-29 Doug Evans <devans@casey.cygnus.com>
3389 * rtl.scm (<rtx-func>): Rename member type to style. Rename
3390 member eval to evaluator.
3391 (rtx-foo accessors): Rename from rtx:foo. All callers updated.
3392 (tstate-make): Delete arg op-fn. All callers updated.
3393 (tstate-op-fn,tstate-set-op-fn!): Delete.
3394 (rtx-traverse): Delete op-fn arg. All callers updated.
3395 * semantics.scm (-simplify-for-compilation-process-expr): New proc,
3396 split out of -simplify-for-compilation.
3398 * Makefile.am (CGEN_NONHOB_FILES,CGENFILES): New variables.
3399 (cgen_DEPENDENCIES): Add stamp-cgen.
3400 (stamp-cgen): New rule.
3401 * Makefile.in: Rebuild.
3403 * rtl-c.scm (enum:): Define emitter for.
3404 * rtl.scm (rtx-constant?): Rename from rtx-const? and check for
3406 (rtx-constant-value,rtx-enum-value): New procs.
3407 (-rtx-traverse-normal): Expand enum-value to (enum enum-value).
3408 (rtx-compile-time-constant?): Return #t for enums.
3409 (rtx-true?,rtx-false?): Handle enums.
3410 (rtx-simplify-eq-attr-mach): Use rtx-true,rtx-false instead of
3411 building result by hand.
3412 (rtx-simplify-eq-attr-insn): Ditto.
3413 * rtx-funcs.scm (enum:,enum): New rtx functions.
3415 * mach.scm (<arch>): New members insns-analyzed?, semantics-analyzed?,
3417 (arch-analyze-insns!): New proc.
3418 * opcodes.scm (opcodes-analyze!): Call arch-analyze-insns! instead
3419 of calling ifmt-compute! directly.
3420 * sid.scm (-sim-insns-analyzed?): Delete.
3421 (sim-analyze!): Call arch-analyze-insns! instead of calling
3422 ifmt-compute! directly.
3423 * sim.scm (-sim-insns-analyzed?): Delete.
3424 (sim-analyze!): Call arch-analyze-insns! instead of calling
3425 ifmt-compute! directly.
3427 * utils.scm (string-take-with-filler): New proc.
3428 (string-take): Use it.
3430 * pgmr-tools.scm: New file.
3431 * read.scm: Load it.
3432 * insn.scm (pretty-print-insn-format): Move to pgmr.scm.
3434 * insn.scm (insn-base-mask): Renamed from insn:mask.
3435 All callers updated.
3436 (insn-base-mask-length): Renamed from insn:mask-length.
3437 All callers updated.
3438 (insn-foo): Renamed from insn:foo. All callers updated.
3439 * minsn.scm (minsn-foo): Renamed from minsn:foo. All callers updated.
3440 * iformat.scm (compute-insn-base-mask-length): Renamed from
3441 compute-insn-mask-length. All callers updated.
3442 (compute-insn-base-mask): Renamed from compute-insn-mask.
3443 All callers updated.
3445 * enum.scm (-enum-parse-prefix): New proc.
3446 (<enum>,make!): Don't parse enum values here.
3447 (-enum-parse): Do it here. Call -enum-parse-prefix.
3448 (define-full-insn-enum): Ditto.
3449 (enum-vals-upcase): New proc.
3450 * hardware.scm (define-keyword): Make enum prefix uppercase.
3451 * hobscmif.h (CHAR_LOWERP,CHAR_UPPERP,CHAR_WHITEP): New macros.
3453 * ifield.scm (<ifield>,field-mask): Allow container to be #f.
3454 (<ifield>,field-extract): New method.
3455 (<multi-ifield>,field-extract): New method.
3456 (ifld-extract): New proc.
3457 * opcodes.scm (ifld-insert-fn-name): Renamed from ifld-insert.
3458 (ifld-extract-fn-name): Renamed from ifld-extract.
3460 * ifield.scm (ifld-new-value): Renamed from ifield-make.
3461 All callers updated.
3463 * ifield.scm (ifld-lsb0?): New proc.
3464 (sort-ifield-list): New arg up?. All callers updated.
3465 * iformat.scm (compute-insn-mask): Get lsb0? flag from argument,
3466 rather than global state.
3468 1999-04-27 Doug Evans <devans@casey.cygnus.com>
3470 * insn.scm (pretty-print-insn-format): New proc.
3472 * Makefile.in: Rebuild.
3473 * aclocal.m4: Rebuild
3474 * configure: Rebuild.
3476 Mon Apr 26 10:30:18 1999 Doug Evans <devans@canuck.cygnus.com>
3478 * configure.in (AM_INIT_AUTOMAKE): Update version to 0.7.2.
3479 * configure: Rebuild.
3480 * aclocal.m4: Rebuild.
3481 * Makefile.in: Rebuild.
3482 * doc/Makefile.in: Rebuild.
3483 * doc/version.texi: Rebuild.
3485 1999-04-25 Doug Evans <devans@casey.cygnus.com>
3487 * utils.scm (bits->bools): New proc.
3489 1999-04-23 Doug Evans <devans@casey.cygnus.com>
3491 * sid.scm (<multi-ifield>,gen-ifld-extract-decl): Fix call to
3492 subfield's gen-ifld-extract-decl method.
3494 1999-04-23 Ben Elliston <bje@cygnus.com>
3496 * arm7.cpu (ldrsh-pu): Remove.
3497 (do-halfword-load): New pmacro.
3498 (load-halfword): Likewise.
3499 (do-halfword-store): Likewise.
3500 (store-halfword): Likewise.
3501 (strh-*): New instructions.
3502 (ldrsb-*): Likewise.
3504 (ldrsh-*): Likewise.
3506 1999-04-22 Doug Evans <devans@casey.cygnus.com>
3508 * ifield.scm (ifld-constant?): Delete special handling of RESERVED
3511 * arm7.cpu (do-word/byte-store): Fix typo.
3513 1999-04-22 Ben Elliston <bje@cygnus.com>
3515 * arm7.cpu (do-word/byte-load): Handle cases where the destination
3516 register is the program counter (R15).
3518 * arm7.cpu (do-word/byte-store,store-word/byte): New pmacros.
3519 (str-*): Implement using store-word-byte. Remove older versions.
3520 (bic): Use the `inv' rtx for obtaining bitwise complements.
3521 (bic-imm): Likewise.
3523 (mvn-imm): Likewise.
3524 (store-indev-reg): Remove crufty pmacro.
3525 (load-indiv-reg): Likewise.
3526 (ldm-p): Reverse the order of register processing for decrement.
3528 (stbi): Remove; handled by the str-* insns.
3530 1999-04-21 Doug Evans <devans@casey.cygnus.com>
3532 * thumb.cpu (cmp): Fix carry bit computation.
3535 1999-04-20 Doug Evans <devans@casey.cygnus.com>
3537 * arm.cpu (h-tbit): Specify set spec.
3539 * arm7.cpu (bx): Don't call C routine, just set h-tbit.
3540 (set-sub-flags): Interpret "carry bit" as a borrow.
3541 (all sub/cmp insns): Carry bit is actually a borrow bit.
3542 * thumb.cpu (bx-rs,bx-hs): Don't call C routine, just set h-tbit.
3543 (add-carry,sub-carry,thumb-neg,thumb-bic,thumb-inv): Delete. Use
3545 (hireg-add,hireg-cmp,hireg-move): Ditto.
3547 * read.scm (-CGEN-VERSION): Change version to 0.7.2.
3548 (-CGEN-LANG-VERSION): Ditto.
3550 1999-04-18 Doug Evans <devans@casey.cygnus.com>
3552 * pmacros.scm (-pmacro-make): New arg `default-values',
3553 all callers updated.
3554 (-pmacro-default-values): New proc.
3555 (-pmacro-process-keyworded-args): New proc.
3556 (-pmacro-process-args): New proc.
3557 (-pmacro-invoke): Process arguments before expanding macro.
3558 (-pmacro-get-arg-spec,-pmacro-get-default-values): New procs.
3559 (define-pmacro): Handle default values specified in arg list.
3560 * rtl.scm (rtx-alu-op-mode,rtx-alu-op-arg): New procs.
3561 (rtx-boolif-op-arg[01]): New procs.
3562 (rtx-true,rtx-false,rtx-canonical-bool): New procs.
3563 (rtx-simplify): Handle not,orif,andif.
3564 * semantics.scm (-simplify-for-compilation): Simplify not,orif,andif.
3565 * utils.scm (alist-copy): New proc.
3566 * arm7.cpu (do-word/byte-load,load-word/byte): New pmacros.
3568 (swi): Explicitly set pc.
3570 * thumb.cpu (bx-rs,bx-hs): Reverse test for switch to arm mode.
3572 1999-04-17 Ben Elliston <bje@cygnus.com>
3574 * arm7.cpu (ldr-pu): Do not add 8 to R15; the step() method
3575 correctly adjusts the program counter now.
3577 * arm7.cpu (f-halfword?): Rename from `f-hdt-halfword?'.
3578 (f-signed?): Rename from `f-hdt-signed?'.
3579 (f-offset4-hi): Rename from `h-hdt-off4-ms'.
3580 (f-offset4-lo): Rename from `h-hdt-off4-ls'.
3581 (f-hdt-offset8): Use new field names.
3582 (ldr): Use `imm12' field, not `offset12', since we do our own
3584 (str, str-*): Likewise.
3585 (ldu-*): Remove most; better not implemented than broken.
3587 (ldrsh-pu): New insn.
3591 (ldm-p): Likewise; replace (load-indiv-reg) version.
3593 1999-04-15 Doug Evans <devans@casey.cygnus.com>
3595 * arm.cpu (h-pc): Delete VIRTUAL attribute, get/set specs.
3596 * arm7.cpu (*): Fix mode of result of arm_compute_carry_out_*.
3597 (*): Explicitly specify mode in c-call.
3598 (logical-op): Recognize sets of h-gr[15] as sets of pc.
3600 (and-imm,orr-imm,xor-imm,mov-imm,bic-imm,mvn-imm): Ditto.
3601 (arith-imm-op): New pmacro.
3602 (add-imm,adc-imm,sub-imm,sbc-imm,rsb-imm,rsc-imm): Use it.
3603 * thumb.cpu (bx-rs,bx-hs): Rewrite.
3605 1999-04-14 Doug Evans <devans@casey.cygnus.com>
3607 * rtl.scm (rtx-simplify-eq-attr-insn): Fix call to context-error.
3609 * rtl.scm (rtl-find-ifields): Implement.
3611 * utils-gen.scm: New file.
3612 * read.scm: Load it.
3613 * desc.scm: Move generic attribute code to utils-gen.scm.
3614 * Makefile.am (CGEN_HOB_INPUT_FILES): Add it.
3615 * Makefile.in: Rebuild.
3617 * arm7.cpu (R15-OFFSET): New attribute.
3619 (logical-op): Delete arg `result?'. All callers updated. Use dnai.
3620 Delete use of eval-cond (dnai specifies it). Specify R15-OFFSET of 12
3621 for reg-shift version.
3623 (data processing insns): Reorganize. Use dnai.
3625 * attr.scm (attr-kind): New proc.
3626 (attr-list-enum-list): Rewrite.
3627 (-attr-sort): Split result into two lists, bools and non-bools.
3628 (current-attr-list-for): Update.
3630 * cgen-sid.scm (sim-arguments): Add -H -> build desc.h file.
3631 * sid-cpu.scm (-gen-attr-decls): New proc.
3632 (-gen-insn-attr-decls): New proc.
3633 (cgen-desc.h): New proc.
3634 (cgen-cpu.h): Put everything in @cpu@ namespace.
3635 (gen-parallel-exec-type): Change prefix of parexec struct from
3637 (-gen-trace-record-type): Ditto for trace_record struct.
3638 (-gen-write-case): Update.
3639 (-gen-scache-semantic-fn): Change function prefix from @cpu@ to
3640 @prefix@. Update scache struct references.
3641 (-gen-sem-case): Update scache struct references.
3642 (-gen-sem-switch-fn): Update idesc struct reference.
3643 Update insn_type enum reference.
3644 (cgen-write.cxx): Update scache,argbuf references.
3645 (cgen-semantics.cxx): Simplify namespace choice (always @cpu@).
3646 * sid-decode.scm (IDESC-TABLE-VAR): Change prefix of insn_data
3647 from @cpu@ to @prefix@.
3648 (-gen-decode-insn-entry): Use gen-cpu-insn-enum.
3649 (-gen-decode-expr-entry): Ditto. Change prefix of INSN_X_INVALID
3650 from @CPU@ to @PREFIX@.
3651 (-gen-decoder-switch): Change prefix of INSN_X_INVALID
3652 from @CPU@ to @PREFIX@.
3653 (-gen-decode-insn-globals): Generate insn attributes.
3654 (-gen-sem-fn-name): Change function prefix from @cpu@ to @prefix@.
3655 (-gen-sem-fn-decls): Use -gen-sem-fn-name. Add `using' for
3656 semantic fn typedef.
3657 (-gen-idesc-decls): Simplify cpu class name (always @cpu@_cpu).
3658 Change prefix of scache struct from @cpu@ to @prefix@.
3659 Change prefix of semantic fn typedef from @cpu@ to @prefix@.
3660 Change prefix of idesc struct from @cpu@ to @prefix@.
3661 Change prefix of insn_type enum from @cpu@ to @prefix@.
3662 (-gen-argbuf-fields-union): Change prefix of sem_fields union
3663 from @cpu@ to @prefix@.
3664 (-gen-scache-decls): Change prefix of scache struct from
3665 @cpu@ to @prefix@. Update idesc struct name.
3666 Update decode,execute methods.
3667 (-gen-extract-case): Update to type name changes.
3668 (-gen-decode-fn): Ditto.
3669 (cgen-decode.h): Put everything in @cpu@ namespace (except
3670 semantic fn decls). Change prefix of insn_word from @cpu@ to @prefix@.
3671 (cgen-decode.cxx): Add using namespace @cpu@.
3672 * sid-model.scm (-gen-hw-profile-decls): Change prefix of
3673 model_mark_get/set from @cpu@ to @prefix@.
3674 (gen-model-unit-fn-name): Change function prefix from @cpu@ to
3676 (gen-model-fn-decls): Update idesc struct name. Change prefix
3677 of model_insn_before/after from @cpu@ to @prefix@.
3678 (-gen-model-insn-fn): Update scache/idesc/argbuf struct names.
3679 Update insn_word type name.
3680 (-gen-model-timing-table): Update INSN_TIMING struct name.
3681 (-gen-model-init-fn): Update MODEL_DATA struct name.
3682 (-gen-mach-defns): Update name of init_idesc_table fn.
3683 (cgen-model.cxx): Add using namespace @cpu@.
3684 * sid.scm (gen-cpu-class): Delete.
3685 (gen-attr-type): New proc.
3686 (gen-obj-attr-sid-defn): New proc.
3687 (<operand>,gen-profile-code): Update name of model_mark_get/set fn.
3688 (gen-cpu-insn-enum-decl): Change prefix of insn_type enum from
3690 (gen-cpu-insn-enum): Update name of insn enum.
3691 * thumb.cpu (bx-rs): Rename @cpu@_do_bx to @prefix@_do_bx.
3693 (swi): Rename @cpu@_swi to @prefix@_swi.
3695 * decode.scm (-build-decode-table-entry): Remove heuristic for
3696 distinguishing insns, and use insn ifield-assertion specs.
3698 * desc-cpu.scm (gen-A-attr-mask): Simplify.
3699 (gen-ifld-defns): Boolean attributes begin at number 0 now.
3700 (gen-hw-table-defns,gen-operand-table,gen-insn-table): Ditto.
3701 * opc-itab.scm (-gen-macro-insn-table): Ditto.
3702 * utils-cgen.scm (gen-attr-enum-decl): Change type arg to prefix,
3703 all callers updated.
3704 (gen-attr-name): New proc
3705 (gen-attr-mask): Use it. Boolean attributes start at 0 now.
3706 (gen-obj-attr-defn): Delete num_nonbools count.
3708 * iformat.scm (ifmt-analyze): Handle insn-condition.
3709 (ifmt-compute!): Ditto.
3710 * insn.scm (<insn>): Specify default value for condition,
3711 post-cond-trap,compiled-condition,compiled-semantics.
3712 (<insn>,make!): New arg condition.
3713 (<insn>): Add getters for condition,compiled-condition.
3714 (-insn-parse): New arg condition, all callers updated.
3715 (-insn-read): Recognize condition spec.
3716 (define-full-insn): New arg condition.
3717 * minsn.scm (minsn-make-alias): Update call to (make <insn> ...).
3718 * semantics.scm (semantic-compile): Change arg sem-code to
3720 (semantic-attrs): Ditto.
3721 * sim.scm (sim-finish!): Update calls to define-full-insn.
3722 * simplify.inc (define-normal-insn): Update call to define-full-insn.
3723 * sid-cpu.scm (gen-semantic-code): Handle insn-condition.
3724 * sid.scm (sim-finish!): Update call to define-full-insn.
3726 Tue Apr 13 17:04:34 1999 Doug Evans <devans@canuck.cygnus.com>
3728 * Makefile.am (sim-cpu): Allow specification of ISA.
3729 * Makefile.in: Rebuild.
3731 Sun Apr 11 00:37:56 1999 Jim Wilson <wilson@cygnus.com>
3733 * i960.cpu (sll-expr, srl-expr, sra-expr): Handle large shift counts.
3735 1999-04-10 Doug Evans <devans@casey.cygnus.com>
3737 * sparccom.cpu (check-fp-enable): Wrap TRAP32_FP_DIS in c-code.
3739 * arm.cpu (gr-names): Put pc first so it gets prefered in disassembly.
3741 * attr.scm (atlist?): New proc.
3742 (-attr-eval): Rewrite.
3743 (attr-parse): New proc.
3744 (atlist-parse): Use it.
3746 * decode.scm (exprtable-entry-make): New proc.
3747 (exprtable-entry-insn,exprtable-entry-expr): New procs.
3748 (exprtable-make,exprtable-insns): New procs.
3750 * hardware.scm (hw-mode-ok?): Delete argument `set?'.
3752 (hardware-builtin!): Make h-memory a vector.
3754 * iformat.scm (ifmt-ifields): Renamed from ifmt-fields.
3755 All callers updated.
3756 (ifmt-analyze): Use csem-* accessors on result of semantic-compile.
3758 * insn.scm (<insn>). Rename ifld-assertions to ifield-assertion.
3760 (-insn-parse): Set semantics to #f if not specified.
3761 (define-insn,define-full-insn): Take out code that ignores ALIAS's
3763 (-parse-insn-format): Recognize `=' iformat spec.
3765 * mach.scm (isa-min-insn-bitsize): Ignore ALIAS's.
3766 (isa-max-insn-bitsize): Ditto.
3768 * opcodes.scm (<ifield>,gen-insert): Call rtl-c instead of
3770 (<ifield>,gen-extract): Ditto.
3771 (<multi-ifield>,gen-insert,gen-extract): Ditto.
3772 * sid-cpu.scm (-gen-reg-access-defns): Ditto.
3773 (gen-define-ifmt-ifields): New proc.
3774 (gen-semantic-code): Rewrite.
3775 * sid-decode.scm (-gen-decode-expr-entry): New proc.
3776 (-gen-decoder-switch): Handle expression tables.
3777 (-gen-extract-case): Call gen-define-ifmt-ifields instead of
3779 * sid-model.scm (-gen-model-insn-fn): Call gen-define-ifmt-ifields
3780 instead of gen-define-fields.
3781 * sid.scm (<ifield>,gen-ifld-extract-decl): New arg `indent', all
3783 (<multi-ifield,gen-ifld-extract-decl): Ditto.
3784 (-gen-ifld-extract-base): Call rtl-c instead of rtl-c-with-alist.
3785 (-gen-ifld-extract-beyond): Ditto.
3786 (<multi-ifield>,gen-ifld-extract): Ditto.
3787 (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
3788 rtl evaluation code.
3789 (op:read): Build an <eval-state> to pass to gen-read.
3790 (op:write): Build an <eval-state> to pass to gen-write.
3791 (op:record-profile): Build an <eval-state> to pass to
3793 * sim-cpu.scm (gen-semantic-code): Rewrite.
3794 * sim.scm (-gen-ifld-extract-base): Call rtl-c instead of
3796 (-gen-ifld-extract-beyond): Ditto.
3797 (<multi-ifield>,gen-ifld-extract): Ditto.
3798 (<hw-register>,gen-get-macro,gen-set-macro): Ditto.
3799 (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
3800 rtl evaluation code.
3801 (op:read): Build an <eval-state> to pass to gen-read.
3802 (op:write): Build an <eval-state> to pass to gen-write.
3803 (op:record-profile): Build an <eval-state> to pass to
3806 * operand.scm (<operand>): Give `selector' default value of #f.
3807 Give `num' default value of -1. Give `cond?' default value of #f.
3808 (op:new-mode): Delete arg `set?', all uses updated.
3810 * read.scm (reader-error): Handle #f return from port-filename.
3811 (-init-parse-cpu!): Call rtl-c-init!.
3812 (reader-install-builtin!): Call rtl-builtin!.
3814 * rtl-c.scm: New file.
3815 * semantics.scm: New file.
3816 * read.scm: Load them.
3817 * rtl.scm: C generation moved to rtl-c.scm. Semantic analysis moved
3819 (<rtx-func>): Delete members syntax?,macro,c,expr. New members
3821 (rtx-lookup): Renamed from -rtx-func-lookup. All callers updated.
3822 (-rtx-num-text,-rtx-max-num): New globals.
3823 (def-rtx-operand-node,define-rtx-operand-node): New procs.
3824 (-rtx-macro-lookup): New proc.
3825 (rtx-lvalue-mode-name): Renamed from rtx-expr-mode-name.
3826 (rtx-env-stack-empty?,rtx-env-stack-head): New procs.
3827 (rtx-env-var-list,rtx-env-empty-stack,rtx-env-init-stack1): New procs.
3828 (rtx-env-make,rtx-env-empty?,rtx-env-make-locals): New procs.
3829 (rtx-env-push,rtx-temp-lookup,-rtx-closure-make): New procs.
3830 (rtx-make,rtx-kind?,rtx-const?,rtx-const-value,rtx-symbol-name,
3831 rtx-operand?,rtx-operand-obj,rtx-local?,rtx-local-obj, rtx-xop-obj,
3832 rtx-index-of-value,rtx-if-mode,rtx-if-test,rtx-if-then,rtx-if-else,
3833 rtx-eq-attr-owner,rtx-eq-attr-attr,rtx-eq-attr-value): New procs.
3834 (rtx-pretty-name): New proc.
3835 (-rtx-traverser-table,-rtx-make-traverse-table): New procs.
3836 (rtx-traverse-*): Rewrite rtx traversing.
3837 (rtx-eval-*): Rewrite rtx evaluation.
3838 (rtx-compile): New proc.
3839 (rtx-simplify): New proc.
3840 (rtx-simply-eq-attr-mach,rtx-simplify-eq-attr-insn): New procs.
3841 * rtx-funcs.scm: C generation moved to rtl-c.scm.
3842 (ifield,index-of): Rewrite.
3843 (name): Renamed from `operand:'.
3844 (operand,xop,local): New rtx's.
3845 (current-insn): Rewrite.
3846 * Makefile.am (CGEN_HOB_INPUT_FILES): Add rtl-c.scm, semantics.scm.
3847 (cgen-hob.h): Remove rule for.
3848 (cgen-hob.o): Depend on cgen-hob.c only.
3849 * Makefile.in: Rebuild.
3851 * utils-cgen.scm (vmake): New proc.
3852 (<context>): New class.
3853 (context-make-prefix,context-error): New procs.
3855 Fri Apr 9 19:26:28 1999 Jim Wilson <wilson@cygnus.com>
3857 * i960.cpu: Add some ??? comments.
3858 (xnor, ornot): New instructions.
3859 (*): Delete obsolete COND-CTI and UNCOND-CTI attributes.
3861 1999-04-08 Doug Evans <devans@casey.cygnus.com>
3863 * cos.scm (-object-error): Print better error message.
3865 * pmacros.scm (-pmacro-env-make): Renamed from -env-make.
3866 (-pmacro-env-ref): Renamed from -env-ref.
3868 1999-03-31 Doug Evans <devans@casey.cygnus.com>
3870 * hardware.scm (<hw-pc>,parse!): Allow get/set specs.
3872 (hardware-builtin!): Delete h-pc builtin.
3873 * arm.cpu (h-pc): Define.
3874 (h-gr): Delete get,set specs. Make array of 16 regs again.
3875 * arm7.cpu (set-logical-cc-maybe): Delete.
3876 (set-zn-flags,set-add-flags,set-sub-flags): New macros.
3877 (data processing insns): Rewrite.
3878 * m32r.cpu (h-pc): Define.
3879 * fr30.cpu (h-pc): Define.
3880 * i960.cpu (h-pc): Define.
3881 * sparc.cpu (h-pc): Define.
3883 * rtl.scm (-rtx-traverse-operands): Add some error checking to LOCALS.
3884 (s-parallel): Replace do {...} while (0) with {...}.
3885 (s-sequence): Ditto.
3887 * sid-cpu.scm (gen-parallel-exec-type): Make type of `written'
3889 (-gen-write-case,-gen-sem-case): Ditto.
3890 (-gen-sem-case): Only specify `written' if profiling or
3891 parallel-write-back.
3892 (-gen-scache-semantic-fn,-gen-all-semantic-fns): Put procs back in.
3893 (-gen-sem-switch-fn): New proc.
3894 (cgen-semantics.cxx): Emit either semantic fns or semantic switch
3895 based on with-sem-switch option.
3896 * sid-decode.scm (-gen-decode-insn-globals): Only define
3897 idesc_table_initialized_p if with-sem-switch. Record semantic fn
3898 addresses in idesc_table if !with-sem-switch.
3899 (-gen-sem-fn-decls): Rewrite.
3900 (-gen-idesc-decls): Define @cpu@_sem_fn type. Define `execute'
3901 member based on with-sem-switch. Only define
3902 `idesc_table_initialized_p' member if with-sem-switch.
3903 (cgen-decode.h): If !with-sem-switch, declare semantic fns.
3904 * sid.scm (-with-sem-switch?): New variable.
3905 (option-init!): Initialize it.
3906 (option-set!): Set it.
3907 (with-sem-switch?): New proc.
3908 (-op-gen-set-trace): Only emit `written' reference if profiling.
3909 (sim-finish!): Use h_pc_set to set pc.
3911 1999-03-30 Doug Evans <devans@casey.cygnus.com>
3913 * sparccom.cpu (arith-cc-binop): New args s32-set-flags,s64-set-flags.
3914 All callers updated.
3915 (arith-carry-cc-binop): New arg set-flags. All callers updated.
3917 * sid.scm (gen-argbuf-type): Delete.
3918 (-gen-argbuf-fields-union): Move to ...
3919 * sid-decode.scm: ... here.
3921 * read.scm (-reader-process-expanded-1): New proc.
3922 (-reader-process-expanded): Call it to catch nested begin's.
3923 (reader-process): Move `begin' handling to -reader-process-expanded.
3925 * insn.scm (-insn-read): Fix name of `format' spec.
3927 * pmacros.scm (.pmacro): New builtin.
3928 (scan-symbol): If procedure macro, return macro rather than its symbol.
3929 (check-macro): Don't do lookup, instead check if (car expr) is
3931 (scan-list): Handle .pmacro.
3932 (scan): No longer re-examine text for another macro invocation.
3933 (-pmacro-build-lambda): New proc.
3934 (define-pmacro): Rewrite. If defining one pmacro to be an alias of
3935 another, fetch the other's value (rather than doing it during
3938 1999-03-27 Doug Evans <devans@casey.cygnus.com>
3940 * Makefile.am (CGEN_HOB_INPUT_FILES): Add decode.scm.
3941 * Makefile.in: Rebuild.
3943 * decode.scm (decode-get-best-bits): Use memq instead of element?.
3944 (-fill-slot!): Simplify.
3945 (-build-slots): Simplify.
3947 * dev.scm (load-sid): Don't load sid-arch.scm.
3949 * sid-decode.scm: Replace computed goto decoder/extractor with plain
3951 * sim-decode.scm: Replace computed goto decoder/extractor with plain
3954 1999-03-26 Doug Evans <devans@casey.cygnus.com>
3956 * sim-decode.scm: Clean up pass. Move decoder computation into ...
3957 * decode.scm: ... here. New file.
3958 * sid-decode.scm: Use decoder computation code in decode.scm.
3959 * read.scm: Load decode.scm.
3961 * arm.cpu (arm710 model): Add u-exec function unit.
3962 (h-gr): Delete CACHE-ADDR for now. Make array of 15, not 16 regs.
3963 Add get/set specs to redirect reg 15 to h-pc.
3964 (h-*): Indicate for both ARM and THUMB isas.
3965 (cbit,nbit,vbit,zbit): Ditto.
3966 (h-ibit,h-fbit,h-tbit,h-mbits): New hardware elements.
3967 (h-cpsr): Make virtual. Add get/set specs.
3968 (h-spsr-fiq,h-spsr-svc,h-spsr-abt,h-spsr-irq,h-spsr-und): New hw.
3969 (h-spsr): New virtual reg.
3970 * arm7.cpu (shift-type): New explicitly defined keyword.
3971 (h-operand2-shifttype): Use it.
3972 (set-logical-cc-maybe): Delete carry-out arg. New args arg1,arg2.
3973 All callers updated. Don't set cbit.
3974 (logical-op): Add rm to ifield list. Change case to case:. Use
3975 shift-type enum as case choices. Set cbit.
3976 (and,orr,eor,add-imm): Uncomment out.
3977 (undefined): Temporarily comment out.
3978 * thumb.scm (mov,cmp,addi8,subi8,str-sprel,ldr-sprel): s/rd/bit10-rd/.
3979 (lda-pc,lda-sp): Ditto.
3980 (ldr-pc): Rename from ldr.
3981 (cbranch): Mark insns as being thumb insns.
3983 * attr.scm (<bitset-attribute>,parse-value): Recognize strings.
3985 * cgen-sid.scm: Don't load sid-arch.scm.
3986 (sim-arguments): Delete unused entries.
3987 * sid-arch.scm: Delete.
3989 * insn.scm (<insn>,iflds): Renamed from flds. All uses updated.
3990 (<insn>,ifld-assertions): New member.
3991 (<insn>,make!): New arg ifld-assertions, all callers updated.
3992 (<insn> accessors): Change insn:foo to insn-foo. All callers updated.
3993 (insn:fields): Delete.
3994 (-insn-parse): New arg ifld-assertions. All callers updated.
3995 (-insn-read,define-insn): New procs.
3996 (define-full-insn): New arg ifld-assertions. All callers updated.
3997 (insn-init!): New comment define-insn.
3999 * model.scm (-model-parse): Ensure at least one unit specified.
4001 * rtl.scm (-rtx-traverse-operands): Recognize environments.
4002 (<c-expr-temp>,get-name): New method.
4003 (-rtx-make-current-closure,s-closure): New proc.
4004 (hw:): Wrap rtx indices in a closure.
4005 (-gen-case-prefix): New proc.
4007 * rtx-funcs.scm (case:): Fix call to s-case.
4008 (closure): New rtx func.
4010 * hardware.scm (<hardware-base>): New member isas-cache.
4011 (<hardware-base>,get-isas): New method.
4012 (hardware-builtin): Indicate for all isas.
4013 * ifield.scm (-ifield-parse): Only keep if isa+mach are kept.
4014 * mach.scm (current-arch-mach-name-list): Return list of names.
4015 (current-isa-mach-name-list): Ditto.
4016 (define-arch): Install builtin objects here.
4017 * read.scm (keep-atlist?): Only keep if both mach and isa are
4019 (keep-mach-atlist?): New proc.
4020 (keep-isa-multiple?,current-keep-isa-name-list): New proc.
4021 (reader-install-builtin!): Renamed from -install-builtin!.
4022 * sid-cpu.scm (-gen-reg-access-defns): Renamed from
4023 -gen-cpu-reg-access-defns. Rewrite.
4024 (gen-reg-access-defn): Delete.
4025 (-gen-hardware-struct): New proc.
4026 (-gen-hardware-types): Simplify. Add multiple-isa support.
4027 (gen-semantic-fn,-gen-all-semantics): Delete.
4028 (-gen-read-args,-gen-read-case,-gen-read-switch): Delete.
4029 (cgen-cpu.c,cgen-read.c,cgen-sem-switch.c,cgen-mainloop.in): Delete.
4030 (cgen-write.cxx,cgen-semantics.cxx,cgen-decode.cxx): Renamed from *.c.
4031 Call sem-analyze-insns!.
4032 (cgen-semantics.cxx): Add multiple-isa support.
4033 * sid-decode.c (-gen-idesc-decls): Add multiple-isa support.
4034 (-gen-scache-decls,-gen-decode-fn): Ditto.
4035 (cgen-decode.h): Call sem-analyze-insns!.
4036 * sid-model.scm (cgen-model.cxx): Renamed from cgen-model.c.
4037 * sid.scm (-with-multiple-isa?): New variable.
4038 (option-init!): Initialize it.
4039 (option-set!): Set it.
4040 (with-multiple-isa?): New proc.
4041 (gen-cpu-ref): New arg isas. All callers updated.
4042 (gen-cpu-class): New proc.
4043 (*-get-macro,*-set-macro): Delete.
4044 (gen-reg-get-fun-name,gen-reg-set-fun-name): New procs.
4045 (-hw-gen-fun-get): Call gen-reg-get-fun-name.
4046 (-hw-gen-fun-set): Call gen-reg-set-fun-name.
4047 (-gen-hw-index): Call rtx-c instead of rtx-c-with-temps for rtxs.
4048 (-sim-insns-analyzed): New global variable.
4049 (sim-init!): Reset it.
4050 (sim-analyze-insns!): New proc.
4051 (sim-analyze!): Don't do instruction analysis here.
4052 (sim-finish!): Specify isa of x-invalid insn.
4053 * sim.scm (sim-finish!): Specify isa of added x-* virtual insns.
4055 1999-03-22 Doug Evans <devans@casey.cygnus.com>
4057 * thumb.cpu (cpu,mach,model): Delete.
4058 (dntf): New pmacro. Use it for all field definitions.
4059 (dntop): New pmacro. Use it for all operand definitions.
4060 (asr): Correct field list.
4061 (add,addi,sub,subi,add-sp,add-sp-neg): Ditto.
4063 * utils-cgen.scm (define-getters): New macro to simplify
4064 writing class accessors.
4065 (define-setters): Ditto.
4066 (sanitize): Recognize isa elements.
4068 * sid-cpu.scm (*): Replace cpu:parallel-exec? call with
4069 state-parallel-exec?.
4070 * sid-model.scm (*): Ditto.
4071 * sid-decode.scm (*): Ditto. Replace cpu:decode-assist with
4072 state-decode-assist.
4074 * sid-decode.scm (decode-bits): Replace list-reverse! with reverse!.
4075 (-gen-decode-switch): Rewrite to not generate deeply nested lists.
4076 * sim-decode.scm (-gen-decode-switch): Ditto.
4078 * sim-arch.scm (-regs-for-access-fns): Delete.
4079 (-biggest-reg-mode,-gen-arch-reg-access-decls): Delete.
4080 (-gen-arch-reg-access-defns): Delete.
4082 * sim-cpu.scm (*): Replace cpu:liw-insns with state-liw-insns,
4083 cpu:parallel-insns with state-parallel-insns, cpu:parallel-exec?
4084 with state-parallel=exec?.
4085 (cgen-*): Call sim-analyze-insns! here.
4086 * sim-decode.scm (cgen-*): Ditto.
4087 * sim-model.scm (cgen-*): Ditto.
4088 * sim.scm (-sim-insns-analyzed): New global variable.
4089 (sim-init!): Reset it.
4090 (sim-analyze-insns!): Renamed from sim-analyze!. Keep track if we've
4091 already done the analysis.
4093 * sim-model.scm (-gen-mach-defns): Add mach attribute number to
4096 * arm.cpu: Only include arm7.cpu,thumb.cpu if necessary.
4097 (arm arch): Update isa spec.
4098 (arm,thumb isas): Define.
4099 (arm7 cpu): default-insn-bitsize,base-insn-bitsize moved to isas.
4100 (arm7tdmi mach): Add isa spec.
4101 * arm7.cpu (*): Replace subreg: with subword:. Remove unnecessary
4102 `const' on word number.
4103 * fr30.cpu (fr30 arch): Update isa spec.
4105 (fr30bf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
4107 * i960.cpu (i960 arch): Update isa spec.
4109 (i960base cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
4110 liw-insns,parallel-insns moved to isas spec.
4111 * m32r.cpu (m32r arch): Update isas spec.
4113 (m32rbf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
4114 liw-insns,parallel-insns moved to isa spec.
4115 * sparc.cpu (sparc arch): Update isas spec.
4116 (sparc isa): Define.
4117 * sparc32.cpu (sparc32 cpu): default-insn-bitsize,base-insn-bitsize,
4118 decode-assist moved to isa spec.
4119 * sparc64.cpu (sparc64 cpu): Ditto.
4120 * sparccom.cpu (trap insns): Correct mode of result of c-call:.
4121 * desc-cpu.scm (-gen-isa-table-defns): New proc.
4122 (-gen-mach-table-defns): Output mach table.
4123 (-gen-hash-defines): Delete insn size macros, except for
4125 (-cgen-cpu-open): Rewrite cpu_open handling. Take stdarg list of args.
4126 (cgen-desc.h): Define MAX_ISAS.
4127 (cgen-desc.c): Include stdarg.h. Call -gen-isa-table-defns.
4128 * mach.scm (<arch>): Rename arch-data to data. New member isa-list.
4129 (arch-* accessors): Renamed from arch:*. All callers updated.
4130 (current-arch-isa-name-list): New proc.
4131 (-arch-parse-isas): Renamed from -arch-parse-isa.
4132 (def-isa-attr!): Rewrite.
4133 (<iframe>): New class.
4134 (<itype>): New class.
4136 (isa-min-insn-bitsize,isa-max-insn-bitsize): New procs.
4137 (isa-integral-insn?,isa-parallel-exec?): New procs.
4138 (-isa-parse,-isa-read,define-isa): New proc.
4139 (<cpu>): Members default-insn-bitsize,base-insn-bitsize,decode-assist,
4140 liw-insns moved to <isa>.
4141 (cpu-* accessors): Renamed from cpu:*. All callers updated.
4142 (-cpu-parse,-cpu-read): Update.
4143 (state-*): Renamed from state:*. All callers updated.
4144 (state-default-insn-bitsize,state-base-insn-bitsize): Use isa spec,
4146 (state-parallel-insns,state-parallel-exec?,state-liw-insns): New procs.
4147 (state-decode-assist): New proc.
4148 (<derived-arch-data>): Delete min-insn-bitsize,max-insn-bitsize.
4149 (-adata-set-derived!): Rewrite.
4150 (adata-integral-insn?): Renamed from adata:integral-insn?. All
4152 (arch-init!): Add define-isa command.
4153 * read.scm (<reader>): Default keep-isa member to (all).
4154 (reader-* accessors): Renamed from reader:*. All callers updated.
4155 (-keep-isa-set!): Call string->symbol on isa name list.
4156 (keep-isa-validate!): Rewrite.
4157 (current-isa): New proc.
4158 (keep-isa?): Recognize "all".
4159 (-init-parse-cpu!): New arg keep-isa. All callers updated.
4160 Call -keep-isa-set!.
4161 (cmd-if): Recognize keep-isa?.
4162 (cpu-load): New arg keep-isa. All callers updated.
4163 (-opt-spec-update): New proc.
4164 (common-arguments): First arg is string, not symbol.
4165 (-cgen): Call -opt-spec-update. Rewrite argument parsing.
4167 * rtl.scm (rtx-get): Default mode of string arg is INT.
4169 * rtl.scm (s-subword): Renamed from s-subreg. All uses updated.
4171 * rtx-funcs.scm (join:): Pass cpu to handler.
4173 * configure.in (guile_include_dir): Delete.
4174 * configure: Rebuild.
4175 * Makefile.in: Rebuild.
4176 * doc/Makefile.in: Rebuild.
4178 * sid-cpu.scm (-extract-chunk-specs): New proc.
4179 (gen-define-fields): Use it.
4180 (-extract-chunk): New proc.
4181 (-gen-extract-beyond-var-list): Use it.
4182 (gen-extract-fields): Simplify.
4184 1999-03-22 Ben Elliston <bje@cygnus.com>
4186 * arm7.cpu (ldri-p): New instruction.
4187 (swi): Do not vector through 0x8 yet--there is nothing there.
4190 (all): Use (const x) in subreg expressions.
4192 1999-03-19 Ben Elliston <bje@cygnus.com>
4194 * arm7.cpu (smull): Use operand field `rs', not `mul-rn'. Thinko.
4197 1999-03-17 Doug Evans <devans@casey.cygnus.com>
4199 * fr30.cpu (define-arch): Specify "forced" default-alignment.
4200 * mach.scm (-parse-alignment): Recognize "forced" alignment.
4201 * sim-cpu.scm (-extract-chunk-specs): New proc.
4202 (gen-define-fields): Use it.
4203 (-extract-chunk): New proc.
4204 (-gen-extract-beyond-var-list): Use it.
4205 (gen-extract-fields): Simplify.
4207 Port to guile 1.3.1.
4208 * Makefile.am (GUILEINCDIR,GUILELDFLAGS,GUILELDADD): Delete.
4209 (LIBIBERTY): New var.
4210 (HOB_OBJS): Add cgen-gh.o.
4211 (hobbit): Delete $(CFLAGS) from link, add $(LIBS) $(LIBIBERTY).
4212 * Makefile.in: Rebuild.
4213 * acconfig.h: Add HAVE_3_ARG_SCM_MAKE_VECTOR.
4214 * config.in: Rebuild.
4215 * configure.in: Add checks for libdl, libreadline, libnsl, libsocket,
4216 libncurses, libtermcap.
4217 Add checks for needed functions in guile 1.2 not in guile 1.3,
4218 and vice versa. Add test for 3 argument scm_make_vector.
4219 * configure: Rebuild.
4220 * cgen-gh.c (scm_list_length,scm_list_append,scm_list_reverse): Provide
4221 definitions if guile doesn't have them.
4222 (gh_make_vector,gh_length,gh_vector_set_x,gh_vector_ref):
4223 (cgh_vector): Replace gh_vector with gh_make_vector. Replace gh_vset
4224 with gh_vector_set_x.
4225 (cgh_qsort): Replace gh_list_length with gh_length.
4226 * cgen-gh.h: Add decls for added functions.
4227 (cgh_qsort): Don't declare if IN_HOBBIT.
4228 * cos.c: Include config.h. Replace gh_vref with gh_vector_ref,
4229 gh_vset with gh_vector_set_x, gh_list_length with gh_length,
4230 scm_make_vector with gh_make_vector.
4231 * cos.scm: Use vector-length instead of length on vectors.
4232 * dev.scm (cload): Make varargs proc with keyword/value args.
4233 * hobscmif.h: Include config.h, cgen-gh.h. Undef make_vector and
4234 provide version that works with guile 1.2 or 1.3.
4235 Include private copy of scmhob.h.
4236 * scmhob.h: New file. Keep our own copy for now.
4238 Tue Mar 16 13:22:01 1999 Doug Evans <devans@canuck.cygnus.com>
4240 * rtl.scm (-rtx-traverse-error): Ensure expression is output in
4242 (-rtx-traverse-operands): Dump cx temp stack if debugging.
4243 (-cx-temp-dump-stack): Pretty up output.
4245 * arm.cpu: comment out thumb.cpu until isa support ready.
4246 * arm7.cpu (bl): Replace lr with (reg h-gr 14).
4247 (f-imm12,f-offset24,swi,undef): Fix thinko, add `const'.
4248 * thumb.cpu (h-gr-t,h-lr-t,h-sp-t,dnti,h-hiregs): s/MACH/ISA/.
4250 * sid-decode.scm (cgen-decode.c): Call rtl-gen-init!.
4252 1999-03-11 Doug Evans <devans@casey.cygnus.com>
4254 * hardware.scm (<hw-immediate>,mode-ok?): Ensure result is boolean.
4255 (<hw-address>,mode-ok?): unsigned/signed are compatible.
4257 * operand (op:new-mode): Improve error message.
4259 * arm.cpu: Move arm isa into arm7.cpu. Include arm7.cpu, thumb.cpu.
4260 * arm7.cpu: New file.
4262 1999-03-12 Ben Elliston <bje@cygnus.com>
4264 * arm.cpu: Lots of minor fixes after desk checking.
4266 1999-03-11 Doug Evans <devans@casey.cygnus.com>
4268 * thumb.cpu: snapshot of current work
4270 * rtl.scm (rtx-get): Tweak error message.
4272 1999-03-10 Doug Evans <devans@casey.cygnus.com>
4274 * Makefile.am (cos.o,cgen.o,cgen-gh.o): Fix dependencies.
4275 * Makefile.in: Rebuild.
4277 * cos.c (cos_vector_copy): New function.
4278 (_object_copy): Use it.
4280 * mode.scm (mode:eq?): Clean up.
4281 * rtl.scm (cx-new-mode): Copy attributes.
4282 (rtx-get): Don't make copy if <c-expr> with identical mode.
4284 * fr30.cpu (define-arch): Delete default-insn-word-bitsize,
4286 (gr-names): h-gr register names moved here.
4288 (cr-names): h-cr register names moved here.
4290 (dr-names): h-dr register names moved here.
4292 (h-ps): Replace FUN-ACCESS attribute with get/set specs.
4293 (h-sbit,h-ccr,h-scr,h-ilm): Ditto.
4294 * i960.cpu (define-arch): Delete default-insn-word-bitsize,
4296 * m32r.cpu (define-arch): Delete default-insn-word-bitsize,
4298 (gr-names): h-gr register names moved here.
4300 (cr-names): h-cr register names moved here.
4302 (h-accum): Replace FUN-ACCESS attribute with get/set specs.
4303 (h-accums,h-psw): Ditto.
4304 * sparc.cpu (define-arch): Delete default-insn-word-bitsize,
4306 (gr-names): h-gr register names moved here.
4307 (h-gr-indices): Delete.
4308 (sparc32 h-gr): Update. Replace FUN-ACCESS with get/set specs.
4309 (sparc64 h-gr): Ditto.
4310 (h-y): Add get/set specs.
4312 (fp operands): Rewrite.
4313 * sparc32.cpu (h-psr): Replace FUN-ACCESS with get/set specs.
4314 (h-tbr,h-cwp,h-wim): Ditto.
4315 * sparc64.cpu (h-fpsr): Add get/set specs.
4316 * sparccom.cpu (ldd-reg+reg): Load value all at once.
4317 (fp-ld-op): New arg `dest', all callers updated.
4318 (*): Replace `make-di' with `join'.
4320 * sid-cpu.scm (-gen-cpu-reg-access-defns): Use get/set specs if
4322 (gen-semantic-code): Save/restore rtl generator state.
4323 (cgen-cpu.h): Call rtl-gen-init!.
4324 * sid.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
4325 (-gen-ifld-extract-beyond): Ditto.
4326 (<multi-ifield>,gen-ifld-extract): Ditto.
4327 (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
4329 (-hw-gen-set-quiet-pc): Ditto.
4330 (<hw-pc>,gen-write): Ditto.
4331 (-hw-cxmake-get): Ditto. Call getter function if present.
4332 (<hw-register>,cxmake-get-raw): New method.
4333 (<hw-register>,gen-set-quiet-raw): New method.
4334 (-hw-gen-set-quiet): New arg `gstate'.
4335 (hw-fun-access?): Delete.
4336 (gen-reg-access-defn): Output function contents.
4337 (-gen-hw-index-raw): Update call to rtx-c. Update cxmake-get
4339 (-gen-hw-index): Ditto.
4340 (op:read): Update gen-read invocation.
4341 (op:write): Update gen-write invocation.
4342 (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Handle raw-reg
4344 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
4345 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
4346 (<unit>,gen-profile-code): Update to sim.scm version.
4348 * sim-arch.scm (-regs-for-access-fns): New proc.
4349 (-biggest-reg-mode): New proc.
4350 (-gen-arch-reg-access-decls,-gen-arch-reg-access-defns): Rewrite.
4351 * sim-cpu.scm (-gen-hardware-types): Output get/set handlers for
4352 virtual regs separately.
4353 (-gen-cpu-reg-access-defns): Replace fun-access? with new
4355 (gen-semantic-code): Save/restore rtl generator state.
4356 (cgen-cpu.h): Call rtl-gen-init!.
4357 (cgen-cpu.c): Ditto. #include cgen-ops.h.
4358 * sim-model.scm: mach:cpu renamed to mach-cpu. mach:bfd-name
4359 renamed to mach-bfd-name.
4360 * sim.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
4361 (-gen-ifld-extract-beyond): Ditto.
4362 (<multi-ifield>,gen-ifld-extract): Ditto.
4363 (<scalar>,gen-sym-get-macro): Update call to gen-get-macro.
4364 (<scalar>,gen-sym-set-macro): Update call to gen-set-macro.
4365 (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
4367 (hw-fun-access?): Delete.
4368 (-hw-gen-set-quiet-pc): New arg `gstate'.
4369 (<hw-register>,gen-get-macro): Rewrite.
4370 (<hw-register>,gen-set-macro): Rewrite.
4371 (-hw-gen-fun-get,-hw-gen-fun-set): Delete.
4372 (-hw-cxmake-get): New arg `gstate'. Rewrite.
4373 (<hw-register>,cxmake-get-raw): New method.
4374 (-hw-gen-set-quiet): New arg `gstate'. Rewrite.
4375 (<hw-register>,gen-set-quiet-raw): New method.
4376 (-gen-hw-index-raw): Update call to rtx-c. Update cxmake-get
4378 (-gen-hw-index): Ditto.
4379 (<hw-index>): New arg `gstate'.
4380 (-gen-hw-selector): Update call to rtx-c.
4381 (<pc>): New arg `gstate'.
4382 (op:read): Update gen-read invocation.
4383 (op:write): Update gen-write invocation.
4384 (<operand>,cxmake-get): Handle raw-reg.
4385 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
4386 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
4387 (<operand>,gen-set-quiet): Handle raw-reg.
4388 (<operand>,gen-set-trace): Handle raw-reg.
4389 (-gen-mach-data): mach:cpu renamed to mach-cpu.
4391 * desc-cpu.scm (gen-operand-decls): Take nub of operands for
4392 cgen_operand_type enum.
4393 (gen-operand-table): Add operand type enum. Replace pointer to
4394 hardware element with its enum. Null terminate table.
4395 (-gen-cpu-open): Add new `isa' argument to @arch@_cgen_cpu_open.
4396 Build operand table.
4397 * ifield.scm (-ifield-parse): Recognize ISA attribute.
4398 * mach.scm (<arch-data>): New member `isas'.
4399 (adata-isas): New accessor.
4401 (isa-default-insn-word-bitsize): New accessor.
4402 (isa-enum): New proc.
4403 (current-arch-default-insn-word-bitsize): Delete.
4404 (current-isa-list,current-isa-lookup): New procs.
4405 (-arch-parse-isa): New proc.
4406 (-arch-parse): Rewrite.
4407 (-arch-read): Recognize `isas'. Delete `default-insn-word-bitsize'.
4408 (define-arch): Define ISA attribute.
4409 (def-isa-attr!,isa-supports?): New procs.
4410 (<mach>): New member `isas'.
4411 (mach-isas): New accessor.
4412 (-mach-parse): New arg `isas', all callers updated.
4413 (-mach-read): Recognize `isas'.
4414 (arch-finish!): Rewrite.
4415 * opc-ibld.scm (-gen-fget-switch): Add `cd' arg to
4416 @arch@_cgen_get_{int,vma}_operand.
4417 (-gen-fset-switch): Add `cd' arg to @arch@_cgen_set_{int,vma}_operand.
4418 * opc-opinst.scm (-gen-operand-instance): Output operand enum instead
4419 of pointer to table entry.
4420 * opcodes.scm (gen-switch): Handle multiply defined operands.
4421 * operand.scm (op-sort): New proc.
4423 * hardware.scm (<hardware-base>): Rename getters/setters to get/set.
4424 (hw-getter,hw-setter): Renamed from hw-getters,hw-setter.
4425 (hw-enum): Accept symbol argument.
4426 (hardware-builtin!): Delete attribute FUN-ACCESS.
4427 * ifield.scm (ifld-encode-mode,ifld-decode-mode): New procs.
4429 * attr.scm (atlist-source-form): New proc.
4430 (attr-builtin!): New attr `PRIVATE'.
4431 * desc.scm (<keyword>,gen-defn): Make keyword entry table static.
4432 * desc-cpu.scm (-gen-hw-defn): Only output index and value tables
4433 if they have `PRIVATE' attribute.
4434 (gen-hw-table-defns): Output definitions of explicitly defined
4436 * hardware.scm (<keyword>): New member print-name. Rename member
4437 `value' to `values', all uses updated.
4438 (kw-mode,kw-print-name,kw-prefix,kw-values): New procs.
4439 (keyword-parse): Rewrite.
4440 (-keyword-read): New proc.
4441 (define-keyword): New proc.
4442 (-hw-parse-keyword): New proc.
4443 (-hw-parse-indices): Rewrite keyword handling, support new index spec
4445 (-hw-parse-values): Ditto.
4446 (-hw-parse-get,-hw-parse-set): Rewrite.
4447 (hardware-init!): Add new comment define-keyword.
4448 * mach.scm (<arch>): New member `kw-list'.
4449 (arch:kw-list,arch_set-kw-list!): New accessors.
4450 (current-kw-list,current-kw-add!,current-kw-lookup): New procs.
4452 * hardware.scm (<hw-register>,mode-ok?): Rewrite.
4453 * mode.scm (mode-class-integral?): New proc.
4454 (mode-class-float?,mode-class-numeric?): New procs.
4455 (mode-integral?,mode-float?,mode-numeric?): New procs.
4456 (mode-compatible?): New proc.
4457 * opcodes.scm (<ifield>,gen-insert): Update alist arg to
4459 (<ifield>,gen-extract): Ditto.
4460 * rtl.scm (-rtl-simulator?,-rtx-current-obj): Delete.
4461 (<gstate>): New class.
4462 (gstate-simulator?,gstate-set-simulator?!): New accessors.
4463 (gstate-context,gstate-set-context!): New accessors.
4464 (gstate-macro?,gstate-set-macro?!): New accessors.
4465 (gstate-make,gstate-copy): New procs.
4466 (-rtl-current-gstate): New global.
4467 (current-gstate-simulator?): New proc.
4468 (current-gstate-context,current-gstate-macro?): New procs.
4469 (current-gstate,current-gstate-set!): New procs.
4470 (rtl-gen-init!): Rewrite.
4471 (-rtx-valid-types): Add INTMODE, FLOATMODE, NUMMODE.
4472 (tstate-make): New arg `gstate', all callers updated.
4473 (tstate-set-expr-fn!,tstate-set-op-fn!): New accessors.
4474 (tstate-set-cond?!,tstate-set?,tstate-set-set?!): New accessors.
4475 (tstate-gstate,tstate-set-gstate!): New accessors.
4476 (tstate-copy): New proc.
4477 (tstate-new-cond?,tstate-new-set?): Rewrite.
4478 (-rtx-traverse-operands): Handle INTMODE, FLOATMODE, NUMMODE.
4479 (rtx-traverse): New arg `gstate', all callers updated.
4480 (rtx-strdump): New proc.
4481 (-simplify-for-compilation): New arg `gstate', all callers updated.
4482 (semantic-in-out-operands): Ditto.
4483 (semantic-attrs): Ditto.
4484 (rtx-eval): Rewrite. New arg `gstate', all callers updated.
4485 (rtx-eval-with-temps,rtx-eval-with-alist): Ditto.
4486 (rtx-value): Rewrite.
4487 (<c-expr>,gen-name): New method.
4488 (<c-expr>,gen-set-quiet): New arg `gstate', all callers updated.
4489 (<c-expr>,gen-set-trace): New arg `gstate', all callers updated.
4490 (cx-new-mode): New proc.
4491 (-rtx-c-with-tstate): New proc.
4492 (rtx-c,rtx-c-with-temps,rtx-c-with-alist): New arg `gstate', all
4494 (-rtx-mode): Rewrite.
4495 (-rtx-mode-compatible?): New proc.
4496 (<c-expr-temp>): New member `value'.
4497 (cx-temp:value): New accessor.
4498 (<c-expr-temp>,make!): Override default method.
4499 (<c-expr-temp>,cxmake-get): Rewrite.
4500 (<c-expr-temp>,gen-set-quiet): Rewrite.
4501 (<c-expr-temp>,gen-set-trace): Rewrite.
4502 (gen-temp-defs): Use cx-temp:value.
4503 (record-temp!): New arg value, all callers updated.
4504 (cx-temp:cx:make): Delete.
4505 (-cx-temp-dump-stack): New proc.
4506 (rtx-get): New arg `gstate', all callers updated. Do mode
4507 compatibility checks. Ensure result has specified mode.
4508 (rtx-set-quiet): New arg `gstate', all callers updated.
4509 (rtx-set-trace): Ditto.
4510 (s-c-call): New arg `tstate', all callers updated.
4511 (s-c-raw-call): Ditto.
4512 (s-unop,s-binop,s-binop-with-with,s-shop,s-boolifop,s-convop): Ditto.
4513 (s-cmpop,s-if,e-if): Ditto.
4514 (s-subreg): New proc.
4515 (-par-new-temp!): New proc.
4516 (-par-next-temp!): Rewrite.
4517 (-par-replace-set-dests): Use -par-new-temp!.
4518 (s-parallel): Rewrite temp handling. Use -rtx-c-with-state.
4519 (s-sequence): Use -rtx-c-with-state.
4520 * rtx-funcs.scm (*): Update.
4521 (raw-reg:): New rtx function.
4523 (join:,subreg:): New rtx functions.
4525 * insn.scm (<insn>): New members pre-cond-trap, condition,
4526 post-cond-trap, compiled-condition.
4528 * insn.scm (syntax-break-out): Replace eval with current-op-lookup.
4530 * opcodes.scm (<pc>,cxmake-get): New arg `selector'.
4532 * utils-cgen.scm (parse-symbol): New proc.
4533 (parse-string): New proc.
4534 (gen-get-macro,gen-set-macro): New arg `index-args'.
4535 (gen-set-macro2): Ditto. Enclose code in do { } while (0).
4536 Prepend \ to newlines.
4538 * utils.scm (alist-remove-duplicates): Delete.
4540 * sid.scm (sim-init!): Delete private debugging code.
4542 1999-03-10 Frank Ch. Eigler <fche@cygnus.com>
4544 * cgen-sid.scm: New file for C++ simulator application.
4545 * sid-arch.scm: Ditto.
4546 * sid-cpu.scm: Ditto.
4547 * sid-decode.scm: Ditto.
4548 * sid-model.scm: Ditto.
4550 * utils-cgen.scm (gen-mach-sid-name): Remove this accident.
4552 1999-03-05 Ben Elliston <bje@cygnus.com>
4554 * arm.cpu: New file.
4556 1999-03-03 Doug Evans <devans@casey.cygnus.com>
4558 * Makefile.am (CGEN_HOB_INPUT_FILES): Add hardware.scm.
4559 * Makefile.in: Rebuild.
4561 * attr.scm (<integer-attribute>,parse-value-def): Tweak.
4562 (-attr-parse): Validate default value.
4564 * read.scm (-CGEN-VERSION): Change to 0.7.1.
4565 (-CGEN-LANG-VERSION): Ditto.
4566 (-keep-all-machs): Renamed from -keep-all, all uses updated.
4567 (<reader>): New member keep-isa plus accessors.
4568 (-keep-isa-set!,keep-isa-validate!): New procs.
4569 (keep-isa?,keep-isa-atlist?,keep-isa-obj?): New procs.
4570 (common-arguments): New variable.
4571 (cgen-usage,getarg,catch-with-backtrace,option-arg): New procs.
4572 (-debug-repl,continue): New procs.
4573 (-cgen,cgen): New procs.
4574 * cgen-gas.scm: Rewrite.
4575 * cgen-opc.scm: Rewrite.
4576 * cgen-sim.scm: Rewrite.
4577 * cgen-stest.scm: Rewrite.
4579 * gas-test.scm (gas-test-init!): Call opcodes-init!.
4580 (gas-test-finish!): Call opcodes-finish!.
4581 (gas-test-analyze!): Call opcodes-analyze!.
4582 (<hw-asm>): New method test-data.
4583 (<operand>,testdata): Rewrite.
4584 * sim-test.scm (sim-test-init!): Call opcodes-init!.
4585 (sim-test-finish!): Call opcodes-finish!.
4586 (sim-test-analyze!): Call opcodes-analyze!.
4587 (<hw-asm>): New method test-data.
4588 (<operand>,testdata): Rewrite.
4590 1999-03-01 Doug Evans <devans@casey.cygnus.com>
4592 * fixup.scm (reverse!): Define if missing.
4593 * *.scm: Use reverse! instead of list-reverse!.
4595 * utils.scm (leading-id-char?): New proc.
4596 (id-char?): Rewrite.
4597 (chars-until-delimiter): New proc.
4598 * opc-itab.scm (extract-syntax-operands): Rewrite.
4599 (strip-mnemonic): Rewrite.
4600 (compute-syntax): Rewrite.
4602 * pmacros.scm (-pmacro-substr): New proc.
4603 (pmacros-init!): Add builtin .substr.
4605 1999-02-26 Doug Evans <devans@casey.cygnus.com>
4607 * thumb.cpu: New file.
4609 1999-02-24 Doug Evans <devans@casey.cygnus.com>
4611 * Makefile.am (CGENCFLAGS): New variable.
4612 (WITH_HOBBIT): Use automake conditional.
4613 (CGEN_HOB_SRC): New variable.
4614 (libcpu_a_SOURCES): Use $(CGEN_HOB_SRC).
4615 (*.o): Compile with CGENCFLAGS.
4616 (cgen-hob.c): Simplify.
4617 (cgen-nohob.c): New rule.
4618 (hobbit): Renamed from hob.x.
4619 (CLEANFILES): Add cgen-nohob.c.
4620 * Makefile.in: Rebuild.
4621 * doc/Makefile.in: Rebuild.
4622 * configure.in (AM_INIT_AUTOMAKE): Update CGEN version to 0.7.1.
4623 (WITH_HOBBIT): Use AM_CONDITIONAL.
4624 * configure: Rebuild.
4625 * aclocal.m4: Rebuild.
4627 * sim-arch.scm (-gen-arch-reg-access-defns): Replace string-map
4628 with string-write-map.
4630 * sim-cpu.scm (hw-need-storage?): New proc.
4631 (-gen-hardware-types): Use it.
4632 (gen-parallel-exec-elm): Call op-save-index?.
4634 * sim-decode.scm (cgen-decode.c): Call rtl-gen-init!.
4636 * sim.scm (-gen-ifld-extract-base): Use mode:class instead of
4638 (-gen-ifld-extract-beyond): Ditto.
4639 (<integer>): Delete all references.
4640 (<sim-hardware>): Delete.
4641 (hw-profilable?): New proc.
4642 (<hardware-base>): New methods gen-get-macro,gen-set-macro.
4643 (<hw-register>): Rename method get-index-mode to save-index?.
4644 (<hw-register>): New methods gen-get-macro,gen-set-macro.
4645 (<hw-register>,gen-sym-decl): Make virtual.
4646 (<hw-memory>,gen-sym-decl): Make virtual.
4647 (<hw-memory>): Rename method get-index-mode to save-index?.
4648 (<hw-address>,gen-sym-decl): Make virtual.
4649 (<operand>): New method save-index?.
4650 (sim-init!): Delete calls to sim-hw-init!,sim-hw-init-parsers!.
4652 * opc-itab.scm (opc-{parse,insert,extract,print}-handlers): opc-
4653 prefix added. All uses updated.
4655 * opc-opinst.scm (-gen-operand-instance): Output hw enum value
4656 rather than pointer to table entry.
4658 * opcodes.scm: Remove all attribute support, lives in desc.scm.
4659 Remove all hw-asm,op-asm support.
4660 (-gen-parse-number,-gen-parse-address): New procs.
4661 (<keyword>,gen-parse): Redo function name computation.
4662 (<keyword>,gen-print): Ditto.
4663 (<operand>,gen-function-name): Rewrite.
4664 (<operand>,gen-fget,gen-fset,gen-parse,gen-print): Ditto.
4665 (opcodes-init!): Delete call to add-parser!.
4667 * desc-cpu.scm (gen-hw-decls): Rename enum hw_type to cgen_hw_type.
4668 Define enum using hardware semantic name.
4669 (-gen-hw-decl,-gen-hw-defn): New procs.
4670 (gen-hw-table-decls): Use -gen-hw-decl.
4671 (gen-hw-table-defns): Use -gen-hw-defn. Rewrite generation of
4672 CGEN_HW_ENTRY structs.
4673 (gen-operand-table): Output hw's enum, not pointer to table entry.
4674 (-gen-cpu-open): Build table of selected hardware elements.
4676 * desc.scm (-hw-asm-specs,-parse-hw-asm): Delete.
4677 (<hardware> support): Delete.
4678 (<hw-asm>): Delete, moved to hardware.scm.
4679 (normal-hw-asm,hw-asm:parse,hw-asm:print): Delete.
4680 (<hw-asm>,gen-table-entry): New method.
4681 (<hw-asm>,parse!): Delete.
4682 (<keyword>,gen-table-entry): New method.
4683 (<keyword>,parse!): Delete.
4684 (<hw-{register,memory,immediate,address}>): Delete forwarding methods
4685 for gen-decl,gen-defn,gen-ref,gen-init.
4686 (desc-init!): Don't create parser for operand asm specs.
4688 * attr.scm (attr-builtin!): Delete UNSIGNED attribute.
4689 * ifield.scm (<ifield>): New member `mode'.
4690 (<ifield>,make!): New arg `mode'.
4691 (ifld-mode): Rewrite.
4692 (ifld-hw-type): Rewrite.
4693 (<ifield>,min-value): Rewrite.
4694 (<ifield>,max-value): Rewrite.
4695 (-ifield-parse): New arg `mode'.
4696 (-ifield-read): Update.
4697 (define-full-ifield): New arg `mode'.
4698 (define-full-multi-ifield): Ditto.
4699 (-multi-ifield-parse): Ditto.
4700 (-multi-ifield-read): Update.
4701 (define-full-multi-ifield): New arg `mode'.
4702 (ifield-builtin!): Update definition of f-nil.
4703 * simplify.inc (define-normal-ifield): Update call to
4705 (define-normal-multi-ifield): Update call to define-full-multi-ifield.
4706 (define-normal-hardware): Delete arg asm. New args indices, values,
4707 handlers. Update call to define-full-hardware.
4708 (define-simple-hardware,dsh): New pmacros.
4709 (define-normal-operand): Update call to define-full-operand.
4710 * fr30.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
4711 Specify INT/UINT mode instead.
4712 (h-gr,h-cr): Use "indices" instead of "asm".
4713 (h-dr,h-ps): Update keyword syntax.
4714 (h-r13,h-r14,h-r15): Ditto.
4715 (h-nbit,h-zbit,h-vbit,h-cbit): Use dsh instead of dnh.
4716 (h-d0bit,h-d1bit,h-ibit,h-sbit,h-tbit,h-ccr,h-scr,h-ilm): Ditto.
4717 (m4): Fix typo on HASH-PREFIX. Use "handlers" instead of "asm".
4718 (reglist_low_ld,reglist_hi_ld,reglist_low_st,reglist_hi_st): Ditto.
4719 * i960.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
4720 Specify INT/UINT mode instead.
4721 (h-gr): Use "indices" instead of "asm".
4722 (h-cc): Update keyword syntax.
4723 * m32r.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
4724 Specify INT/UINT mode instead.
4725 (h-hi16,h-slo16,h-ulo16): Update.
4726 (h-gr,h-cr): Use "indices" instead of "asm".
4727 (h-accum,h-cond,h-psw,h-bpsw,h-bbpsw,h-lock): Use dsh instead of dnh.
4728 (h-accums): Update keyword syntax.
4729 (hash,hi16,slo16,ulo16): Use "indices" instead of "asm".
4730 * sparc.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
4731 Specify INT/UINT mode instead.
4732 (h-gr-indices): New pmacro.
4733 (h-gr32,h-gr64): Split up from h-gr.
4734 (h-a): Update type spec. Use values instead of asm spec.
4735 (h-icc-[cnvz],h-xcc-[cnvz]): Use dsh instead of dnh.
4736 (h-y,h-annul-p): Ditto.
4737 (h-asr): Update keyword spec.
4738 (h-lo10,h-lo13,h-hi22): Update.
4739 (get-freg-spec,set-freg-spec): New pmacros.
4740 (h-fr32,h-fr64): Split up from h-fr.
4741 (rdd): Comment out get/set specs.
4742 (lo10,lo13,hi22): Use "handlers" instead of "asm".
4743 * sparc32.cpu (h-psr): Use dsh instead of dnh.
4744 (h-s,h-ps,h-pil,h-et,h-tbr,h-cwp,h-ag,h-ec,h-ef,h-fsr): Ditto.
4745 * sparc64.cpu (f-*): Delete UNSIGNED attribute. Default is now
4746 UNSIGNED. Specify INT/UINT mode instead.
4747 (h-*): Use dsh instead of dnh where appropriate.
4748 (h-ixcc): Update type spec. Use "values" instead of "asm".
4749 (h-p,h-membarmask): Ditto.
4750 (membarmask): Use "handlers" instead of "asm".
4752 * hardware.scm (<hardware-base>): New member sem-name,type,indices,
4753 values,handlers,getters,setters plus accessors.
4754 (hw-mode-ok?,hw-default-mode): New procs.
4755 (<hardware-base>): Rename method new-mode to mode-ok?
4756 (<hardware-base>): New method get-index-mode.
4757 (hw-index-mode): New proc.
4758 (pc?): Delete, moved to operand.scm.
4759 (address?): New proc.
4760 (<hardware>): Delete.
4761 (<hw-asm>): Definition moved here from desc.scm.
4762 (keyword-parse): New proc.
4763 (hardware-parsers): Delete.
4764 (-parse-hw-type,-parse-hw-asm,-parse-hw-profile): Delete.
4765 (-hw-parse-indices,-hw-parse-values,-hw-parse-handlers): New procs.
4766 (-hw-parse-get,-hw-parse-set): New procs.
4767 (-hw-parse): Delete args aasm,profile,extra. New args semantic-name,
4768 indices,values,handlers,get,set. Rewrite.
4769 (-hw-read-extra): Delete.
4771 (define-hardware): Don't add object if not selected.
4772 (define-full-hardware): Ditto.
4773 (current-hw-sem-lookup,current-hw-sem-lookup-1): New procs.
4774 (<hw-register>): Member `type' moved to baseclass. Delete member
4776 (<hw-register>,parse!): Rewrite.
4777 (<hw-register>): Delete methods get-rank,get-mode.
4778 (<hw-register>): Method new-mode renamed to mode-ok?
4779 (<hw-register>): New method get-index-mode.
4780 (<hw-pc>,parse!): Rewrite.
4781 (<hw-memory>): Member `type' moved to baseclass. Delete member hw-asm.
4782 (<hw-memory>,parse!): Rewrite.
4783 (<hw-memory>): Delete methods get-rank,get-mode.
4784 (<hw-memory>): Method new-mode renamed to mode-ok?
4785 (<hw-memory>): New method get-index-mode.
4786 (<hw-immediate>): Member `type' moved to baseclass. Delete member
4788 (<hw-immediate>,parse!): Rewrite.
4789 (<hw-immediate>): Delete methods get-rank,get-mode.
4790 (<hw-immediate>): Method new-mode renamed to mode-ok?
4791 (<hw-address>): Delete member hw-asm.
4792 (<hw-address>,parse!): Rewrite.
4793 (<hw-address>): Delete methods get-rank,get-mode.
4794 (<hw-address>): Method new-mode renamed to mode-ok?
4795 (hw-profilable?): Delete.
4796 (hardware-init!): Delete hardware-parsers reference.
4797 Update argument specs of command define-full-hardware.
4798 (hardware-builtin!): Update definitions of hardware builtins.
4799 * operand.scm (<operand>): New members hw-name,mode-name.
4800 Delete member op-asm. New member handlers.
4801 (<operand>,make!): Update.
4802 (op:hw-name,op:mode-name,op:handlers): New procs.
4805 (<operand>): New method get-index-mode.
4806 (<pc>,make!): Update.
4807 (op:new-mode): Rewrite.
4808 (operand-parsers): Delete.
4809 (-operand-parse): Rewrite. Return #f if insn not selected.
4810 (-op-read-extra): Delete.
4811 (-operand-read): Update.
4812 (define-operand,define-full-operand): Update.
4813 (operand-init!): Delete operand-parsers reference.
4814 Update syntax of define-full-operand command.
4816 * insn.scm (-insn-parse): Rewrite. Return #f if insn not selected.
4817 (define-full-insn): Update.
4818 * minsn.scm (-minsn-parse): Rewrite. Return #f if insn not selected.
4819 (define-full-minsn): Update.
4821 * mode.scm (<mode>): New member class.
4822 (mode:class): New proc.
4824 (-mode-parse): New arg class.
4825 (define-full-mode): Update.
4826 (mode-find): Rewrite.
4827 (mode-make-int,mode-make-uint): New procs.
4828 (mode-init!): Update syntax of define-full-mode command.
4829 (mode-builtin!): Update definitions of builtin modes.
4831 * model.scm (<profile>): Delete.
4833 * read.scm (keep-atlist?): New proc.
4834 (keep-multiple?): New proc.
4835 (<parser-list>): Delete.
4836 (add-parser!,parse-spec!): Delete.
4838 * rtl.scm (def-rtx-node): Prepend arg *tstate* to all handlers.
4839 (def-rtx-syntax-node): Ditto.
4840 (-rtx-traverse-debug?): New variable.
4841 (tstate-make): New proc.
4842 (tstate-expr-fn,tstate-op-fn,tstate-cond?,tstate-set?): New procs.
4843 (tstate-new-cond?,tstate-new-set?): New procs.
4844 (-rtx-traverse-normal): Delete args cond?,expr-fn,op-fn. New arg
4845 tstate. All callers updated.
4846 (-rtx-traverse-expr,-rtx-traverse-debug): Ditto.
4847 (-rtx-traverse-list,-rtx-traverse-operands): Ditto.
4848 (-build-operand!): Replace arg cond? with tstate.
4849 (-build-reg-operand!,-build-mem-operand!): Ditto.
4850 (-build-index-of-operand!): Update making of <operand> object.
4851 (s-ifield): New arg tstate. All callers updated.
4852 (hw:): New arg tstate. All callers updated. Replace call to
4853 current-hw-lookup with current-hw-sem-lookup-1.
4854 (s-index-of): New arg tstate. All callers updated.
4856 (-rtx-use-sem-fn?): New proc.
4857 (s-unop,s-binop,s-shop): Use it. Only use semantic mode when using
4859 (s-convop): Only use semantic mode when using semantic cover fns.
4860 (s-cmpop): Call -rtx-use-sem-fn?.
4861 (s-cond,s-case): New arg tstate. All callers updated.
4862 (s-parallel,s-sequence): Ditto.
4864 * rtx-funcs.scm (set,set-quiet:): Use SETRTX to mark the set dest.
4866 * types.scm (<scalar>): Rewrite implementation.
4867 (<integer>): Delete.
4868 (parse-type): Rewrite.
4870 * utils-cgen.scm (parse-handlers): New proc.
4872 * utils.scm (!=): New proc.
4874 Tue Feb 23 12:10:29 1999 Doug Evans <devans@canuck.cygnus.com>
4876 * pmacros.scm (-pmacro-expand): Fix typo.
4878 1999-02-12 Doug Evans <devans@casey.cygnus.com>
4880 * pmacros.scm (-pmacro-hex,-pmacro-upcase,-pmacro-downcase): New procs.
4881 (pmacros-init!): Install builtins .hex, .upcase, .downcase.
4882 * i960.cpu (build-hex2): New pmacro.
4883 (insn-opcode): Simplify.
4884 (insn-opcode2): Ditto.
4886 * cgen-sim.scm (catch-with-backtrace): Comment out debugging printf.
4887 * cgen-stest.scm (catch-with-backtrace): Ditto.
4889 1999-02-11 Doug Evans <devans@casey.cygnus.com>
4891 * pmacros.scm (-pmacro-lookup): Renamed from -pmacro-ref.
4892 All callers updated.
4893 (-pmacro-invoke): New proc.
4894 (-pmacro-sym,-pmacro-str): New procs.
4895 (-pmacro-iota,-pmacro-map,-pmacro-apply): New procs.
4896 (pmacros-init!): Install builtins .iota, .map, .apply.
4897 * sparc.cpu (cc-tests): Add CC_NZ,CC_Z,CC_GEU,CC_LU aliases.
4898 (h-fr): Simplify register name spec.
4899 * sparc64.cpu (cond-move-1): New arg mnemonic. All callers updated.
4900 * utils.scm (num-args-ok?): New proc.
4902 1999-02-10 Doug Evans <devans@casey.cygnus.com>
4904 * pmacros.scm (-pmacro-error): New proc.
4905 (-pmacro-expand): Use it.
4906 (-pmacro-splice): New proc.
4907 (pmacros-init!): Install new builtin .splice.
4909 * sparc.cpu: Include sparc64.cpu when appropriate.
4910 (f-mmask,f-simm11): Moved to sparc64.cpu.
4911 (insn-fmt2): Add FLUSH,FLUSHW,IMPDEP1,IMPDEP2,MEMBAR,MOVCC.
4912 (ANNUL attribute): Delete.
4913 (test-* pmacros): New arg cc, all callers updated.
4914 (uncond-br-sem,cond-br-sem): New arg cc, all callers updated.
4915 * sparc32.cpu (atom-op): Moved to sparccom.cpu and renamed to
4917 (ldstub,swap): Moved to sparccom.cpu.
4918 * sparc64.cpu: Add more insns.
4920 1999-02-09 Doug Evans <devans@casey.cygnus.com>
4922 * sim-cpu.scm (cgen-semantics.c): Replace CGEN_INSN_ATTR with
4924 (cgen-sem-switch.c): Ditto.
4925 * sim-decode.scm (-gen-idesc-decls): struct idesc definition
4926 moved to cgen-engine.h.
4927 (-gen-insn-sem-type): Delete, struct insn_sem mvoed to cgen-engine.h.
4928 (-gen-idesc-init-fn,init_idesc): Lookup insn table via descriptor, not
4929 global. Cache attributes and insn length in IDESC.
4930 * sim-model.scm (-gen-cpu-defns): Generate new func @cpu@_prepare_run.
4931 @cpu@_opcode renamed to @cpu@_get_idata.
4932 (-gen-mach-defns,@mach@_init_cpu): Don't initialize IDESC table here,
4933 done later underneath sim_resume.
4934 (@mach@_mach): Record @cpu@_prepare_run.
4935 * sim.scm (<hardware-base>,cxmake-get): New arg selector, all callers
4937 (-hw-gen-set-quiet-pc): Ditto.
4938 (-hw-cxmake-get,-hw-gen-set-quiet): Ditto.
4939 (<hw-memory>,cxmake-get,gen-set-quiet): Ditto.
4940 (<hw-addr>,cxmake-get): Ditto.
4941 (<hw-iaddr>,cxmake-get): Ditto.
4942 (<pc>,cxmake-get): Ditto.
4943 (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Ditto.
4944 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): Ditto.
4945 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
4946 (<hw-pc>,gen-write): Use hw-selector-default.
4947 (<hw-register>,gen-write): Ditto.
4948 (<hw-memory>,gen-write): Ditto.
4949 (-gen-hw-index-raw,-gen-hw-index): Handle selector.
4950 (-gen-hw-selector): New proc.
4952 * desc.scm: New file.
4953 * desc-cpu.scm: New file.
4954 * opcodes.scm: Split up into several smaller files.
4955 * opc-asmdis.scm: New file.
4956 * opc-ibld.scm: New file.
4957 * opc-itab.scm: New file.
4958 * opc-opinst.scm: New file.
4959 * Makefile.am (desc): New target.
4960 (opcodes): Update args to cgen-opc.scm.
4961 * Makefile.in: Rebuild.
4962 * aclocal.m4: Rebuild.
4963 * config.in: Rebuild.
4964 * configure.in: Update arg to AC_INIT.
4965 Update version number to 0.7.0. Change AM_EXEEXT to AC_EXEEXT.
4966 Update AC_PREREG arg to 2.13. Change AM_PROG_INSTALL to
4968 * configure: Rebuild.
4969 * cgen-gas.scm: Update files to load.
4970 * cgen-opc.scm: Ditto. Reorganize option letters.
4971 * cgen-sim.scm: Update files to load.
4972 * cgen-stest.scm: Ditto.
4973 * dev.scm (cload): New app "DESC".
4974 (load-opc): Update files to load.
4975 (load-gtest,load-sim,load-stest): Ditto.
4977 * attr.scm (bool-attr?): New proc.
4978 (attr-list-enum-list): New proc.
4979 (-attr-sort): Rewrite.
4980 (attr-builtin!): Give ALIAS attribute a fixed index.
4981 * utils-cgen.scm (gen-attr-enum-decl): Call attr-list-enum-list to
4982 calculate attribute enum list.
4983 (gen-attr-mask): Subtract CGEN_ATTR_BOOL_OFFSET from attribute's enum.
4985 * insn.scm (-insn-parse): Renamed from parse-insn.
4987 * hardware.scm (-hw-parse): New arg errtxt, all callers updated.
4990 * mode.scm (-mode-parse): Renamed from parse-mode.
4992 * operand.scm (<operand>): New member `selector'.
4993 (<operand>,make!): Use default selector.
4994 (hw-selector-default): New variable.
4995 (hw-selector-default?): New proc.
4997 * pmacros.scm (pmacros-init!): New proc.
4998 (-pmacro-{make,name,arg-spec,transformer,comment}): New procs.
4999 (-env-set!): Delete.
5000 (-pmacro-expand): New proc apply-macro.
5001 Use it in scan-list,scan. Scan list first, then see if macro
5003 (define-pmacro): Rewrite.
5004 * read.scm (-init-parse-cpu!): Call utils-init!,parse-init!.
5006 * rtl.scm (-simplify-for-compilation): Ensure at least one mach
5007 selected if (current-mach) seen.
5008 (rtx?): Renamed from rtx-uneval?, all callers updated.
5009 (<c-expr>,gen-set-quiet,gen-set-trace): New arg selector, all callers
5011 (<c-expr-temp>,cxmake-get,gen-set-quiet,gen-set-trace): New arg
5012 selector, all callers updated.
5013 (hw:): New arg selector, all callers updated. Delete old comments
5015 (reg:,mem:): Handle selectors
5016 * rtx-funcs.scm (reg:): Handle selectors.
5018 * read.scm: Renamed from cpu.scm.
5019 (<command>): New class.
5020 (<reader>): New member commands.
5021 (reader-add-command!): New proc.
5022 (reader-lookup-command): New proc.
5023 (reader-error,-reader-process-expanded,reader-process): New procs.
5024 (reader-read-file!): New proc.
5025 (include): Call reader-read-file!.
5027 (cpu-load): Call reader-read-file!.
5028 * utils.scm (num-args): New proc.
5029 * simplify.inc: New file.
5030 * *.scm: Delete def-foo procs. Rewrite define-foo/define-full-foo
5031 procs. Move define-normal-foo procs (and abbreviated forms) to
5032 simplify.inc. Install define-foo/define-full-foo commands in foo-init!
5034 * fr30.cpu: Include simplify.inc.
5035 * fr30.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
5036 * i960.cpu: Include simplify.inc.
5037 * m32r.cpu: Include simplify.inc.
5038 * m32r.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
5039 (CGEN_PRINT_NORMAL): Use CGEN_BOOL_ATTR.
5040 * sparc.cpu: Include simplify.inc.
5041 * sparc.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
5042 * utils-cgen.scm (parse-error): Moved to read.scm.
5043 (sanitize): Rewrite.
5044 (utils-init!): New proc.
5046 1999-02-02 Doug Evans <devans@casey.cygnus.com>
5048 * sparc.cpu: New file.
5049 * sparc32.cpu: New file.
5050 * sparc64.cpu: New file.
5051 * sparccom.cpu: New file.
5052 * sparc.opc: New file.
5054 1999-01-27 Frank Eigler <fche@cygnus.com>
5056 * utils.scm (gen-copyright): New proc.
5058 1999-01-27 Doug Evans <devans@casey.cygnus.com>
5060 Parameterize rtl parsing, rather than having lots of little handlers.
5061 * rtl.scm (<rtx-func>): New members arg-types,arg-modes.
5062 Delete member traverse.
5063 (rtx:set-traverse!): Delete.
5064 (-rtx-valid-types,-rtx-valid-matches): New variables.
5065 (-rtx-func-lookup): Take symbol or <rtx-func> object as argument
5066 instead of expression. All callers updated.
5067 (def-rtx-node): New args arg-types,arg-modes.
5068 (def-rtx-syntax-node): Ditto.
5069 (def-rtx-dual-mode): Ditto.
5070 (-rtx-macro-expand-list): Renamed from -rtx-macro-maybe-expand-list.
5071 All callers updated.
5072 (-rtx-macro-expand): Renamed from -rtx-macro-maybe-expand.
5073 All callers updated.
5074 (rtx-macro-expand): New proc.
5075 (-rtx-traverse-check-args): Delete.
5076 (-rtx-traverse-normal): Call -rtx-traverse-expr rather than calling
5077 an rtx specific traverser.
5078 (-rtx-any-mode?,-rtx-symornum?): New procs.
5079 (-rtx-traverse-rtx-list,-rtx-traverse-error): New proc.
5080 (-rtx-traverse-no-mode): Delete.
5081 (-rtx-traverse-syntax-expr,-rtx-traverse-syntax-no-mode): Delete.
5082 (-rtx-traverse-operands): Rewrite.
5083 (-rtx-traverse-expr): Rewrite.
5084 (rtx-traverse): Don't expand macros here, leave for caller to do.
5085 (rtx-simplify): Delete.
5086 (rtx-compile-time-constant?): Rewrite. Handle FALSE/TRUE for boolean
5088 (rtx-true?,rtx-false?): Ditto.
5089 (-rtx-ref-type): Set dest is operand 1 now.
5090 (-simplify-for-compilation): New proc.
5091 (semantic-in-out-operands): Recognize regno as an alias for index-of.
5092 Expand macros before calling rtx-traverse. Sort operands by name
5093 to avoid unnecessary semantic formats.
5094 (semantic-attrs): New proc.
5095 (rtx-uneval?): Handle (<rtx-func> ...).
5096 (s-boolifop): Delete arg mode. All callers updated.
5097 * rtx-funcs.scm (all non-macros): Add arg-type and arg-mode specs.
5098 (eq-attr): New arg obj.
5100 * m32r.cpu (rach): Update calls to andif.
5102 * minsn.scm (-minsn-parse-expansion): Renamed from
5103 parse-minsn-expansion.
5104 (-minsn-parse): Renamed from parse-minsn.
5105 (-minsn-read): Renamed from read-minsn.
5106 (def-minsn): Don't check APPLICATION here.
5107 (def-full-minsn): New proc.
5108 (define-macro-insn): Check APPLICATION here. Expand macros.
5109 (define-normal-macro-insn): Ditto.
5111 * utils.scm (word-value): New arg start-lsb?.
5112 (word-mask,word-extract): Ditto.
5113 (split-bits,powers-of-2): Use integer-expt instead of expt.
5114 (bit-set?): Handle 32 bit values (which are bignums).
5115 (cg-logand,cg-logxor): New functions.
5116 * ifield.scm (<ifield>,field-mask): Update call to word-mask.
5117 (<ifield>,field-value): Update call to word-value.
5118 (<ifield>,min-value): Use integer-expt instead of expt.
5119 (<ifield>,max-value): Ditto.
5121 * hardware.scm (<hw-register>,new-mode): Rename local mode to cur-mode.
5123 * insn.scm (def-full-insn): Discard ALIAS insns if simulator.
5125 Compute raw instruction format in addition to semantic based format.
5126 * iformat.scm: Delete members cti?,sem-in-ops,sem-out-ops.
5127 (<iformat> accessors): Rename accessors to ifmt-*.
5128 (<sformat>): New class.
5129 (fmt-enum): Renamed from fmt:enum.
5130 (-ifmt-search-key): Rewrite.
5131 (-sfmt-search-key): New proc.
5132 (ifmt-analyze): Rename arg include-sem-operands? to compute-sformat?
5133 Compute iformat and sformat search keys.
5134 (ifmt-build): Update.
5135 (sfmt-build): New proc.
5136 (-ifmt-lookup-ifmt!,-ifmt-lookup-sfmt!): New procs.
5137 (ifmt-compute!): Compute instruction format <iformat> based on
5138 instruction fields alone. Compute new semantic format <sformat>
5139 based on instruction fields and semantic information.
5140 (ifmt:lookup): Delete.
5141 * mach.scm (<arch>): New member sfmt-list, plus accessors.
5142 (current-sfmt-list): New proc.
5143 * insn.scm (<insn>): Rename member fmt-tmp to tmp.
5144 Rename member fmt to ifmt. New members fmt-desc, sfmt.
5145 (insn-length,insn-length-bytes): Update.
5146 (insn:mask-length,insn:mask): Update.
5147 (insn-lookup-op): Update.
5148 * gas-test.scm (gas-test-analyze!): Update.
5149 (gen-gas-test): Ditto.
5150 * sim-test.scm (sim-test-analyze!): Update.
5151 (gen-sim-test): Ditto.
5152 * opcodes.scm (gen-operand-instance-table): Update.
5153 (gen-operand-instance-ref): Ditto.
5154 (max-operand-instances): Use heuristic if semantics not parsed.
5155 (ifmt-opcode-operands): Renamed from fmt-opcode-operands.
5156 (opcodes-analyze!): Only scan semantics of building operand instance
5158 * sim-cpu.scm (*) Update calls to <iformat>/<sformat> accessors.
5159 (-gen-extract-ifmt-macro): Renamed from -gen-extract-fmt-macro.
5160 * sim-decode.scm (*) Update calls to <iformat>/<sformat> accessors.
5161 (gen-sfmt-argvars-defns): Renamed from gen-ifmt-argvars-defns.
5162 (gen-sfmt-argvars-assigns): Renamed from gen-ifmt-argvars-assigns.
5163 * sim-model.scm (*) Update calls to <iformat>/<sformat> accessors.
5164 * sim.scm (*) Update calls to <iformat>/<sformat> accessors.
5166 * sim-decode.scm (usable-decode-bit?): Rename from decode-bit?
5167 New arg lsb0? All callers updated.
5168 (decode-bits): New arg lsb0?. All callers updated.
5169 (opcode-slots): Update call to bit-set?. Call integer-expt instead
5171 (-gen-decode-bits): New arg lsb0?. All callers updated.
5172 (build-slots): Call integer-expt instead of expt.
5173 (build-decode-table-entry): Handle crossing word boundaries better.
5174 (-gen-decode-switch): New arg lsb0?. All callers updated.
5175 (-gen-extract-decls): Rename decode format entry from ifmt to sfmt.
5177 * enum.scm (define-enum): Rewrite.
5178 (define-normal-enum): Ditto.
5179 (def-full-insn-enum): New proc.
5180 (define-normal-insn-enum): Rewrite.
5182 * attr.scm (<bitset-attribute>,gen-value-for-defn): Ensure result is
5184 (<{integer,enum}-attribute>,gen-value-for-defn): Ditto.
5186 * dev.scm: Add sid support.
5188 * Makefile.am (opcodes,sim-arch,sim-cpu): New targets.
5189 (CLEANFILES): Add tmp-*.
5190 * Makefile.in: Rebuild.
5192 * doc/Makefile.am: New file.
5193 * doc/Makefile.in: New file.
5194 * doc/cgen.texi: New file.
5195 * Makefile.am (SUBDIRS): Define.
5196 * Makefile.in: Rebuild.
5197 * configure.in: Create doc/Makefile.
5198 * configure: Rebuild.
5200 1999-01-18 Doug Evans <devans@casey.cygnus.com>
5202 * insn.scm (insn:syn): Delete.
5204 1999-01-15 Doug Evans <devans@casey.cygnus.com>
5206 * fr30.cpu (model fr30-1): Add state variables load-regs,
5207 load-regs-pending. Delete h-gr. Clean up operand names of all units.
5208 * m32r.cpu (model m32r/d): Clean up operand names of u-exec.
5209 (model m32rx): Ditto.
5210 (addi): Simplify function unit usage spec.
5211 (ld-plus): Rewrite operand names in function unit usage spec.
5212 (mvtachi,mvtachi-a,mvtaclo,mvtaclo-a,st-plus,st-minus): Ditto.
5213 * sim.scm (<unit>,gen-profile-code): Redo how operand names are
5214 overridden. Allow operand to appear in input and output spec.
5215 (<insn>,gen-profile-code): string-append -> string-list.
5217 * ifield.scm (define-ifield): Call pmacro-expand.
5218 (define-full-ifield,define-normal-ifield): Ditto.
5219 (define-multi-ifield,define-normal-multi-ifield): Ditto.
5221 * sim.scm (gen-argbuf-type): Keep leading part of ARGBUF same for
5222 with-scache and without-scache cases.
5224 1999-01-14 Doug Evans <devans@casey.cygnus.com>
5226 * fr30.cpu (fr30-1): Add state variable h-gr.
5227 Add units u-cti, u-load, u-store, u-ldm, u-stm.
5228 (all insns): First pass at providing cycle counts.
5229 * sim.scm (<unit>,gen-profile-code): Only check for output operands
5230 when initializing unit output operands, ditto for input operands.
5232 * insn.scm (insn-length,insn-length-bytes): New procs.
5233 * mach.scm (-adata-set-derived!): Use them.
5234 * sim-cpu.scm (-gen-sem-case): Ditto.
5236 * sim-cpu.scm (-gen-trace-record-type): PCADDR->IADDR.
5237 (-gen-write-case): Ditto.
5238 (gen-semantic-fn): Ditto. Split into two:
5239 -gen-scache-semantic-fn and -gen-no-scache-semantic-fn. Fix bitrot
5241 (-gen-all-semantic-fns): Renamed from -gen-all-semantics. Handle
5242 scache/no-scache appropriately. All callers updated.
5243 (-gen-sem-case): PCADDR->IADDR.
5244 * sim.scm (gen-argbuf-type): PCADDR->IADDR.
5246 * sim-decode.scm (*): Replace string-append,string-map with
5247 string-list,string-list-map where the result is sufficiently large.
5248 (-gen-decode-insn-table): Go back to simple version for non-scache
5249 case: just record IDESC in decoder tables and leave field extraction
5251 (-gen-decode-switch): Ditto.
5252 (-gen-decode-fn): Ditto.
5253 (-gen-extract-decls): Only emit format enum if with-scache?.
5254 * sim-model.scm (-gen-model-insn-fn): Extract ifields here in
5256 (-gen-model-insn-fns): Don't emit model fns for virtual insns.
5257 (-gen-insn-timing): Ditto.
5258 * sim.scm (gen-argbuf-type): Only output sem_fields union in
5261 * sim.scm (-hw-gen-fun-get): Use GET_<H-NAME> macro.
5262 (-hw-gen-fun-set): Use SET_<H-NAME> macro.
5264 1999-01-12 Doug Evans <devans@casey.cygnus.com>
5266 * cpu.scm (keep-mach-validate!): New proc.
5267 (include): New proc.
5269 * mach.scm (current-arch-mach-name-list): New proc.
5270 (-parse-arch-machs): Always return canonical form.
5271 (def-arch): Validate user specified machs to be kept.
5272 (def-mach-attr!): Simplify.
5274 * opcodes.scm (-opcodes-build-operand-instance-table?): New global.
5275 (option-init!): Initialize it.
5276 (option-set!): Set it.
5277 (gen-insn-table-entry): Emit 0 for operand instance ref if not
5278 output operand instance tables.
5279 (cgen-opc.in): Only output operand instance tables if asked to.
5281 * sim.scm (option-init!,option-set!): Clarify returned value.
5283 * sim.scm (gen-mach-bfd-name): Move from here.
5284 * utils-cgen.scm: To here.
5286 1999-01-11 Doug Evans <devans@casey.cygnus.com>
5288 * fr30.cpu (ilm): Fix comment field.
5289 (cond-branch): Remove explicit setting of COND-CTI, let cgen
5292 * rtl.scm (rtx-simplify,rtx-compile-time-constant?): New procs.
5293 (rtx-true?, rtx-false?): New procs.
5294 * rtx-funcs.scm (annul): Rename vpc to pc.
5295 (-rtx-traverse-if): Improve determination of whether then/else parts
5296 are conditionally executed.
5298 * sim.scm (-gen-argbuf-fields-union): Move definition of union to
5300 (gen-argbuf-type): Simplify generated definition (big sem_fields
5301 union moved outside).
5303 1999-01-11 Ben Elliston <bje@cygnus.com>
5305 * doc/porting.texi: New file.
5307 * doc/intro.texi: New file.
5308 (Layout): Use @example to insert preformatted ASCII text (such as
5309 diagrams). @code is inappropriate here.
5311 1999-01-06 Doug Evans <devans@casey.cygnus.com>
5313 * ifield.scm (-multi-ifield-read): Fix handling of insert/extract.
5315 * m32r.opc (print_hash): Cast dis_info.
5317 * sim-cpu.scm (-gen-hardware-types): Sanitize get/set macros.
5318 * sim.scm (<sim-hardware>,make!): Emit a comment for user-written
5321 1999-01-05 Doug Evans <devans@casey.cygnus.com>
5323 * i960.cpu (f-br-disp): Remove RELOC attribute.
5324 (f-ctrl-disp): Ditto.
5325 (callx-disp): set-quiet -> set for (reg h-gr 2).
5326 (callx-indirect,callx-indirect-offset): Ditto.
5328 * Makefile.am (gas-test): Fix dependencies.
5329 * Makefile.in: Rebuild.
5330 * cgen-gas.asm: File creation args are -<uppercase-letter>.
5331 * gas-test.scm (break-out-syntax,make-file-name): Delete.
5332 (gas-test-analyze!): Use syntax-break-out.
5333 * sim-test.scm (break-out-syntax,make-file-name): Delete.
5334 (sim-test-analyze!): Use syntax-break-out.
5335 (cgen-build.sh): Use gen-file-name.
5336 (cgen-allinsn.exp): Compute and pass all machs to run_sim_test.
5337 * insn.scm (syntax-break-out): New proc.
5338 * utils.scm (gen-file-name): New proc.
5340 * fixup.scm (nil,<?,<=?,>?): Delete.
5342 * utils.scm (count-true): Rewrite.
5344 * slib/sort.scm: Move sort.scm to slib directory.
5347 * iformat.scm (ifmt-compute!): Record empty format.
5349 * rtl.scm (semantic-in-out-operands): Simplify by moving several
5350 internal procs outside. Handle expression register numbers.
5353 * rtx-funcs.scm (annul): Rename new_pc to vpc.
5355 * sim-cpu.scm (-gen-cpu-reg-access-defns): Define access fns for
5357 (-gen-write-case): Pass vpc to SEM_BRANCH_FINI.
5358 (gen-semantic-fn,-gen-sem-case): Ditto.
5359 (cgen-cpu.c): Define WANT_CPU to @cpu@.
5360 (cgen-semantics.c): Ditto.
5361 * sim-decode.scm (-gen-extract-decls): Handle non-with-scache case.
5362 (gen-ifmt-argvars-defns): New proc.
5363 (gen-ifmt-argvars-assigns): New proc.
5364 (-gen-all-extractors): Delete FMT_EMPTY case, now handled like others.
5365 (-gen-decode-fn): Handle non-with-scache case.
5366 (cgen-decode.c): Define WANT_CPU to @cpu@.
5367 * sim-models.scm (-gen-mach-defns): Emit bfd name.
5368 (cgen-model.c): Define WANT_CPU to @cpu@.
5369 * sim.scm (gen-ifld-extract-argvar): New proc.
5370 (<sim-hardware>,make!): Don't emit [GS]ET_H_FOO macros for elements
5371 with FUN-ACCESS specified.
5372 (hw-fun-access?): New proc, as <hardware-base>:fun-access? method.
5373 (<hw-register>,gen-extract): New arg local?.
5374 (<hw-address>,gen-extract): Ditto.
5375 (-hw-cxmake-get): Handle non-with-scache case.
5376 (-hw-gen-set-quiet): Ditto.
5377 (<hw-address>,cxmake-get): Handle non-with-scache case.
5378 (gen-op-extract-argvar): New proc.
5379 (<operand>,gen-record-profile): Rewrite.
5380 (<operand>,gen-profile-code): Rewrite.
5381 (<unit>,gen-profile-code): Use -gen-argfld-ref.
5382 (gen-argbuf-fields-union): New proc.
5383 (gen-argbuf-type): Use it. Handle non-scache case.
5385 * *.scm: class:foo procs renamed to class-foo.
5386 * attr.scm (<attribute>): New member `for'.
5387 (-attr-parse): New first value in list for default if
5389 (non-bool-attr-list,attr:add!): Delete.
5390 (def-attr): Use current-attr-add!.
5391 (atlist-attr-value-no-default): New proc.
5392 (attr-lookup-default): Handle boolean attributes.
5393 (gen-attr-enum): New proc.
5394 (-attr-remove-meta-attrs-alist): New proc.
5395 (attr-nub): New proc.
5396 (current-attr-list-for): New proc.
5397 (current-{ifld,hw,op,insn}-attr-list): New procs.
5398 (attr-builtin!): New proc.
5399 * cpu.scm (keep-obj?): Rewrite.
5400 (-init-parse-cpu!): Call arch-init!.
5401 (-install-builtin!): Call {attr,mode,ifield,insn}-builtin!.
5402 (-finish-parse-cpu!): Call arch-finish!.
5403 * enum.scm (enum-list,enum:add,enum:lookup): Delete.
5404 (def-enum,def-full-enum): Use current-enum-add!.
5405 (gen-obj-list-enums): New proc.
5406 * hardware.scm (hw:add!,hw:lookup): Delete.
5407 (def-hardware,def-hardware-ext): Use current-hw-add!.
5408 (hw:std-attrs,hw:attr-list): Delete.
5409 (hardware-builtin!): Define builtin hardware attributes.
5410 * ifield.scm (ifld:add!,ifld:lookup): Delete.
5411 (def-ifield,def-full-ifield): Use current-ifld-add!.
5412 (ifld:std-attrs,ifld:attr-list): Delete.
5413 (ifield-builtin!): New proc.
5414 * insn.scm (insn:add!,insn:lookup): Delete.
5415 (def-full-insn): Use current-insn-add!.
5416 (insn:std-attrs): Delete.
5417 (insn-builtin!): New proc.
5418 * mach.scm (<arch>): New members attr-list,enum-list,op-list,
5420 (<arch-data>): New member machs.
5421 (current-attr-list,current-enum-list): New procs.
5422 (current-op-list,current-minsn-list): New procs.
5423 (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-add!): Ditto.
5424 (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-lookup):
5426 (-parse-arch-machs): New proc.
5427 (-arch-parse): New arg machs, all callers updated.
5428 (-arch-read): Handle machs spec.
5429 (def-arch): Define MACH attribute here.
5430 (mach-init!,mach-finish!): Not here.
5431 (cpu:add!,cpu:lookup): Delete.
5432 (def-cpu): Use current-cpu-add!.
5433 (<mach>): New member bfd-name.
5434 (-mach-parse): New arg bfd-name, all callers updated.
5435 (-mach-read): Handle bfd-name spec.
5436 (mach:add!,mach:lookup): Delete.
5437 (def-mach): Use current-mach-add!.
5438 (def-mach-attr!): New proc.
5439 (arch-init!): New proc.
5440 (arch-finish!): New proc. Reverse all object lists here.
5441 * minsn.scm (minsn-list,minsn-add!,minsn:lookup): Delete.
5442 (def-minsn): Use current-minsn-add!. Ignore minsn if mach not kept.
5443 (define-normal-macro-insn): Ignore minsn if mach not kept.
5444 * mode.scm (mode-builtin!): New proc.
5445 * model.scm (model:add!,model:lookup): Delete.
5446 (def-model): Use current-model-add!.
5447 * opcodes.scm (insn:attr-list): Delete.
5448 (attr-bool-gen-decl,attr-bool-gen-defn): New procs.
5449 (gen-attr-table-defn): Emit value for default.
5450 (gen-attr-table-defns): Emit bool_attr. Emit ifield attr table.
5451 (op:attr-list): Delete.
5452 (gen-operand-decls,gen-insn-decls): New proc.
5453 (compute-insn-attr-list): Delete.
5454 (cgen-opc.h): Reorganize and simplify.
5455 * operand.scm (-operand-list,operand-list,op:add,op:lookup): Delete.
5456 (def-operand,def-full-operand): Use current-op-add!.
5457 (op:std-attrs): Delete.
5458 (operand-enum): Delete.
5459 (operand-builtin!): Define builtin operand attrs.
5460 * utils-cgen.scm (sanitize): Update calls to lookup procs.
5461 (gen-attr-enum-decl): Use gen-obj-list-enums.
5462 (gen-obj-attr-defn): Renamed from gen-attr-defn, all callers updated.
5464 * fr30.cpu (define-arch): Add machs spec.
5465 (f-i4): SIGNED attribute -> !UNSIGNED.
5466 (f-disp8,f-disp9,f-disp10,f-s10,f-rel9,f-rel12): Ditto.
5467 (HASH-PREFIX): Define operand attribute.
5468 (NOT-IN-DELAY-SLOT): Define insn attribute.
5469 * i960.cpu (define-arch): Add machs spec.
5470 * m32r.cpu (define-arch): Add machs spec.
5471 (h-hi16): Remove UNSIGNED,SIGN-OPT attributes.
5472 (HASH-PREFIX): Define operand attribute.
5473 (FILL-SLOT): Define insn attribute.
5475 Thu Dec 17 17:15:06 1998 Dave Brolley <brolley@cygnus.com>
5477 * fr30.cpu (stilm): Correct mask for and operation.
5479 1998-12-17 Doug Evans <devans@casey.cygnus.com>
5481 * sim-test.scm (cgen-build.sh): Use `mach' to specify machs, not `cpu'.
5482 Replace START/EXIT with start/pass.
5483 (gen-sim-test): Delete ".text".
5485 Wed Dec 16 16:16:39 1998 Dave Brolley <brolley@cygnus.com>
5487 * fr30.cpu (cond-branch): Conditional branches not allowed in delay slots.
5489 Tue Dec 15 17:30:01 1998 Dave Brolley <brolley@cygnus.com>
5491 * fr30.cpu: Add NOT-IN-DELAY-SLOT as appropriate.
5492 (h-sbit): Make it FUN-ACCESS.
5493 (h-gr): Reorder so that general regs are always printed by number.
5495 1998-12-14 James E Wilson <wilson@wilson-pc.cygnus.com>
5497 * i960.cpu (flushreg): Use nop.
5499 1998-12-14 Doug Evans <devans@casey.cygnus.com>
5501 * m32r.cpu (default-alignment): Specify.
5502 * mach.scm (<arch-data>): New member default-alignment.
5503 (adata:default-alignment): New proc.
5504 (current-arch-default-alignment): New proc.
5505 (-arch-parse): New arg default-alignment.
5506 (parse-alignment): New proc.
5507 (-arch-read): Handle default-alignment spec.
5509 * rtx-funcs.scm (attr:): Pass attr-name through gen-c-symbol.
5511 * insn.scm (f-%): Delete.
5512 * sim-cpu.scm (gen-define-fields): Delete support for f-%. Can
5513 be readded if proved useful.
5514 (gen-extract-fields): Ditto. Use gen-ifetch.
5515 * sim.scm (<hw-memory>,cxmake-get): Pass pc to GETMEM*.
5516 (<hw-memory>,gen-set-quiet): Pass pc to SETMEM*.
5518 Mon Dec 14 16:20:59 1998 Dave Brolley <brolley@cygnus.com>
5520 * fr30.cpu (div2): Set zbit properly when remainder not zero.
5522 1998-12-14 Dave Brolley <brolley@cygnus.com>
5524 * fr30.cpu: Remove stub macros.
5525 (div1): Shift bits from mdl into mdh. Don't use addc/subc.
5526 (div2): Don't use addc/subc.
5528 1998-12-11 Doug Evans <devans@casey.cygnus.com>
5530 * utils-cgen.scm (gen-obj-sanitize): Only catch spelling errors
5533 Thu Dec 10 18:37:34 1998 Dave Brolley <brolley@cygnus.com>
5535 * fr30.cpu (div0s,div0u,div1,div2,div3,div4s): Implemented.
5537 Thu Dec 10 12:28:53 1998 Doug Evans <devans@canuck.cygnus.com>
5539 * cpu.scm (keep-all?): New proc.
5540 (assert-keep-all): Use it.
5541 * opcodes.scm (gen-ifmt-table-1): Use gen-obj-sanitize.
5542 * utils-cgen.scm (gen-obj-sanitize): Handle macro-insns.
5543 Check for spelling errors.
5545 1998-12-09 Doug Evans <devans@casey.cygnus.com>
5547 * rtl.scm (s-convop): Call -rtx-sem-mode.
5549 Tue Dec 8 10:58:38 1998 Doug Evans <devans@canuck.cygnus.com>
5551 * hardware.scm (-parse-hw-type): parse! no longer returns a result.
5552 (-parse-hw-profile): Ditto.
5553 (<hw-register>, parse!): Return `void' result.
5554 (<hw-pc>, parse!): Ditto.
5555 (<hw-memory>, parse!): Ditto.
5556 (<hw-immediate>, parse!): Ditto.
5557 (<hw-address>, parse!): Ditto.
5559 * ifield.scm (-ifield-parse): Validate encode/decode fields.
5560 (-ifld-parse-encode-decode): New proc.
5561 (-ifld-parse-encode,-ifld-parse-decode): New proc.
5562 (-multi-ifield-parse): Set encode/decode to #f.
5563 (ifld:decode-mode): New proc.
5564 * utils.scm (nub): Rewrite.
5565 * operand.scm (op-nub): Rewrite.
5566 * sim.scm (<ifield>, gen-type): Rewrite.
5567 (-gen-ifld-argbuf-defn): New proc.
5568 (gen-ifld-extract,gen-ifld-trace-extract): New procs.
5569 (<sim-hardware>): Forward gen-trace-extract onto `type'.
5570 Ditto for needed-iflds. gen-argbuf-defn renamed from gen-argbuf-elm.
5571 (<hardware-base>): New method needed-iflds. gen-argbuf-defn
5572 renamed from gen-argbuf-elm, return "". Rewrite gen-extract.
5573 New method gen-trace-extract.
5574 (<hw-register>): New method needed-iflds. gen-argbuf-defn renamed
5575 from gen-argbuf-elm, return "" if not caching register address.
5576 Rewrite gen-extract. New method gen-trace-extract.
5577 (<hw-address>): New methods needed-iflds, gen-argbuf-defn,
5578 gen-extract, gen-trace-extract, cxmake-get.
5579 (<hw-iaddress>): New method cxmake-get.
5580 (op-needed-iflds): New proc.
5581 (<operand>): Delete methods gen-argbuf-elm, gen-extract.
5582 (-gen-op-argbuf-defn): New proc.
5583 (gen-op-extract): Renamed from op:extract.
5584 (gen-op-trace-extract): Renamed from op:trace-extract.
5585 (fmt-extractable-operands): Renamed from fmt-semantic-operands
5587 (gen-argbuf-elm): Rewrite.
5588 * sim-decode.scm (-gen-record-args): Update.
5590 * sim.scm (c-cpu-macro): Renamed from cpu-deref. All uses changed.
5592 * pmacros.scm (-pmacro-expand): Handle procedural macros in
5593 argument position. Flag symbolic macros in function position as
5595 (define-pmacro): Handle quoting in definition of symbolic macros.
5596 (pmacro-trace): Call -pmacro-expand, not -pmacro-ref.
5598 Tue Dec 8 13:06:44 1998 Dave Brolley <brolley@cygnus.com>
5600 * fr30.opc (parse_register_list): Account for reverse masks
5602 (print_register_list): Ditto.
5603 (parse_low_register_list_ld): New function.
5604 (parse_hi_register_list_ld): New function.
5605 (parse_low_register_list_st): New function.
5606 (parse_hi_register_list_st): New function.
5607 (print_hi_register_list_ld): New function.
5608 (print_hi_register_list_st): New function.
5609 (print_low_register_list_ld): New function.
5610 (print_low_register_list_st): New function.
5611 * fr30.cpu (ldr15dr): Implement workaround.
5612 (ldm0,ldm1,stm0,stm1): Implemented.
5614 1998-12-08 Doug Evans <devans@casey.cygnus.com>
5616 * configure.in: Rename --with-hobbit to --with-cgen-hobbit.
5617 * configure: Regenerate.
5618 * Makefile.am (WITH_HOBBIT): Update.
5619 (cgen-hob.c): Remove Makefile dependency.
5620 (cgen.o): Depend on cgen-gh.h, config.h.
5621 * Makefile.in: Regenerate.
5622 * aclocal.m4: Regenerate.
5624 1998-12-07 James E Wilson <wilson@wilson-pc.cygnus.com>
5626 * i960.cpu, i960.opc: New files.
5628 Mon Dec 7 14:30:24 1998 Dave Brolley <brolley@cygnus.com>
5630 * fr30.opc (parse_register_number): New function.
5631 (parse_register_list): New function.
5632 (parse_low_register_list): Use parse_register_list.
5633 (parse_hi_register_list): Use parse_register_list.
5634 * fr30.cpu (sth): Fix assembler syntax. Implement more
5637 Fri Dec 4 16:07:13 1998 Doug Evans <devans@canuck.cygnus.com>
5639 * sim-cpu.scm (cgen-sem-switch.c): Update definition of TRACE_RESULT.
5640 * sim-decode.scm (-gen-record-args): Update call to TRACE_EXTRACT.
5641 * sim.scm (-op-gen-set-trace): Update call to TRACE_RESULT.
5642 (-op-gen-set-trace-parallel): Ditto.
5643 (gen-argbuf-type): New ARGBUF members trace_p,profile_p;
5645 * fr30.cpu (call,calld): Fix setting of pc.
5646 (f-op5): Fix start bit number.
5648 Fri Dec 4 17:06:28 1998 Dave Brolley <brolley@cygnus.com>
5650 * fr30.cpu (st): Fix operand ordering. Implement more
5653 Thu Dec 3 23:59:40 1998 Doug Evans <devans@canuck.cygnus.com>
5655 * ifield.scm (ifld:mode,ifld:hw-type): New procs.
5656 * iformat.scm (fmt-opcode-operands): Move to opcodes.scm.
5657 (fmt-semantic-operands): Move to sim.scm.
5658 * opcodes.scm (fmt-opcode-operands): Moved here from iformat.scm.
5659 * operand.scm (<hw-index>): New member `name'. All builders updated.
5660 (<hw-index>): New method get-name.
5661 (op-profilable?): Moved to sim.scm.
5663 * sim.scm (fmt-semantic-operands): Moved here from iformat.scm.
5664 (op-profilable?): Moved here from operand.scm.
5665 (gen-extract-type): Delete.
5666 (c-argfld-macro): Renamed from c-ifield-macro. All uses updated.
5667 (-gen-argfld-ref): New proc.
5668 (-gen-ifld-argfld-name): New proc.
5669 (gen-ifld-argfld-ref): Renamed from -gen-ifld-ref. All uses updated.
5670 (-gen-ifld-decoded-val): Renamed from -gen-ifld-raw-val.
5671 (-gen-hw-index-argfld-name,-gen-hw-index-argfld-ref): New procs.
5672 (<hardware-base>): Delete method gen-extract-type. New method
5674 (<hw-register): Ditto. Update method gen-extract.
5675 (<operand>, method gen-argbuf-elm): Rewrite.
5676 * rtl.scm (semantic-in-out-operands): Handle (ifield f-name).
5677 (s-cmpop): Fix handling of eq,ne for unsigned modes.
5678 * rtx-funcs.scm (eq,ne,lt,le,gt,ge,ltu,leu,gtu,geu): Update.
5680 * sim-decode.scm (-gen-record-args): Tweak.
5682 * sim.scm (gen-argbuf-elm): Handle case of all constant opcode fields.
5684 Thu Dec 3 14:23:27 1998 Dave Brolley <brolley@cygnus.com>
5686 * doc/porting: Fix typo: gas->sim.
5687 * fr30.opc (print_m4): New function.
5688 * fr30.cpu: Implemented many insns.
5690 Thu Dec 3 00:03:16 1998 Doug Evans <devans@canuck.cygnus.com>
5692 * rtl.scm (build-reg-operand!): Remove redundant setting of hw-name.
5694 * fr30.cpu (f-rel9): Delete RELOC attribute.
5695 (f-rel12): Add PCREL-ADDR attribute.
5696 (label9): Make an h-iaddr, not h-uint. Delete asm print spec.
5697 (label12): Delete PCREL-ADDR attribute. Make an h-iaddr, not h-sint.
5698 * fr30.opc (print_label9): Delete.
5700 * iformat.scm (ifmt-analyze): Check attributes derived from semantic
5701 code for CTI indicators.
5702 * insn.scm (insn-cti?): Simplify.
5703 * utils-cgen.scm (atlist:cti?): New proc.
5705 1998-11-30 Doug Evans <devans@casey.cygnus.com>
5707 * fr30.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
5708 (f-i20-4,f-i20-16,f-i20): New fields.
5714 * fr30.opc (CGEN_DIS_HASH_SIZE,CGEN_DIS_HASH): Define in opc.h.
5715 * m32r.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
5716 * mach.scm (arch-data): Ditto.
5717 (current-arch-default-insn-word-bitsize): Renamed from
5718 current-arch-default-insn-bitsize [ya, that's a pretty long name].
5719 (-arch-read): Update.
5721 * hardware.scm (hw:attr-list): Move here ...
5722 * opcodes.scm: ... from here.
5724 * ifield.scm (fld:bitrange): Delete.
5725 (fld:word-offset,fld:word-length): New procs.
5726 (ifield?): Use class-instance.
5727 (<ifield>, method field-start): Rewrite.
5728 (ifld:enum): New proc.
5729 (<ifield>, methods field-mask,field-value): Rewrite.
5730 (-ifield-parse): Rewrite.
5731 (<multi-ifield> support): Rewrite.
5732 (ifld-beyond-base?): Rewrite.
5733 (ifld:std-attrs): New variable.
5734 (ifld:attr-list): New proc.
5735 * iformat.scm (-compute-insn-mask): Rewrite.
5736 * insn.scm (-parse-insn-format): New arg errtxt, all callers updated.
5738 (-parse-insn-format-symbol,-parse-insn-format-list): New procs.
5739 * opcodes.scm (<hardware>): No longer forward gen-insert,gen-extract
5741 (<operand>): Ditto. Forward onto index instead.
5742 (gen-ifld-decls,gen-ifld-defns): New procs.
5743 (ifld:insert,ifld:extract): New procs.
5744 (<ifield>): New methods gen-insert, gen-extract.
5745 (<multi-ifield>): Ditto.
5746 (<hw-index>): Forward gen-insert,gen-extract onto value.
5747 (<hw-asm>): Delete insert/extract support.
5748 (<hw-register,hw-memory,hw-immediate>): Ditto.
5749 (gen-hash-defines): Use string-list.
5750 Define CGEN_MAX_IFMT_OPERANDS.
5751 (gen-switch): Use string-list,string-list-map.
5752 (gen-fget-switch,gen-fset-switch): Use string-list.
5753 (gen-parse-switch,gen-insert-switch): Ditto.
5754 (gen-extract-switch,gen-print-switch): Ditto.
5755 (gen-insert-switch,gen-extract-switch): New local `total_length'.
5756 (gen-ifmt-table-1,gen-ifmt-table): New procs.
5757 (gen-ifmt-entry): Renamed from gen-iformat-entry, rewrite.
5758 (gen-ivalue-entry): New proc.
5759 (gen-insn-table-entry): Use string-list. Update iformat,ivalue
5760 computation. Use 0 for operand ref table if ALIAS insn.
5761 (gen-minsn-table-entry): Use string-list.
5762 (gen-macro-insn-table): Temporarily emit format tables for ALIAS insns.
5763 (gen-opcode-open): Record address of ifield table.
5764 (cgen-opc.h): Call gen-ifld-decls.
5765 (cgen-opc.in): Call gen-ifld-defns, gen-ifmt-table.
5766 * types.scm (<bitrange>): New members word-offset,word-length.
5767 Delete member total-length. Delete methods start,mask,value.
5768 (bitrange:word-offset,bitrange:word-length): New procs.
5769 * sim-cpu.scm (gen-define-fields): Simplify.
5770 (gen-extract-fields): Simplify.
5771 * sim.scm (<ifield>, gen-ifld-extract): Rewrite.
5772 (<ifield>): New methods gen-ifld-extract-decl.
5773 Delete method gen-ifld-extract-beyond.
5774 (<multi-ifield>): New methods gen-ifld-extract-decl.
5775 (<multi-ifield>, method gen-ifld-extract): Implement.
5776 (-gen-ifld-extract-base,-gen-ifld-extract-beyond): New procs.
5777 (gen-ifld-exttact,gen-ifld-extract-beyond): Delete.
5779 * rtl.scm (-rtx-traverse-no-mode): Process operands.
5780 (-rtx-traverse-syntax-no-mode): New proc.
5781 (semantic-in-out-operands): Watch for `delay' and add DELAY-SLOT attr.
5782 (s-ifield): New proc.
5783 (s-shop): Don't prepend `unsigned' for unsigned modes.
5784 * rtx-funcs.scm (ifield): New rtx function.
5785 (ref,symbol): Use standard -rtx-traverse-syntax-no-mode.
5786 (delay): New rtx function.
5787 * insn.scm (insn:std-attrs): Add DELAY-SLOT.
5789 * cos.scm (-elm-make-method-getter): Fix typo.
5791 * utils.scm (backslash): Handle lists of strings.
5793 Thu Nov 26 11:47:29 1998 Dave Brolley <brolley@cygnus.com>
5795 * fr30.cpu (f-rel9): Correct for pc+2.
5796 (label9): Use print_label9.
5797 * fr30.opc (print_label9): New function.
5799 Tue Nov 24 11:19:35 1998 Dave Brolley <brolley@cygnus.com>
5801 * fr30.cpu: Change $r13,$r14,$r15 to uppercase.
5802 * fr30.opc (parse_low_register_list): Renamed.
5803 (parse_hi_register_list): Renamed.
5804 (print_hi_register_list): Renamed.
5805 (print_low_register_list): Renamed.
5807 Mon Nov 23 18:26:36 1998 Dave Brolley <brolley@cygnus.com>
5809 * fr30.cpu (f-rel9): Now a pc relative offset.
5811 1998-11-23 Doug Evans <devans@casey.cygnus.com>
5813 * opcodes.scm (op-asm): Move to here, from operands.scm.
5814 (<op-asm>, method parse!): Validate arguments.
5815 (<operand>, method gen-function-name): Fix thinko.
5816 * operand.scm (<operand>, method make!): Don't set op-asm here.
5817 * utils.scm (list-elements-ok?): New proc.
5819 * opcodes.scm: Clean up pass.
5821 1998-11-20 Doug Evans <devans@tobor.to.cygnus.com>
5823 * fr30.cpu (int): Defer saving of ps,pc and setting ibit,sbit to
5824 the fr30_int function.
5825 (h-cr): Remove PROFILE,CACHE-ADDR attributes.
5826 (h-dr): Add FUN-ACCESS attribute.
5828 1998-11-20 James E Wilson <wilson@wilson-pc.cygnus.com>
5830 * sim-model.scm (-gen-mach-defns): Use gen-sym instead of obj:name
5831 for C symbol for models array.
5833 Thu Nov 19 15:57:45 1998 Dave Brolley <brolley@cygnus.com>
5835 * fr30.opc (parse_reglist_low): New function.
5836 (parse_reglist_hi): New function.
5837 (print_reglist_low): New function.
5838 (print_reglist_hi): New function.
5839 * fr30.cpu: Finish remaining insn stubs.
5841 1998-11-19 Doug Evans <devans@tobor.to.cygnus.com>
5843 * sim.scm (-gen-extract-word): Handle fields shorter than entire word.
5845 * fr30.cpu (ldi32m): Don't use for disassembly.
5847 Wed Nov 18 21:34:41 1998 Dave Brolley <brolley@cygnus.com>
5849 * fr30.cpu (int): Implement it.
5851 1998-11-18 Doug Evans <devans@casey.cygnus.com>
5853 * rtx-funcs.scm (nop): Fix C code.
5855 * rtl.scm (semantic-in-out-operands): Fix setting of sem-attrs.
5857 * fr30.cpu (f-i32): New ifield.
5860 (ldi32m): New macro insn.
5861 (inte): Provide simple version for now.
5863 * sim-arch.scm: New file.
5864 * sim.scm: Move architecture support generation to sim-arch.scm.
5865 * cgen-sim.scm: Load sim-arch.scm.
5868 * hardware.scm (pc?) New proc.
5869 (class <hardware-base>): Rewrite method 'pc?.
5870 (class <hardware>): Forward 'pc? to the hardware type.
5871 (class <hw-pc>): New method 'pc?.
5873 Add support for variable length ISAs.
5874 * ifield.scm (ifld-beyond-base?): New proc.
5875 * m32r.cpu: Remove integral-insn? spec.
5876 * mach.scm (arch:derived,arch:set-derived!): New procs.
5877 (arch:app-data,arch:set-app-data!): New procs.
5878 (class <arch>): New members derived, app-data.
5879 (class <cpu>): Delete member integral-insn?.
5880 (cpu:integral-insn?): Delete.
5881 (-cpu-parse): Delete arg integral-insn?. All callers updated.
5882 (-cpu-read): Delete integral-insn? support.
5883 (state:decode-assist): Delete.
5884 (state:int-insn?): Delete.
5885 (<derived-arch-data>): New class.
5886 (-adata-set-derived!): New proc.
5887 (mach-finish!): Call it.
5888 * opcodes.scm (<hw-asm>, method gen-extract): Pass pc to C handler.
5889 (gen-operand-instance): Add COND_REF support.
5890 (gen-operand-instance-table): Ditto.
5891 (gen-hash-defines): Update.
5892 (gen-extract-switch): Update type of `insn_value' arg.
5893 (gen-opcode-open): Update type of `value' arg of dis_hash_insn.
5894 * rtl.scm (-rtx-ref-type): Renamed from -rtx-set?. All callers
5896 (semantic-in-out-operands): Compute UNCOND-CTI,COND-CTI from rtl.
5897 * sim-cpu.scm (gen-define-fields): Create vars to hold insn value
5898 beyond the base insn (for large insns).
5899 (-gen-extract-beyond-var-list): New proc.
5900 (gen-extract-fields): Handle large insns.
5901 (-gen-write-case): Update sem_arg computation.
5902 Update initial vpc computation.
5903 (gen-semantic-fn): Ditto. Update type of `insn'.
5904 (-gen-sem-case): Update sem_arg computation.
5905 Update initial vpc computation.
5906 * sim.scm (<ifield>, gen-ifld-extract): Renamed from `extract'.
5907 (-gen-extract-word): New proc.
5908 (<ifield>): New method gen-ifld-extract-beyond.
5909 (gen-ifld-extract-beyond): New proc.
5910 * types.scm (bitrange-overlap?): New proc.
5912 * utils.scm (bits->bytes): New proc.
5913 (bytes->bits): New proc.
5915 Move extraction support into decoder.
5916 * sim-cpu.scm (-gen-record-args,-gen-record-profile-args,
5917 -gen-extractor,-gen-all-extractors,cgen-extract.c): Move extraction
5918 support to sim-decode.scm.
5919 * sim-decode.scm (-gen-decode-insn-table): Change decoder data to
5920 be array of IDESC,FMT entries. Make the array const.
5921 (-gen-gcc-label-table): Make array const.
5922 (-gen-decode-switch): Branch to extraction code after insn has been
5924 (-gen-decode-insn-globals): Delete extract handler from
5926 (gen-decode-fn): Add extraction support.
5927 (-gen-sem-fn-decls): Delete extraction fn decls.
5928 (-gen-idesc-decls): Update @cpu@_decode decl.
5929 (-gen-idesc-init-fn): Delete extraction support.
5930 (-gen-extract-decls): New proc.
5932 * sim-cpu.scm (cgen-sem-switch.c): Update switch test.
5933 (sim-finish!): Surround pbb only code with #if WITH_SCACHE_PBB.
5935 * sim-decode.scm (build-decode-table-entry): New arg invalid insn.
5936 All callers updated.
5937 (table-entry:make): Record insn value as insn object, not name.
5940 * hobbit.scm (path_basename): Renamed from `basename' to avoid
5941 collision with C function.
5942 (path_dirname): Similarily.
5943 * hobbit.c,hobbit.h: Rebuild.
5945 Wed Nov 18 11:26:17 1998 Dave Brolley <brolley@cygnus.com>
5947 * fr30.cpu (dir2r15-predec-stub): Reference to R15 must be indirect.
5949 Mon Nov 16 19:19:50 1998 Dave Brolley <brolley@cygnus.com>
5951 * fr30.cpu: Implement more instruction stubs.
5953 Thu Nov 12 19:20:28 1998 Dave Brolley <brolley@cygnus.com>
5955 * fr30.cpu: Implement more instruction stubs.
5957 Tue Nov 10 10:53:55 1998 Doug Evans <devans@canuck.cygnus.com>
5959 * rtl.scm (-rtx-expr-mode-name): Handle sequence locals.
5961 * rtx-funcs.scm (zflag:,zflag,nflag:,nflag): New rtx fns.
5963 * operand.scm (<pc>, method make!): FAKE renamed to SEM-ONLY.
5964 (op:std-attrs): Ditto.
5965 * opcodes.scm (gen-operand-instance): Ditto.
5966 (gen-switch): Ditto.
5967 * m32r.cpu (condbit,accum): Update.
5968 * fr30.cpu (nbit,vbit,zbit,cbit): Update.
5970 Mon Nov 9 14:30:51 1998 Doug Evans <devans@seba.cygnus.com>
5972 * enum.scm (-enum-read): Fix typo.
5974 * iformat.scm (-ifmt-search-key): Simplify a little.
5976 Mon Nov 9 12:07:56 1998 Dave Brolley <brolley@cygnus.com>
5978 * doc/porting: semantics.c -> sem.c.
5979 * Makefile.in: Regenerate.
5980 * fr30.cpu (add): Change ADD to add. Add more registers and set
5981 status bits on 'add' instruction.
5983 Fri Nov 6 18:15:05 1998 James E Wilson <wilson@wilson-pc.cygnus.com>
5985 * sim.scm (-gen-arch-model-decls): Default MAX_UNITS to 1 instead
5988 Fri Nov 6 17:43:16 1998 Doug Evans <devans@seba.cygnus.com>
5990 * minsn.scm (minsn:enum): Update, call current-arch-name.
5992 * pmacros.scm (-pmacro-expand): Make `cep' a variable.
5994 * Makefile.am (CGEN_HOB_INPUT_FILES): Add pmacros.scm,enum.scm,
5995 mach.scm,model.scm,types.scm,ifield.scm,minsn.scm.
5996 (ARCH,CGEN,CGENFLAGS): New variables.
5997 (gas-test,sim-test): New rules.
5998 * Makefile.in: Rebuild.
5999 * configure.in (arch): Define.
6000 * configure: Rebuild.
6002 * cgen-hob.scm (*UNSPECIFIED*): Renamed from UNSPECIFIED.
6003 * All .scm files: Ditto.
6005 * dev.scm: Fix gas-test call to cpu-load.
6006 * gas-test.scm: Clean up pass to remove bit-rot.
6007 * sim-test.scm: Ditto.
6009 * enum.scm (read-enum): Fix typo in `vals' handling.
6011 * hardware.scm (-parse-hw-type): Fix typo.
6012 (parse-hardware): Rename `asm' to `aasm' to avoid GCC reserved word.
6013 (def-hardware,define-normal-hardware): Ditto.
6015 * hobbit.scm (*case-sensitive-flag*): New configuration variable.
6016 (display-var): Use it.
6017 * hobbit.c: Rebuild.
6018 * hobbit.h: Rebuild.
6020 * ifield.scm (-ifield-read): Rename local `length' to `length-' to
6021 avoid hobbit problem.
6022 * mach.scm (-cpu-read): Rename local `parallel-insns' to
6023 `parallel-insns-' to avoid hobbit problem.
6025 Fri Nov 6 17:19:12 1998 Doug Evans <devans@canuck.cygnus.com>
6027 * m32r.opc (parse_hi16): Fix call to cgen_parse_address.
6028 (parse_slo16,parse_ulo16): Ditto.
6029 * opcodes.scm (<hw-address>, method gen-parse): Ditto.
6031 Thu Nov 5 13:04:53 1998 Doug Evans <devans@canuck.cygnus.com>
6033 * Makefile.am (GUILELDFLAGS,GUILELDADD): New variables.
6034 (cgen_LDFLAGS,cgen_LDADD,hob.x): Use them.
6035 * Makefile.in: Rebuild.
6036 * insn.scm (define-normal-insn): Expand pmacros.
6037 * mode.scm (<mode>): New member `host?'. All uses updated.
6038 (mode:host?): New proc.
6039 * rtl.scm (define-rtx-node): Make a syntax proc, not a macro.
6040 (define-rtx-syntax-node,define-rtx-macro-node): Ditto.
6041 (define-rtx-dual-mode): Ditto.
6042 (s-index-of): New proc.
6043 (s-unop): Use plain C for host mode operations.
6044 (s-binop,s-shop,s-boolifop,s-cmpop): Ditto.
6045 * rtx-funcs.scm (index-of): New rtx function.
6046 * sim.scm (<hw-index>): New method cxmake-get.
6048 Wed Nov 4 23:58:08 1998 Doug Evans <devans@seba.cygnus.com>
6050 * sim-cpu.scm (-gen-engine-decls): Delete.
6052 Wed Nov 4 18:40:47 1998 Dave Brolley <brolley@cygnus.com>
6054 * doc/rtl (Example): Correct Typo.
6055 * doc/porting: Add 'make dep' step to opcodes port instructions.
6056 * fr30.opc: New file.
6057 * fr30.cpu: New file.
6059 Wed Oct 28 13:36:15 1998 Doug Evans <devans@canuck.cygnus.com>
6061 * configure.in: Handle guile $exec_prefix = $prefix/foo.
6062 * Makefile.am (GUILEINCDIR): New variable.
6064 * configure: Regenerate.
6065 * Makefile.in: Ditto.
6066 * aclocal.m4: Ditto.
6068 Mon Oct 19 13:19:34 1998 Doug Evans <devans@seba.cygnus.com>
6070 * sim-cpu.scm (cgen-extract.c): Delete #include cpu-sim.h
6071 (cgen-semantics.c): Ditto.
6072 * sim-decode.scm (cgen-decode.c): Delete #include cpu-sim.h,cpu-opc.h.
6073 * sim-model.scm (cgen-model.c): Ditto.
6074 * sim.scm (cgen-arch.h): Delete #include @arch@-opc.h.
6075 (cgen-arch.c): Delete #include cpu-sim.h,cpu-opc.h.
6077 * opcodes.scm (read-cpu.opc): Handle empty file.
6079 * cos.scm (-elm-make-method-setter): Fix typo.
6081 * cpu.scm (-init-parse-cpu!): Call types-init!.
6082 (-finish-parse-cpu!): Call types-finish!.
6083 * ifield.scm (<ifield>): Delete members start,length.
6084 New member bitrange.
6085 (<ifield>, methods field-start,field-length): Update.
6086 (fld:start): New arg insn-len. All callers updated.
6087 (<ifield>, methods field-mask,field-value): Update.
6088 (-ifield-parse): Update.
6089 (ifield-init!): Update.
6090 * iformat.scm (compute-insn-length): Simplify.
6091 (compute-insn-mask): Update.
6092 * insn.scm (insn:value): Update.
6093 * mach.scm (<arch-data>): New members default-insn-bitsize,insn-lsb0?.
6094 (current-arch-default-insn-bitsize): New proc.
6095 (current-arch-insn-lsb0?): New proc.
6096 (-arch-parse,-arch-read): Update.
6097 (<cpu>): New member file-transform.
6098 (-cpu-parse,-cpu-read): Update.
6099 * opcodes.scm (<hw-asm>, method gen-extract): Pass ex_info to handler.
6100 (gen-hash-defines): Define CGEN_INSN_LSB0_P.
6101 (CGEN_INT_INSN_P): Renamed from CGEN_INT_INSN.
6102 (gen-insert-switch): Update args of @arch@_cgen_insert_operand.
6103 (gen-extract-switch): Update args of @arch@_cgen_extract_operand.
6104 (gen-opcode-open): Set CGEN_OPCODE_INSN_ENDIAN.
6105 * operand.scm (op:start): Update call to field-start method.
6106 * sim-decode.scm (opcode-slots): New arg lsb0?.
6107 (fill-slot!,build-slots): Ditto.
6108 (build-decode-table-entry,build-decode-table-guts): Ditto.
6109 (gen-decoder-table,gen-decoder-switch,gen-decoder): Ditto.
6110 (gen-decode-fn): Ditto.
6111 (cgen-decode.c): Update call to gen-decode-fn.
6112 * sim.scm (gen-argbuf-type): Move `semantic' to cpu specific part.
6113 (-gen-cpu-header,-gen-cpuall-includes): New procs.
6114 (cgen-cpuall.h): Call -gen-cpuall-includes.
6115 * types.scm (<bitrange>): New class.
6116 (types-init!,types-finish!): New procs.
6117 * utils-cgen.scm (parse-number): New proc.
6118 (parse-boolean): New proc.
6119 * utils.scm (word-value): Renamed from shift-bits, rewrite.
6120 (word-mask): Rewrite.
6121 * m32r.cpu (define-arch): New fields default-insn-bitsize,insn-lsb0?.
6122 (m32rxf): New field `file-transform'.
6123 * m32r.opc (my_print_insn): print_int_insn -> print_insn.
6125 * hobbit.h: Fix include file name.
6127 Fri Oct 9 16:58:10 1998 Doug Evans <devans@seba.cygnus.com>
6129 * slib: New directory of slib files used by cgen/hobbit.
6130 * hobbit.scm: New file.
6131 * hobbit.c: New file.
6132 * hobbit.h: New file.
6133 * hobscmif.h: New file.
6134 * hob-main.c: New file.
6135 * hobslib.scm: New file.
6137 * Makefile.am: Add support for compiling hobbit, and using compiled
6138 version of hobbit to compile cgen.
6139 * Makefile.in: Regenerate.
6140 * configure.in: Support --with-hobbit.
6141 * configure: Regenerate.
6142 * acconfig.h (WITH_HOBBIT): Add.
6143 * config.in: Regenerate.
6145 * rtl.scm: New file, was cdl-c.scm.
6146 Definition of rtx funcs moved to rtx-funcs.scm.
6147 (semantic-in-out-operands): Rewrite to compute object form of
6149 * rtx-funcs.scm: New file.
6151 * cgen-gh.c: #include "config.h".
6152 (gh_cadddr,gh_cddddr): New fns.
6153 (cgh_vector_to_list): New fn.
6154 (cgh_map1,cgh_map2,cgh_map1_fn2): Rewrite.
6155 (cgh_init): Prefix qsort procs with "cgh-".
6156 * cgen-gh.h (gh_cadddr,gh_cddddr,cgh_vector_to_list): Declare.
6157 * cgen.c: #include "config.h".
6159 * attr.scm (bitset-attr?): New proc.
6160 (<bitset-attribute>, method parse-value): Value syntax changed from
6161 (val1 val2 ...) to val1,val2,....
6162 (<bitset-attribute>): New method gen-value.
6163 (<integer-attribute>): New method gen-value.
6164 (<enum-attribute>): New method gen-value.
6165 * cpu.scm: Disable debugging evaluator if (not (defined? 'DEBUG-EVAL)).
6166 (<reader>): New class.
6167 (CURRENT-ARCH,CURRENT-READER): New globals.
6168 (keep-mach?): Move here from mach.scm.
6169 * mach.scm (arch,arch-comment,arch-default-mach): Delete.
6170 (<arch>): New class.
6171 (<arch-data>): New class.
6172 (<cpu>): Make subclass of <ident>.
6173 (*ENDIAN* variables): Delete.
6174 (process-state-vars): Delete.
6175 (mach-finish!): Add `base' value to MACH attribute.
6176 * hardware.scm (<hardware>): Make subclass of <ident>.
6177 (hw:std-attrs): New global.
6178 (hw-profilable?): New proc.
6179 * ifield.scm (<ifield>): Make subclass of <ident>.
6180 (sort-ifield-list): Move here from iformat.scm.
6181 * iformat.scm (<iformat>): Renamed from <insn-format>.
6182 Make subclass of <ident>.
6183 (-ifmt-search-key): Include cti? in categorization of formats.
6184 (ifmt-analyze): Compile semantics (turn to object form).
6185 * insn.scm (<insn>): Make subclass of <ident>.
6186 New member compiled-semantics.
6187 (insn:std-attrs): Add SKIP-CTI, VIRTUAL.
6188 * mode.scm (<mode>): Make subclass of <ident>.
6190 * model.scm (<unit>): Make subclass of <ident>.
6191 New members inputs,outputs.
6192 (<model>): Make subclass of <ident>. New member state.
6193 (-unit-parse): Parse inputs,outputs.
6194 (<iunit>): New class.
6195 (-insn-timing-parse-model): New proc.
6196 (parse-insn-timing): Function unit spec rewritten.
6197 * operand.scm (<operand>): Make subclass of <ident>.
6198 New members sem-name,num,cond? New method gen-pretty-name.
6199 (hw-index-scalar): New global.
6200 (op-nub-hw): Move here from rtl.scm.
6201 (op:lookup-sem-name,op-profilable?): New procs.
6202 * pmacros.scm: Rewrite to pass through hobbit.
6203 * utils-cgen.scm (gen-attr-defn): Simplify using new gen-value method.
6204 * utils.scm (logit): Make a macro.
6205 (bit-set?): Rewrite.
6206 (high-part): Rewrite.
6208 * m32r.cpu (define-arch): Move to top of file.
6209 (cpu family m32rbf): Renamed from m32rb.
6210 (model m32r/d): Function unit spec rewritten.
6211 (all insns): Ditto. Replace UBI with BI.
6213 * opcodes.scm (gen-attr-table-decls): Declare
6214 @arch@_cgen_hw_attr_table.
6215 (gen-attr-table-defns): Generate hw attribute table.
6217 * sim-cpu.scm (-gen-engine-decls): New proc.
6218 (-gen-model-decls): New proc.
6219 (gen-parallel-exec-type): Add new member `written' to struct parexec.
6220 (-gen-record-args): Add SEM_BRANCH_INIT_EXTRACT if cti insn.
6221 (-gen-record-profile-args): Simplify.
6222 (-gen-parallel-sem-case): Delete.
6223 (gen-semantic-fn): Emit SEM_BRANCH_{INIT,FINI} if cti insn.
6224 New local `written'. Delete profiling code.
6225 (-gen-sem-case): Ditto.
6226 (-uncond-written-mask,-any-cond-written?): New procs.
6227 (cgen-sem-switch.c): Include duplicates of insns that can be executed
6228 parallelly or serially, and write-back handlers for all parallel insns.
6229 * sim-decode.scm (-gen-decode-insn-globals): Add parallel write-back
6230 support to initialization of struct insn_sem.
6231 (-gen-idesc-decls): Add parallel write-back support to struct idesc.
6232 (-gen-insn-sem-type): Add parallel write-back support to struct
6234 (-gen-idesc-init-fn): Add support for virtual insns.
6235 Add parallel write-back support.
6236 * sim-model.scm (gen-model-profile-fn): Delete
6237 (-gen-model-fn-decls): New proc.
6238 (-gen-model-insn-fn,-gen-model-insn-fns): New procs.
6239 (-gen-model-init-fn): New proc.
6240 (-gen-mach-defns): Initialize insn-name lookup and fast/full engine_fn
6241 members in @mach@_init_cpu.
6242 (cgen-model.c): Generate model handlers for each insn.
6243 * sim.scm (gen-define-field-macro): Cti insns handled differently.
6244 (<hw-pc>): New method gen-write.
6245 (<hw-register>, method gen-write): New arg `mode'.
6246 (<hw-register>): Delete method gen-record-profile!.
6247 New method gen-profile-index-type.
6248 (<hw-memory>, method gen-write): New arg `mode'.
6249 (<hw-address>, method gen-extract): Delete.
6250 (<hw-address>, method gen-write): New arg `mode'.
6251 (<hw-index>, method get-write-index): Rewrite.
6252 (<pc>, method cxmake-get-direct): Delete.
6253 (<pc>): New method cxmake-get. Comment out methods
6254 gen-set-quiet,gen-set-trace.
6255 (<operand>): New methods gen-argbuf-elm,gen-profile-argbuf-elm,
6256 gen-profile-index-type,gen-profile-code.
6257 Delete method gen-pretty-name. Rewrite method gen-write.
6258 Delete method cxmake-get-direct.
6259 (-op-gen-set-trace): Update `written'.
6260 (-op-gen-set-trace-parallel): Ditto.
6261 (-gen-hw-index-raw,-gen-hw-index): Handle strings.
6262 (gen-cpu-insn-enum-decl): Add extra entries for parallel
6263 insns and their write-back handlers.
6264 (insn-op-lookup): New proc.
6265 (<unit>): New method gen-profile-code.
6266 (<iunit>): New method gen-profile-code.
6267 (gen-argbuf-elm): Add profiling elements.
6268 (gen-argbuf-type): Define cti insns separately in their own struct.
6269 Add member `addr_cache' to this struct. Add entries for pbb virtual
6270 insns. Move semantic entries here from struct scache.
6271 Delete everything from struct scache except argbuf.
6272 (<insn>, method gen-profile-locals): Rewrite.
6273 (<insn>, method gen-profile-code): Rewrite.
6274 (sim-finish!): Create virtual pbb insns.
6276 Tue Sep 15 15:22:02 1998 Doug Evans <devans@canuck.cygnus.com>
6278 * m32r.cpu (h-cr): Add bbpc,bbpsw.
6279 (h-sm,h-bsm,h-ie,h-bie,h-bcond,h-bpc): Delete.
6280 (h-psw,h-bpsw,h-bbpsw): Define.
6281 (rte,trap): Handle bbpc,bbpsw.
6282 * opcodes.scm (max-operand-instances): Fix typo.
6283 * sim.scm (<hardware-base>, method 'fun-access?): Don't force virtual
6284 hardware elements to be fun-access.
6285 (-hw-gen-fun-get,-hw-gen-fun-set): Fix handling of scalars.
6287 Wed Sep 9 15:28:55 1998 Doug Evans <devans@canuck.cygnus.com>
6289 * m32r.cpu (trap): Pass `pc' to m32r_trap.
6291 Mon Aug 10 14:29:33 1998 Doug Evans <devans@canuck.cygnus.com>
6293 * opcodes.scm (gen-insn-table-entry): Comment out generation of cdx.
6295 Mon Aug 3 11:51:04 1998 Doug Evans <devans@seba.cygnus.com>
6297 * m32r.cpu (cpu m32rb): Renamed from m32r to distinguish from
6299 (mach m32r): Update.
6301 * mach.scm (mach:supports?): New proc.
6302 * sim-cpu.scm (gen-cpu-reg-access-{decls,defns}): Renamed from
6303 gen-reg-access-{decls,defns}.
6304 * sim.scm (gen-reg-access-{decl,defn}): New procs.
6305 (gen-mach-bfd-name): New proc.
6306 (gen-arch-reg-access-{decls,defns}): New procs.
6307 (cgen-arch.[ch]): Output register access cover fns.
6309 * hardware.scm (hardware-builtin!): Set print handlers for
6311 * m32r.opc (parse_hash,parse_hi16,parse_slo16,parse_ulo16): New arg
6313 (CGEN_PRINT_NORMAL,print_hash): Ditto.
6314 (my_print_insn): Ditto. Delete args buf, buflen.
6315 * opcodes.scm: Pass `od' (opcode-descriptor) to all C handlers.
6316 (-hw-asm-specs): Add `handlers' spec.
6317 (-parse-hw-asm): Lookup class at runtime. If no asm-spec, use
6319 (<hw-asm>): Renamed from <opval>. New elements parse,insert,extract,
6321 (<hw-asm>, gen-insert,gen-extract,gen-print): Use them.
6322 (<hw-asm>, parse!): New method.
6323 (gen-insn-table-entry): Print semantics.
6324 (gen-opcode-open): Renamed from gen-opcode-table.
6326 * utils.scm (string-write): No longer a macro.
6327 (-string-write): Handle procedure args.
6328 * opcodes.scm: Update all calls to string-write.
6329 * sim-cpu.scm: Ditto.
6330 * sim-decode.scm: Ditto.
6331 * sim-model.scm: Ditto.
6334 Fri Jul 31 14:40:38 1998 Doug Evans <devans@seba.cygnus.com>
6336 * opcodes.scm (cgen-ibd.h,gen-extra-ibd.h): New procs.
6337 (-gen-insn-builders,-gen-insn-builder): New procs.
6339 Fri Jul 24 11:38:59 1998 Doug Evans <devans@canuck.cygnus.com>
6341 * opcodes.scm (gen-syntax-entry): Fix bracketing for -Wall.
6342 (gen-opcode-table): Properly terminate comment.
6344 Tue Jul 21 10:51:42 1998 Doug Evans <devans@seba.cygnus.com>
6347 Clean up pass over everything, so starting fresh.