1 2005-07-29 Dave Brolley <brolley@redhat.com>
3 * operand.scm (op:new-mode): Convert (obj:name op) to a string for
6 2005-07-15 Alan Modra <amodra@bigpond.net.au>
8 * cpu/fr30.opc (print_register_list): Correct format strings.
9 * cpu/ip2k.opc: Likewise.
11 2005-07-05 Nick Clifton <nickc@redhat.com>
13 * cpu/iq2000.opc (parse_lo16, parse_mlo16): Make value parameter
14 unsigned in order to avoid compile time warnings about sign
17 2005-07-01 Nick Clifton <nickc@redhat.com>
19 * desc-cpu.scm: Update to ISO C90 function declaration style.
20 * opc-asmdis.scm: Likewise.
21 * opc-ibld.scm: Likewise.
22 * opc-itab.scm: Likewise.
23 * cpu/fr30.opc: Likewise.
24 * cpu/i960.opc: Likewise.
25 * cpu/ip2k.opc: Likewise.
26 * cpu/iq2000.opc: Likewise.
27 * cpu/m32r.opc: Likewise.
28 * cpu/openrisc.opc: Likewise.
29 * cpu/sh.opc: Likewise.
30 * cpu/sparc.opc: Likewise.
31 * cpu/xstormy16.opc: Likewise.
33 2005-06-15 Dave Brolley <brolley@redhat.com>
35 * sid-cpu.scm (-gen-hw-stream-and-destream-fns): New function.
36 (cgen-cpu.h): Call it.
38 Contributed on behalf of Graydon Hoare
39 2001-06-05 graydon hoare <graydon@redhat.com>
41 * utils.scm (foldl): Define.
45 (intersection): Simplify.
46 * sid.scm : Set APPLICATION to SID-SIMULATOR.
47 (-op-gen-delayed-set-maybe-trace): Define.
48 (<operand> 'gen-set-{quiet,trace}): Delegate to
49 op-gen-delayed-set-quiet etc. Note: this is still a little tangled
50 up and needs cleaning.
51 (-with-parallel?): Hardwire with-parallel to #t.
52 (<operand> 'cxmake-get): Replace with lookahead-aware code
53 * sid-decode.scm: Remove per-insn writeback fns.
54 (-gen-idesc-decls): Redefine sem_fn type.
55 * sid-cpu.scm (gen-write-stack-structure): Replace parexec stuff
56 with write stack stuff.
57 (cgen-write.cxx): Replace per-insn writebacks with single write
58 stack writeback. Add write stack reset function.
59 (-gen-scache-semantic-fn insn): Replace parexec stuff with write
61 * rtl-c.scm (xop): Clone operand into delayed operand if #:delayed
63 (delay): Set #:delayed attribute to calculated delay, update
64 maximum delay of cpu, check (delay ...) usage.
65 * operand.scm (<operand>): Add delayed slot to <operand>.
66 * mach.scm (<cpu>): Add max-delay slot to <cpu>.
67 * dev.scm (load-sid): Set APPLICATION to SID-SIMULATOR.
68 * doc/rtl.texi (Expressions): Add section on (delay ...).
70 2005-06-13 Jim Blandy <jimb@redhat.com>
72 * pmacros.scm (-pmacro-upcase, -pmacro-downcase): Handle symbols
75 2005-06-07 Zack Weinberg <zack@codesourcery.com>
77 * doc/porting.texi: Change all mention of md_apply_fix3 and
78 gas_cgen_md_apply_fix3 to md_apply_fix and gas_cgen_md_apply_fix
81 2005-05-18 Dave Brolley <brolley@redhat.com>
83 * utils-sim.scm (-gen-decode-default-entry): New function.
84 (-gen-decode-insn-entry): Now takes 'invalid-insn' argument. Generate
85 code to check that all opcodes bits match.
86 (-gen-decoder-switch): Use -gen-decode-default-entry.
88 2005-05-16 Jim Blandy <jimb@redhat.com>
90 * sid.scm (gen-ifetch): Require BITSIZE to be exactly the size
91 fetched by one of our GETIMEM* methods.
92 * utils-gen.scm (-extract-chunk-specs): Always fetch full
93 base-insn-sized chunks.
95 2005-05-10 Nick Clifton <nickc@redhat.com>
97 * Update the address and phone number of the FSF organization in
98 the GPL notices in the following files:
99 COPYING.CGEN, utils.scm, cpu/iq2000m.cpu, cpu/openrisc.cpu,
100 cpu/powerpc.cpu, slib/random.scm
102 2005-05-06 Jim Blandy <jimb@redhat.com>
104 * pprint.scm, cos-pprint.scm: Add documentation.
106 * pprint.scm (pprint): Don't wipe out elide-table after each call.
108 * pprint.scm, cos-pprint.scm: New files.
110 2005-04-04 Nick Clifton <nickc@redhat.com>
112 * opcodes.scm (-gen-parse-address): Initialise value to zero to
113 avoid a compile time warning.
115 2005-03-18 Nick Clifton <nickc@redhat.com>
117 * cpu/ip2k.opc (parse_lit8): Change wording of error message to
118 "percent-operand" from "%operand" as the latter confuses xgettext
119 into thinking that it is a C printf formating directive, which
120 prevents proper translation.
122 2005-02-23 Nick Clifton <nickc@redhat.com>
124 * opcodes.scm (gen-parse-number): Add a cast to the desired
125 pointer signed'ness in order to prevent compile time warnings.
126 * cpu/ip2k.opc: Fixed compile time warnings about differing
127 signed'ness of pointers passed to functions.
128 * cpu/iq2000.opc: Likewise.
129 * cpu/m32r.opc: Likewise.
130 * cpu/openrisc.opc: Likewise.
131 * cpu/xstormy16.opc: Likewise.
133 2005-02-22 Alan Modra <amodra@bigpond.net.au>
135 * desc-cpu.scm (gen-ifld-decls): Move cgen_ifld_table from here..
136 (cgen-desc.h): ..to here, after opcode/cgen.h include.
138 2005-02-16 Dave Brolley <brolley@redhat.com>
140 * utils.scm: Update copyright years.
141 * utils-gen.scm (gen-ifld-extract): Pass base-length to -gen-ifld-extract-base.
142 * sid.scm (gen-ifetch): Handle the case where bitsize == 24.
143 * operand.scm (-derived-operand-parse): Move logit message from level 1
146 2005-02-15 Nick Clifton <nickc@redhat.com>
148 * opc-itab.scm (-gen-ifmt-table-1): Add an ATTRIBUTE_UNUSED to
149 prevent compile time warning messages.
150 * opc-opinst.scm (-gen-operand-instance-table): Likewise.
151 * utils-gen.scm (attr-int-gen-defn): Likewise.
152 (attr-gen-defn): Likewise.
153 * cpu/ip2k.opc (parse_addr16_p): Remove unused function.
154 (print_dollarhex16): Remove unused function.
156 2005-02-15 Jim Blandy <jimb@redhat.com>
158 * guile.scm (cgen-call-with-debugging): Doc fix.
160 Make backtraces work more reliably.
161 * guile.scm: Set up debugging parameters, and enable debugging and
162 source positions while loading.
163 (cgen-call-with-debugging, cgen-debugging-stack-start): New
165 * read.scm: Don't set debugging parameters here.
166 (catch-with-backtrace): Function deleted.
167 (-cgen): Simply note the presence or absence of the -b option.
168 Pass the flag to cgen-call-with-debugging, so debugging is turned
169 off here if the user didn't request it, for faster computation.
170 (cgen): Call cgen-debugging-stack-start here, instead of
171 catch-with-backtrace.
173 * Makefile.am (GUILE): Explicitly load guile.scm here, and leave a
175 (desc, html, opcodes, sim-arch, sim-cpu, gas-test, sim-test):
176 Don't write out the trailing -s here.
177 * Makefile.in: Regenerated.
178 * cgen-doc.scm, cgen-gas.scm, cgen-stest.scm): Don't load
179 fixup.scm here; let the caller decide which Scheme's customization
181 * dev.scm: Load guile.scm, not fixup.scm.
182 * fixup.scm: Deleted; contents have all moved to guile.scm.
185 * guile.scm (debug-write): New function.
187 2005-02-14 Jim Blandy <jimb@redhat.com>
189 * pmacros.scm (pmacros-init!): For .eval macros, use eval1 as the
190 transformer procedure, not eval. Transformer procedures take one
193 2005-02-11 Nick Clifton <nickc@redhat.com>
195 * cpu/iq2000.opc (parse_jtargq10): Change type of valuep argument
196 to 'bfd_vma *' in order avoid compile time warning message.
198 2005-02-09 Jim Blandy <jimb@redhat.com>
200 * cgen-sim.scm (load-files): Don't load fixup.scm. (See
201 corresponding change in the sim/common directory.)
203 2005-02-07 Jim Blandy <jimb@redhat.com>
205 * cgen-opc.scm: Don't load fixup.scm here. (See corresponding
206 changes in the opcodes directory.)
208 * guile.scm: New file, containing Guile-specific definitions and
209 adaptations. This is loaded by the app-specific shell scripts.
210 Initially identical to fixup.scm.
211 * cgen-sid.scm: Don't load fixup.scm here.
213 * cos.scm: Profile elm-xset! when requested, not elm-set!; the
216 2005-01-27 Jim Blandy <jimb@redhat.com>
218 * utils.scm (string/symbol->append): Renamed from 'concat'.
219 * opcodes.scm (gen-switch): Use new name.
220 * insn.scm (-sub-insn-make!): Same.
221 * rtl.scm (rtx-dump): Same.
222 * semantics.scm (semantic-compile): Same.
224 2005-01-20 Jim Blandy <jimb@redhat.com>
226 * opcodes.scm (gen-switch): Use concat instead of string-map.
228 * utils.scm (concat): New function.
229 * insn.scm (-sub-insn-make!): Use concat instead of string-map.
230 * rtl.scm (rtx-dump): Same.
231 * semantics.scm (semantic-compile): Same.
233 2004-12-16 Jim Blandy <jimb@redhat.com>
235 * utils-cgen.scm (parse-name): Don't assume that string-map can be
236 applied to symbols. Process everything as strings, and then
237 convert to a symbol at the end.
239 * read.scm (debug-repl): Temporarily redirect input and output to
240 /dev/tty while we debug, so we don't interfere with whatever CGEN
241 is reading or writing.
242 * utils.scm (setter-getter-fluid-let, with-input-and-output-to):
245 2004-11-15 Michael K. Lechner <mike.lechner@gmail.com>
247 * cpu/iq2000.cpu: Added quotes around macro arguments so that they
248 will work with newer versions of guile.
250 2004-10-27 Nick Clifton <nickc@redhat.com>
252 * cpu/iq2000m.cpu: Import latest version from cpu/ directory.
253 * cpu/iq2000.cpu: Likewise.
255 2004-07-21 DJ Delorie <dj@redhat.com>
257 * cpu/xstormy16.cpu (movhmemgr): Use hmem8, not lmem8.
259 2003-03-14 Frank Ch. Eigler <fche@redhat.com>
261 * cpu/iq2000.opc (parse_jtargq10): Add ATTRIBUTE_UNUSED on unused args.
262 (parse_jtargq10, iq2000_cgen_isa_register, parse_mlo16): Declare.
264 2004-03-30 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
266 * cpu/m32r.opc (parse_hi16): Fixed shigh(0xffff8000) bug.
268 2004-03-22 Dave Brolley <brolley@redhat.com>
270 * utils.scm (copyright-fsf): Update copyright years.
271 (copyright-red-hat): Ditto.
272 * sid.scm (-op-gen-set-trace): Generate trace code before semantic
274 (-op-gen-set-trace-parallel): Ditto.
276 2004-02-10 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.dot.com>
278 * cpu/m32r.opc (my_print_insn): Fixed incorrect output when
279 disassembling codes for 0x*2 addresses.
281 2004-01-29 Dave Brolley <brolley@redhat.com>
283 * decode.scm (-opcode-slots): For short insns, generate 'opcode' with
284 zeroes in the extra bit positions and generate 'opcode-mask' with ones
285 in the extra bit positions.
287 2003-12-15 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
289 * cpu/m32r.cpu: Add PIPE_O attribute to "pop" instruction.
291 2003-12-04 Alan Modra <amodra@bigpond.net.au>
293 * cpu/openrisc.opc (openrisc_sign_extend_16bit): Don't rely on
294 "short" being 16 bit.
295 (parse_hi16): Likewise. Fix type-punned pointer warnings too, and
296 internationalize error message.
297 (parse_lo16): Likewise. Remove useless code.
299 2003-12-03 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
301 * cpu/m32r.cpu : Add new model m32r2.
302 Add new instructions.
303 Replace occurrances of 'Mitsubishi' with 'Renesas'.
304 Changed PIPE attr of push from O to OS.
305 Care for Little-endian of M32R.
306 * cpu/m32r.opc (CGEN_DIS_HASH, my_print_insn):
307 Care for Little-endian of M32R.
308 (parse_slo16): signed extension for value.
310 2003-10-26 Dave Brolley <brolley@redhat.com>
312 * sid-decode.scm (-gen-record-profile-args): Test trace_counter_p
313 and final_insn_count_p. Don't test WITH_PROFILE_MODEL_P.
314 (-gen-extract-fn): Call -gen-record-profile-args.
316 2003-10-21 Dave Brolley <brolley@redhat.com>
318 * sid-model.scm (-gen-model-class-decls): Generate MAX_UNITS as
320 * decode.scm (-opcode-slots): Correct typo in logit call.
322 2003-10-09 Jim Blandy <jimb@redhat.com>
324 * desc-cpu.scm (gen-hw-table-decls): Emit an 'extern' declaration
325 for @arch@_cgen_hw_table. GDB needs to be able to find this.
327 * mach.scm (def-isa-attr!): hardware can have ISA attributes, too.
329 2003-10-06 Dave Brolley <brolley@redhat.com>
331 * gen-all-doc: Add fr550.
333 2003-09-11 Doug Evans <dje@sebabeach.org>
335 * Makefile.am (ARCHFILE): New var.
336 (desc): Pass $(ARCHFILE) for -a parm, not $(ARCH).
337 (html,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Ditto.
338 * Makefile.in: Regenerate.
340 2003-09-08 Dave Brolley <brolley@redhat.com>
342 On behalf of Doug Evans <dje@sebabeach.org>
343 Pass in paths to input files, instead of assuming they live in
344 $srcdir/cpu. Plus misc. option processing cleanup.
345 * cgen-doc.scm (doc-arguments): Make options strings not symbols.
346 Add pre-process pass to all options.
347 * cgen-gas.scm (gas-arguments): Ditto.
348 * cgen-sid.scm (sim-arguments): Ditto.
349 * cgen-sim.scm (sim-arguments): Ditto.
350 * cgen-stest.scm (stest-arguments): Ditto.
351 * cgen-opc.scm (opc-arguments): Ditto. New argument -OPC.
352 (-opc-file-path): New global.
353 (opc-file-path): New fn.
354 * opcodes.scm (read-cpu.opc): Replace srcdir,cpu args with opc-file.
356 (gen-extra-cpu.h,gen-extra-cpu.c,gen-extra-opc.h,gen-extra-opc.c,
357 gen-extra-asm.c,gen-extra-dis.c,gen-extra-ibld.h,gen-extra-ibld.c):
358 Replace srcdir arg with opc-file. All callers updated.
359 * read.scm (-opt-spec-update): Delete.
360 (opt-get-first-pass,opt-get-second-pass): New fns.
361 (-cgen): Process application-specific arguments in two passes.
363 2003-08-29 Dave Brolley <brolley@redhat.com>
365 * cpu/frv.cpu: Removed.
366 * cpu/frv.opc: Removed.
368 2003-08-21 Nick Clifton <nickc@redhat.com>
370 * cpu/frv.cpu (mbtoh): Replace input parameter to
371 u-media-dual-expand and u-media-dual-btoh with output parameter.
372 (cmbtoh): Add profiling hack.
374 2003-08-19 Michael Snyder <msnyder@redhat.com>
376 * cpu/frv.cpu: Fix typo, Frintkeven -> FRintkeven
378 2003-08-07 Michael Meissner <gnu@the-meissners.org>
380 * opc-opinst.scm (-gen-operand-instance-table): Initialize all of
381 the elements for the END record of CGEN_OPINST, silencing warnings.
383 2003-07-15 Doug Evans <dje@sebabeach.org>
385 Add guile 1.6.4 support.
386 - empty list must be quoted
387 - string functions have stricter type checking
388 - eval now takes a second argument
389 - symbol-bound? is deprecated
390 * attr.scm (-attr-parse): Use stringsym-append to build errtxt.
391 (bitset-attr->list): Ensure arg to string-cut is a string.
392 (attr-parse): Ensure args to string-ref and string-drop1 are strings.
393 (<enum-attribute>,gen-value-for-defn): Fetch string name of self.
394 * cos.scm (-class-list): Must quote empty list.
395 (-class-parent-classes,-class-compute-class-desc): Ditto.
396 (class-make,make,object-reset!): Ditto.
397 (method-make-make!): Call eval1 instead of eval.
398 (method-make-forward!,method-make-virtual-forward!): Ditto.
399 * decode.scm (subdtable-add): Use stringsym-append instead of
401 (-gen-exprtable-name): Fetch string name of exprtable-entry-insn.
402 (-build-decode-table-entry): Fetch string name of insn.
403 * desc-cpu.scm (-gen-isa-table-defns): Fetch string name of isa.
404 (-gen-mach-table-defns): Ditto for mach.
405 (gen-ifld-defns): Ditto for ifld.
406 (gen-hw-table-defns): Ditto for hw.
407 (gen-operand-table): Ditto for op.
408 (gen-insn-table-entry): Ditto for insn.
409 * desc.scm (gen-attr-table-defn): Ditto for attr.
410 (<keyword>,gen-defn): Don't pass symbols to string-append.
411 * enum.scm (parse-enum-vals): Use symbolstr-append instead of
413 (enum-vals-upcase): Use symbol-upcase to build result.
414 (-enum-parse): Use stringsym-append to build errtxt.
415 * fixup.scm (*guile-major-version*,*guile-minor-version*): New globals.
416 (eval1): New function.
417 (symbol-bound?): Provide own version if >= guile 1.6.
418 * hardware.scm (define-keyword): Use string-append instead of
420 * html.scm (gen-html-header,gen-table-of-contents,gen-arch-intro,
421 cgen.html,cgen-insn.html): Convert current-arch-name to a string
423 (gen-list-entry): Handle either symbol or string `name' arg.
424 (gen-obj-doc-header): Fetch string name of `o' arg.
425 (define-cpu-intro): Ditto for cpu.
426 (gen-mach-intro): Ditto for mach.
427 (gen-model-intro): Ditto for model.
428 (gen-isa-intro): Ditto for isa.
429 (gen-machine-doc-1): Ditto for isa.
430 (gen-reg-doc-1): Convert mach to string first.
431 (gen-insn-doc-1): Ditto. Convert model/unit names to strings first.
432 (gen-insn-doc-list): Fetch string name of mach. Convert insn name
434 (gen-insn-categories): Fetch string name of mach. Convert
435 enum-val-name to string first.
436 (gen-insn-docs): Fetch string name of mach.
437 * ifield.scm (ifld-ilk): Result is a string.
438 * iformat.scm (-ifmt-search-key): Convert attr value to string first.
439 Fetch string name of ifld.
440 (-sfmt-search-key): Similarily for ifld and op.
441 * insn.scm (syntax-make): Fetch string name of syntax element.
442 * mach.scm (-cpu-parse): Use stringsym-append to build errtxt.
443 * minsn.scm (minsn-make-alias): Fetch string name of minsn.
444 * mode.scm (mode:c-type): Result is a string.
445 (mode:enum): Fetch string name of mode.
446 (-mode-parse): Use stringsym-append to build errtxt.
447 * model.scm (model:enum): Fetch string name of model.
448 (-model-parse): Use stringsym-append to build errtxt.
449 (parse-insn-timing): Must quote empty list.
450 * opc-itab.scm (-gen-minsn-table-entry): Fetch string name of minsn.
451 (-gen-minsn-opcode-entry): Ditto.
452 * opcodes.scm (<operand>,gen-function-name): `what' arg is a symbol,
454 (read-cpu.opc): Convert current-arch-name to a string before using.
455 * operand.scm (<operand>,gen-pretty-name): Ensure `name' is a string.
456 (<derived-operand>): Must quote empty list.
457 (op-sort): Simplify, call alpha-sort-obj-list to do sort.
458 * pgmr-tools.scm (pgmr-pretty-print-insn-value): Fetch string name
460 * pmacros.scm (-pmacro-build-lambda): Use eval1 instead of eval.
461 (-pmacro-sym): Must convert symbols to strings before passing to
463 (-pmacro-str): Ditto.
464 (pmacros-init!): Use eval1 instead of eval.
465 * read.scm (keep-mach-atlist?): Simplify, use bitset-attr->list.
466 (keep-isa-atlist?): Ditto.
467 (cmd-if): Use eval1 instead of eval.
468 * rtl-c.scm (<c-expr>,get-name): Fetch string name of self.
469 (-rtl-c-get): Fetch string name of src.
470 (s-unop): Ditto for mode.
471 (s-binop,s-binop-with-bit,s-shop,s-convop,s-cmpop): Ditto.
472 (-gen-par-temp-defns,subword): Ditto.
473 (join): Use stringsym-append instead of string-append.
474 * rtl-traverse.scm (rtx-option?): Convert option to string first.
475 (rtx-traverse-debug): Fetch string name of rtx-obj.
476 * rtl.scm (def-rtx-node): Use eval1 instead of eval.
477 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
478 (rtx-pretty-name): Result is a string.
479 (-rtx-hw-name): Use symbolstr-append instead of symbol-append.
480 * semantics.scm (semantic-compile): Simplify, use alpha-sort-obj-list.
481 * sid-cpu.scm (cgen-write.cxx): Convert current-arch-name to a string
483 (-gen-sfrag-case): Fetch string name of user.
484 * sid-model.scm (unit:enum): Fetch string name of unit.
485 * sid.scm (<hw-memory>,cxmake-get): Fetch string name of mode.
486 (<hw-memory>,gen-set-quiet): Ditto.
487 (gen-mode-defs): Ditto.
488 (sim-finish!): Convert current-arch-name to a string before using.
489 * sim-cpu.scm (-gen-scache-semantic-fn): Fetch string name of insn.
490 (-gen-no-scache-semantic-fn): Ditto.
491 (cgen-defs.h): Fetch string name of isa.
492 (cgen-read.c): Convert current-arch-name to a string before using.
493 (cgen-write.c): Ditto.
494 * sim-model.scm (unit:enum): Fetch string name of unit.
495 (gen-model-fn-decls): Use stringsym-append instead of string-append.
496 (-gen-model-timing-table): Fetch string name of model.
497 (-gen-mach-model-table): Ditto.
498 (-gen-mach-defns): Fetch string name of mach.
499 * sim.scm (gen-reg-access-defn): Fetch string name of hw.
500 (<hw-memory>,cxmake-get): Fetch string name of mode.
501 (<hw-memory>,gen-set-quiet): Ditto.
502 (gen-mode-defs): Ditto.
503 (sim-finish!): Must quote empty list.
504 * utils-cgen.scm (<ident>): Must quote empty list.
505 (obj:str-name): New fn.
506 (parse-comment): Result is a string.
507 (parse-symbol): Result is a symbol.
508 (parse-string): Result is a string.
509 (keyword-list?): Convert arg to string before calling string-ref.
510 (keyword-list->arg-list): Ditto.
511 (gen-attr-name): Convert attr-name to string first.
512 (alpha-sort-obj-list): Use symbol<? instead of string<?.
513 * utils-gen.scm (attr-gen-decl): Fetch string name of attr.
514 (gen-define-ifmt-ifields): Ditto for fld.
515 * utils.scm (gen-c-symbol): Ensure str is a string before calling
517 (gen-file-name): Ditto.
518 (symbol-downcase,symbol-upcase,symbol<?): New fns.
519 (stringsym-append,symbolstr-append,->string,->symbol): New fns.
520 (reduce): Call eval1 instead of eval.
521 * cpu/m32r.cpu (addi): Don't use `#.'.
523 * gen-all-sim: Fix some typos.
525 2003-07-08 Doug Evans <dje@sebabeach.org>
527 * gen-all-doc: Ensure run from cgen src dir.
528 * gen-all-opcodes: Build in ./tmp-opcodes. Don't delete dir when done.
529 * gen-all-sid: Similarily, in ./tmp-sid.
530 * gen-all-sim: Similarily, in ./tmp-sim.
532 2003-06-20 Doug Evans <dje@sebabeach.org>
534 * gen-all-sim: Add fr30,sh64 support. Only generate m32r by default.
536 2003-06-19 Doug Evans <dje@sebabeach.org>
538 * mach.scm (-ifld-already-defined?): New proc.
539 (current-ifld-add!): Use it.
540 (-op-already-defined?): New proc.
541 (current-op-add!): Use it.
542 (-insn-already-defined?): New proc.
543 (current-insn-add!): Use it.
544 (-minsn-already-defined?): New proc.
545 (current-minsn-add!): Use it.
546 (obj-isa-list): New proc.
547 (isa-supports?): Use it.
549 2003-06-10 Doug Evans <dje@sebabeach.org>
551 * insn.scm (insn-builtin!): RELAX renamed to RELAXABLE.
552 * cpu/m32r.cpu (all insns): Ditto.
554 * mach.scm (current-*-add!): Disallow redefinition. Make result
557 * gen-all-doc: Split arm and frv docs up a bit.
559 * cpu/arm.cpu: Add IDOC attribute.
560 * cpu/frv.cpu: Ditto.
561 * cpu/i960.cpu: Ditto.
562 * cpu/openrisc.cpu: Ditto.
563 * cpu/xstormy16.cpu: Ditto.
564 * cpu/m32r.cpu: Ditto.
565 (all insns): Explicitly specify IDOC attribute.
567 * Makefile.am (MACH,ISAS,INSN_FILE_NAME): New vars.
568 (desc,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Use MACH,ISAS.
569 (html): Use MACH,ISAS,INSN_FILE_NAME. Generate insn.html separately.
570 * Makefile.in: Regenerate.
571 * attr.scm (<integer-attribute>:parse-value-def): Implement.
572 (-attr-read): Defer computing default value until we know the type.
573 (attr-has-attr?): Delete, move contents to <attr-list>:has-attr?.
574 (<attr-list>:attr-present?): New method.
575 (atlist-attr-present?,obj-attr-present?): New fns.
576 (obj-has-attr-value?,obj-has-attr-value-no-default?): New fns.
577 (attr-builtin!): New insn attr IDOC.
578 * cgen-doc.scm (doc-arguments): New args -I,-N.
579 * enum.scm (parse-enum-vals): New arg errtxt, all callers updated.
580 Support comment as fourth element of enum value.
581 (enum-val-name,enum-val-value,enum-val-attrs,enum-val-comment): New fns.
582 * html.scm (gen-html-header): New arg kind, all callers updated.
583 (gen-table-of-contents): New arg insn-file, all callers updated.
584 (gen-list-entry,gen-doc-header): New fn.
585 (get-operands): Delete.
586 (gen-iformat-table): Rewrite.
587 (gen-insn-doc-1): Print constant-folded and trimmed semantics.
588 (gen-insn-doc-list): New args name, comment, insns. All callers updated.
589 (get-insn-properties,guess-insn-idoc-attr!): New fn.
590 (insn-sets-pc?,insn-refs-mem?,insn-uses-fpu?): New fns.
591 (get-insns-for-category,gen-categories-insn-lists): New fns.
592 (gen-insn-docs): Simplify each insn's semantics first.
593 Print insn tables sorted by IDOC categories.
594 (*insn-html-file-name*): New global.
595 (cgen-insn.html): New fn.
597 * insn.scm (<insn>): Create a setter for the `tmp' member.
598 * semantics.scm (insn-build-known-values): Renamed from
599 -build-known-values. All callers updated.
601 * rtl.scm: Move traveral/evaluation support to ...
602 * rtl-traverse.scm: New file.
603 * read.scm: Maybe-load rtl-traverse.scm.
605 * rtl.scm (-rtx-valid-types): Add SETRTX.
607 * rtx-funcs.scm (nop,parallel): Fix mode.
609 * utils.scm (eqv-lookup-index): New fn.
610 (assq-lookup-index): Renamed from lookup-index. All callers updated.
612 * dev.scm (load-doc): Set APPLICATION.
614 2003-06-10 Dave Brolley <brolley@redhat.com>
616 * sid-cpu.scm: Generate #include of config.h into @prefix@-sem.cxx.
617 * sid-decode.scm: Generate #include of config.h into
619 * sid-model.scm: Generate #include of config.h into @prefix@-model.cxx.
621 2003-06-07 Doug Evans <dje@sebabeach.org>
623 * gen-all-sid: New file.
624 * gen-all-opcodes: New file.
626 2003-06-05 Nick Clifton <nickc@redhat.com>
628 * cpu/frv.cpu (FRintieven): New operand. An even-numbered only
629 version of the FRinti operand.
630 (FRintjeven): Likewise for FRintj.
631 (FRintkeven): Likewise for FRintk.
632 (mdcutssi, media-dual-word-rotate-r-r, mqsaths,
633 media-quad-arith-sat-semantics, media-quad-arith-sat,
634 conditional-media-quad-arith-sat, mdunpackh,
635 media-quad-multiply-semantics, media-quad-multiply,
636 conditional-media-quad-multiply, media-quad-complex-i,
637 media-quad-multiply-acc-semantics, media-quad-multiply-acc,
638 conditional-media-quad-multiply-acc, munpackh,
639 media-quad-multiply-cross-acc-semantics, mdpackh,
640 media-quad-multiply-cross-acc, mbtoh-semantics,
641 media-quad-cross-multiply-cross-acc-semantics,
642 media-quad-cross-multiply-cross-acc, mbtoh, mhtob-semantics,
643 media-quad-cross-multiply-acc-semantics, cmbtoh,
644 media-quad-cross-multiply-acc, media-quad-complex, mhtob,
645 media-expand-halfword-to-double-semantics, mexpdhd, cmexpdhd,
646 cmhtob): Use new operands.
647 * cpu/frv.opc (CGEN_VERBOSE_ASSEMBLER_ERRORS): Define.
648 (parse_even_register): New function.
650 2003-06-04 Doug Evans <dje@sebabeach.org>
652 Better handling of 64 bit and mixed 32/64 bit architectures.
653 * hardware.scm (hw-update-word-modes!): New fn.
654 * mach.scm (define-cpu)): Call mode-set-word-modes!,
655 hw-update-word-modes!.
656 (state-word-bitsize): Replace FIXME with requested check.
657 (arch-analyze-insns!): Call mode-ensure-word-sizes-defined.
658 * mode.scm (mode-find): Ignore INT,UINT.
659 (-mode-word-sizes-kind): New global.
660 (mode-set-word-modes!,mode-set-identical-word-bitsizes!,
661 mode-set-biggest-word-bitsizes!,mode-ensure-word-sizes-defined): New fns.
662 (mode-init!): Initialize -mode-word-sizes-kind. Move initialization
664 (mode-builtin!): ... here. Initialize WI/UWI/AI/IAI to something
665 unusable, correct values set later.
666 (mode-finish!): Remove cruft.
667 * html.scm (doc-init!): Call mode-set-biggest-word-bitsizes!.
668 * opcodes.scm (opcodes-init!): Ditto.
669 * rtx-funcs.scm (annul): Fix mode of pc.
670 * cpu/ia64.cpu: Remove cruft that sets word modes.
671 * cpu/xstormy16.cpu (define-cpu): Set word-bitsize.
673 2003-06-03 Nick Clifton <nickc@redhat.com>
675 * cpu/frv.cpu (media-dual-word-rotate-r-r): Use a signed 6-bit
676 immediate value not unsigned.
678 2003-05-21 J"orn Rennecke <joern.rennecke@superh.com>
680 * cpu/sh.cpu: Amend comments to refer to SuperH.
681 * cpu/sh64-compact.cpu: Change comment to refer to SuperH.
682 * cpu/sh64-media.cpu: Likewise.
683 (Saturation): Update manual reference.
685 2003-05-15 Doug Evans <dje@sebabeach.org>
687 * Makefile.am (srcroot): New var.
689 * Makefile.in: Regenerate.
690 * cgen-doc.scm: New file.
691 * html.scm: New file.
692 * gen-all-doc: New file.
693 * dev.scm (cload): Handle DOC application.
695 * machs.scm (machs-for-cpu): New fn.
696 * model.scm (models-for-cpu): New fn.
697 * utils.scm (gen-c-copyright): Renamed from gen-copyright.
699 (iota): Rewrite to be identical to pmacro version. All uses updated.
700 * utils-cgen.scm (alpha-sort-obj-list): New fn.
702 * utils-sim.scm (-gen-decoder-switch): Back out patch of 2003-01-09.
703 (-gen-decode-bits): Instead put in better fix here.
705 * cpu/i960.cpu (index): Rename to indx. All uses updated.
707 2003-05-01 DJ Delorie <dj@redhat.com>
709 * cpu/xstormy16.cpu (alignfix-mem): Correct logic for unaligned
711 (set-alignfix-mem): Likewise.
713 2003-04-16 Dave Brolley <brolley@redhat.com>
715 * doc/rtl.texi (Iiming): Correct example to use 'model-name'.
716 * utils.scm (copyright-fsf): Update generate copyright years.
717 (copyright-cygnus): Ditto.
718 * sid.scm (-op-gen-set-trace): Generate code to fill in bitmask of modified
720 (-gen-arch-model-decls): Don't generate unit enum declaration or MAX_UNITS
722 (<operand>'gen-profile-code): New parameter 'when'.
723 (<iunit>'gen-profile-code): Ditto.
724 (<insn>'gen-profile-code): Ditto.
725 (<unit>'gen-profile-code): Ditto. Only generate 'referenced' and
726 'insn_reference' for the 'after' function.
727 * model.scm (unit:enum): Moved to sim-model.scm.
728 * sim-model.scm (unit:enum): Moved from model.scm.
729 * sid-decode.scm (-gen-scache-decls): Generate the 'written' field.
730 * cgen-sid.scm (sim-arguments): Document the generation of model.h.
731 * sid-model.scm (unit:enum): New version for sid.
732 (gen-model-class-name): New function.
733 (gen-model-unit-fn-decl): New function.
734 (gen-model-fn-decls): Call gen-model-unit-fn-decl.
735 (gen-model-unit-fn-name): New parameter 'when'.
736 (-gen-model-insn-fn-name): Ditto.
737 (-gen-model-insn-qualified-fn-name): New function.
738 (-gen-model-insn-fn-decl): New function.
739 (-gen-model-insn-fn-decls): New function.
740 (-gen-model-insn-fn): New parameter 'when'. Call
741 -gen-model-insn-qualified-fn-name.
742 (-gen-model-insn-fns): Generate the constructor for the model. Generate
743 functions for modelling insn before and after execution.
744 (-gen-model-class-decls): New function.
745 (" (gen-model-class-name model) "): New function.
746 (gen-model-classes): New function.
747 (-gen-insn-timing): Generate functions for modelling insn before and after
749 (-gen-insn-unit-timing): Generate class-qualified names.
750 (-gen-model-timing-table): Ditto.
751 (cgen-model.cxx): Generate #include for @cpu@.h. Omit generation of code
752 not needed (yet) by sid.
753 (cgen-model.h): New function.
755 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
757 * cpu/sh.cpu: Replace occurrances of 'Hitachi' with 'Renesas'.
758 * cpu/sh64-compact.cpu: Likewise.
759 * cpu/sh64-media.cpu: Likewise.
761 2003-03-21 DJ Delorie <dj@redhat.com>
763 * cpu/xstormy16.cpu (basic-psw): New argument ws (wordsize),
764 which indicates if the sign flag is set from bit 15 or 7.
766 (set-psw): New argument ws, propogate it.
767 (set-psw-nowrite): Likewise.
768 (set-mem-psw): Likewise.
769 (set-psw-carry): Likewise. Use temporaries to prevent
770 prematurely overwriting needed inputs.
771 (set-psw-rrotate17): Fix logic.
772 (shrgrgr): Preserve carry for zero-bit shifts.
773 (shrgrimm): Likewise.
775 (shlgrimm): Likewise.
777 (asrgrimm): Likewise.
780 2003-03-12 Frank Ch. Eigler <fche@redhat.com>
782 * sid.scm: Set APPLICATION to SID-SIMULATOR.
784 2002-03-05 DJ Delorie <dj@redhat.com>
786 * cpu/xstormy16.cpu (set-psw-add): Use temporaries to prevent
787 prematurely overwriting needed inputs.
788 (set-psw-sub): Likewise.
790 Fri Feb 21 19:48:19 2003 J"orn Rennecke <joern.rennecke@superh.com>
792 * cpu/sh64-media.cpu (make-mextr): Fix setting of count.
794 2003-02-18 DJ Delorie <dj@redhat.com>
796 * xstormy16.cpu (set-mem-alignfix-psw): Remove.
797 (movlmemimm): Just mask the address.
798 (movhmemimm): Likewise.
799 (movlmemgr): Likewise.
800 (movhmemgr): Likewise.
801 (set-psw): Always set the psw last.
802 (set-psw-carry): Likewise.
803 (set-psw-add): Likewise.
804 (set-psw-sub): Likewise.
806 * xstormy16.cpu (set-psw-rrotate17): New. Choose the correct set
807 of 16 patterns from the set-psw-rotate17 function.
808 (movgrigr, movgripostincgr, movgripredecgr, movgriigr,
809 movgriipostincgr, movgriipredecgr): Set psw correctly.
810 (movfgrigr, movfgripostincgr, movfgripredecgr, movfgriigr,
811 movfgriipostincgr, movfgriipredecgr): Fix semantics.
812 (rrcgrgr, rrcgrimm4): Use new set-psw-rrotate17 function.
814 2003-02-11 Dave Brolley <brolley@redhat.com>
816 * desc-cpu.scm (gen-ifld-defns): Add all ifields to the
817 @arch@_cgen-ifld_table.
818 (gen-maybe-multi-ifld): Use the ifield enumerators to index the
819 @arch@_cgen-ifld_table.
821 2003-02-03 Frank Ch. Eigler <fche@redhat.com>
823 * sid-cpu.scm (-gen-sfrag-engine-fn): Generate more hygienic C++.
825 2003-01-09 Graydon Hoare <graydon@redhat.com>
827 * utils-sim.scm (-gen-decoder-switch): Fix edge condition for
830 2003-01-07 Graydon Hoare <graydon@redhat.com>
832 * utils-gen.scm (attr-int-gen-defn): Define.
834 2002-12-21 Doug Evans <dje@sebabeach.org>
836 * ifield.scm (-ifield-parse): Rewrite <bitrange> computation.
837 (-get-ifld-word-offset,-get-ifld-word-length): New fns.
839 * dev.scm (cload): Update location of .cpu files.
841 2002-12-19 Doug Evans <dje@sebabeach.org>
843 * utils-sim.scm (gen-profile-sym): New fn.
844 (<operand>,sbuf-profile-sym): New method.
845 (<operand>,sbuf-profile-elm): Use it.
846 * sim.scm (<operand>,gen-record-profile): Use sbuf-profile-sym instead
847 of hardcoding symbol name.
848 (<operand>,gen-profile-code): Ditto.
849 (<unit>,gen-profile-code): Use gen-profile-sym instead of hardcoding
852 * mode.scm (mode-sem-mode): New fn.
853 * operand.scm (op:new-mode): Update. mode-name.
854 (op-natural-mode?) New fn.
855 * rtl.scm (hw): Set hw-name,mode-name.
857 Back out sim*.scm changes of 2001-04-02 Ben Elliston <bje@redhat.com>
859 * sim-decode.scm (-gen-decode-insn-globals): Use @PREFIX@_INSN__MAX
860 as size of IDESC-TABLE-VAR.
861 (@prefix@_init_idesc_table): Ditto.
862 * sim-model.scm (-gen-mach-defns): Ditto.
863 * sim.scm (gen-cpu-insn-enum-decl): Rename last elm from max to -max.
865 * utils-sim.scm (-gen-decode-insn-entry): Fix some spacing in output.
867 * insn.scm (-parse-insn-format-symbol): Improve error message.
868 (-parse-insn-format): Ditto.
870 * gen-all-sim: New script.
872 2002-12-16 DJ Delorie <dj@delorie.com>
874 * cpu/xstormy16.opc (parse_immediate16): Add prototype.
876 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
878 * cpu/xstormy16.cpu (imm16): Call handler immediate16.
879 * cpu/xstormy16.opc (parse_small_immediate): Return on '@'.
880 (parse_immediate16): Handle immediate16 values, which now include
881 @hi(label) and @lo(label)
883 2002-12-03 Alan Modra <amodra@bigpond.net.au>
885 * desc-cpu.scm (gen-maybe-multi-ifld): Remove superfluous parens.
886 Add braces and cast for union field.
887 (gen-multi-ifield-nodes): Add braces and cast for union field.
888 (cgen_operand_table): Similarly fix sentinel.
889 (cgen_cpu_close): Constify "insns". Formatting.
890 (cgen-desc.c): Include xregex.h.
891 * cpu/ip2k.opc (ip2k_cgen_insn_supported): Move to opc.c section.
893 <opc.c>: Include safe-ctype.h.
894 (ip2k_asm_hash): Use ISSPACE and TOLOWER.
895 (PARSE_FUNC_DECL): Declare. Use to prototype parse_fr, parse_addr16,
896 parse_addr16_p, parse_addr16_cjp, parse_lit8 and parse_bit3.
897 (parse_fr): Constify "old_strp". Correct type of "tempvalue".
898 Don't test it for >= 0. Use ISSPACE rather than isspace. Formatting.
899 (parse_addr16): Correct type of "value". Formatting.
900 (parse_addr16_p): Likewise.
901 (parse_addr16_cjp): Likewise.
902 (parse_lit8): Likewise.
903 (parse_bit3): Formatting.
904 (PRINT_FUNC_DECL): Define. Use to prototype print_fr, print_dollarhex,
905 print_dollarhex8, print_dollarhex16, print_dollarhex_addr16h,
906 print_dollarhex_addr16l, print_dollarhex_p, print_dollarhex_cj and
908 (print_fr): Add ATTRIBUTE_UNUSED on unused args. Formatting.
909 (print_dollarhex): Add ATTRIBUTE_UNUSED on unused args.
910 (print_dollarhex8): Likewise.
911 (print_dollarhex16): Likewise.
912 (print_dollarhex_addr16h): Likewise.
913 (print_dollarhex_addr16l): Likewise.
914 (print_dollarhex_p): Likewise.
915 (print_dollarhex_cj): Likewise.
916 (print_decimal): Likewise.
917 * cpu/xstormy16.opc (parse_mem8): Use ISALNUM rather than isalnum.
919 2002-11-30 Hans-Peter Nilsson <hp@axis.com>
921 * doc/rtl.texi (Model variants): Mention current limitations for
922 unit inputs and outputs.
923 (Hardware elements) <attribute PROFILE>: Be slightly more
925 (Instructions) <timing>: input/output overrides have a direction
928 2002-11-25 DJ Delorie <dj@redhat.com>
930 * xstormy16.cpu (sdiv, divlh, sdivlh): Fix sdivlh/divlh encodings.
932 2002-11-21 Jeff Johnston <jjohnstn@redhat.com>
934 * cpu/iq10.cpu: New file.
935 * cpu/iq2000.cpu: Likewise.
936 * cpu/iq2000.opc: Likewise.
937 * cpu/iq2000m.cpu: Likewise.
939 2002-11-19 DJ Delorie <dj@redhat.com>
941 * cpu/xstormy16.cpu (sdiv, divlh, sdivlh): New.
943 2002-11-05 Frank Ch. Eigler <fche@redhat.com>
945 * dev.scm: Call getenv with a string, not a symbol.
947 2002-10-08 Doug Evans <dje@transmeta.com>
948 Hans-Peter Nilsson <hp@axis.com>
950 * types.scm (bitrange-overlap?): Handle lsb0?.
952 2002-09-07 Frank Ch. Eigler <fche@redhat.com>
954 From Robert Cragie <rcc@jennic.com>:
955 * cpu/arm7.cpu (ldm*-sw*, stm*-sw*): New instructions.
957 2002-07-17 Frank Ch. Eigler <fche@redhat.com>
958 Ben Elliston <bje@redhat.com>
959 John Healy <jhealy@redhat.com>
960 Jeff Johnston <jjohnstn@redhat.com>
961 Alan Lehotsky <alehotsky@redhat.com>
962 Ubicom Inc. <SupportDesk@ubicom.com>
964 * cpu/ip2k.cpu: New file.
965 * cpu/ip2k.opc: Likewise.
967 2002-07-01 Hans-Peter Nilsson <hp@axis.com>
969 * utils-gen.scm (-gen-extract-word): Handle lsb0?.
971 2002-06-25 J"orn Rennecke <joern.rennecke@superh.com>
973 * cpu/sh64-compact.cpu (movw5): Use Correct operand field for reg.
974 * cpu/sh64-media.cpu (-ldhi-byte, -ldhi-word, -ldhi-long): New macros.
975 (-ldlo-byte, -ldlo-word, -ldlo-long): Likewise.
976 (-sthi-word, -sthi-long -stlo-byte, -stlo-word, -stlo-long): Likewise.
977 (ldhil, ldhiq, ldlol, ldloq, stlol, stloq): Implement.
978 (mshfhib, mshfhil, mshfhiw, mshflob, mshflol, mshflow): Fix indices.
979 (-sthi-byte): If there is a single byte to store, store it at
981 (sthil, sthiq): Fix big-endian behaviour.
982 (mcnvslw, mcnvswb, mcnvswub, mmacfxwl, mmacnfx.wl): Fix indices.
983 (mmulfxl, mmulfxw, mmulfxrpw, mmulhiwl, mmullowl): Likewise.
984 (saturate): Use Dimode to check if saturation operation is required.
985 (usaturate): Likewise.
987 (-maddsl, -maddsub): Compute to-be-saturated value in wider mode.
988 (-maddsw, mmacfxwl, mmacnfx.wl, -mshaldsl, -mshaldsw): Likewise.
989 (-mshardl, -mshardw, -msubsl, -msubsub, -msubsw): Likewise.
990 (msadubq): Fix subword index in second operand of first subtraction.
992 2002-06-20 Hans-Peter Nilsson <hp@axis.com>
994 * sim-cpu.scm (gen-semantic-code): Prepend with setup-semantics
997 2002-06-18 Dave Brolley <brolley@redhat.com>
999 * cpu/frv.cpu: New cpu description.
1000 * cpu/frv.opc: New cpu support code.
1002 2002-05-21 Dave Brolley <brolley@redhat.com>
1004 * decode.scm (-opcode-slots): Don't consider bits beyond the
1007 2002-05-17 Johan Rydberg <jrydberg@rtmk.org>
1009 * cpu/powerpc.cpu: New file.
1011 2002-05-01 Graydon Hoare <graydon@redhat.com>
1013 * desc-cpu.scm (@arch@_cgen_cpu_close): Fix memory leaks.
1015 2002-03-20 Hans-Peter Nilsson <hp@axis.com>
1017 * doc/pmacros.texi (Symbol concatenation): Mention that .sym
1018 results are expanded recursively.
1020 2002-03-19 Hans-Peter Nilsson <hp@axis.com>
1022 * pmacros.scm (-pmacro-expand,scan): If result is a symbol,
1023 call scan-symbol on it, to enable recursive macro-expansion.
1025 2002-01-25 Frank Ch. Eigler <fche@redhat.com>
1027 * sid-cpu.scm (-gen-hardware-types): Generate single hardware union
1028 for multiple-isa configurations.
1029 * sid-decode.scm (-gen-decode-fn): Tolerate empty insn list.
1031 2002-02-04 Ben Elliston <bje@redhat.com>
1033 * cpu/sh.cpu, cpu/sh.opc: New files.
1034 * cpu/sh64-comact.cpu, cpu/sh64-media.cpu: Likewise.
1036 2002-01-29 Hans-Peter Nilsson <hp@axis.com>
1038 * doc/rtl.texi: Fix typo: define-attr, not define-attribute.
1039 (Enumerated constants): Mention that an ifield must not specify a
1041 (Instruction operands): Ditto for index.
1042 (Expressions) <parallel>: Remove misplaced mention of local
1044 <if>: Mention that mode must be specified and non-VOID when the
1047 2002-01-28 Hans-Peter Nilsson <hp@axis.com>
1049 * doc/porting.texi: When referring to *.opc, mention they are in
1050 the cpu subdir. Call top-level directory toplevel, not devo.
1051 Close string in define-normal-insn example.
1053 * doc/pmacros.texi: Fix .substr typo to .substring.
1054 Mention that .sym expansions are not further expanded.
1056 2002-01-22 Graydon Hoare <graydon@redhat.com>
1058 * desc-cpu.scm (ifld-number-cache): Add.
1060 (gen-maybe-multi-ifld-of-op): Add.
1061 (gen-maybe-multi-ifld): Add.
1062 (gen-multi-ifield-nodes): Add.
1063 (cgen-desc.c): Add call to gen-multi-ifield-nodes.
1065 2002-01-10 matthew green <mrg@redhat.com>
1067 * cpu/xstormy16.cpu (gr-Rbj-names): Rename this ...
1068 (gr-Rb-names): ... to this.
1069 (h-Rb): New hardware piece.
1070 (h-Rbj): Use gr-Rb-names.
1072 (holdx): New instruction.
1074 2002-01-07 Ben Elliston <bje@redhat.com>
1076 * utils.scm (package-cygnus-simulators): Rename from this ..
1077 (package-red-hat-simulators): .. to this.
1078 * opcodes.scm (option-set!): Use package-red-hat-simulators.
1079 * sid-cpu.scm (cgen-desc.h): Likewise.
1080 (cgen-cpu.h): Likewise.
1081 (cgen-defs.h): Likewise.
1082 (cgen-write.cxx): Likewise.
1083 (cgen-semantics.cxx): Likewise.
1084 (cgen-sem-switch.cxx): Likewise.
1085 * sid-decode.scm (cgen-decode.h): Likewise.
1086 (cgen-decode.cxx): Likewise.
1087 * sid-model.scm (cgen-model.cxx): Likewise.
1088 * sid.scm (option-set!): Likewise.
1089 * sim.scm (option-set!): Likewise.
1091 2002-01-07 Ben Elliston <bje@redhat.com>
1093 * utils.scm (copyright-fsf): Add 2002.
1094 (copyright-cygnus): Rename to copyright-red-hat.
1095 (copyright-red-hat): Add 2002.
1096 (CURRENT-COPYRIGHT): Update comment.
1097 * opcodes.scm (option-set!): Update callers.
1098 * sid-model.scm (cgen-model.cxx): Likewise.
1099 * sid-cpu.scm: Likewise.
1100 * sid-decode.scm: Likewise.
1101 * sid.scm (option-set!): Handle "redhat" as an option for
1102 "copyright"; use copyright-red-hat.
1103 * sim.scm (option-set!): Likewise.
1105 2002-01-03 Dave Brolley <brolley@redhat.com>
1107 * decode.scm (-distinguishing-bit-population): Compute num-insns, the
1108 number of insns in the list. Update the population count function to
1109 identify and prioritize 3 catgories of useful bits.
1110 (-population-top-few): Don't consider bits with a population count of
1112 (-build-decode-table-entry): Don't call
1113 filter-harmlessly-ambiguous-insns. Filter out non-specialized and
1114 identical insns at the next tree level.
1115 * insn.scm (filter-harmlessly-ambiguous-insns): Note in a comment that
1116 this function is no longer used.
1117 (filter-non-specialized-ambiguous-insns): New function.
1118 (filter-identical-ambiguous-insns): New function.
1119 (find-identical-insn): New function.
1120 (filter-harmlessly-ambiguous-insns): Removed.
1122 2001-11-26 Geoffrey Keating <geoffk@redhat.com>
1123 matthew green <mrg@redhat.com>
1124 Frank Ch. Eigler <fche@redhat.com>
1125 Nick Clifton <nickc@cambridge.redhat.com>
1127 * cpu/xstormy16.cpu: New file.
1128 * cpu/xstormy16.opc: New file.
1130 2001-11-26 Frank Ch. Eigler <fche@redhat.com>
1132 * doc/sim.texi, rtl.texi, porting.texi: Correct texinfo markup typos.
1134 2001-11-14 Dave Brolley <brolley@redhat.com>
1136 * utils-gen.scm (-gen-extract-word): Correct computation of the length
1137 of the field being extracted.
1139 2001-10-29 Johan Rydberg <johan@rydberg.com>
1141 * doc/rtl.texi (Expressions): Document the (error ..), (sqrt ..),
1142 (cos ...) and (sin ..) rtx.
1144 2001-10-13 Nick Clifton <nickc@cambridge.redhat.com>
1146 * desc-cpu.scm: Do not include ctype.h in generated desc
1147 files. They will inherit safe-ctype.h instead.
1149 2001-10-08 Nick Clifton <nickc@cambridge.redhat.com>
1151 * desc-cpu.scm: Add missing function prototypes (for generated
1152 C files). Fix compile time warning messages about unused
1153 parameters (for generated C files).
1154 * opc-asmdis.scm: The same.
1155 * opc-ibld.c: The same.
1156 * opc-itab.scm: The same.
1157 * cpu/fr30.opc: The same.
1158 * cpu/m32r.opc: The same.
1159 * cpu/openrisc.opc: The same.
1161 2001-09-17 graydon hoare <graydon@redhat.com>
1163 * insn.scm (syntax-break-out): Correct logic in handling escaped
1166 2001-07-12 Jeff Johnston <jjohnstn@redhat.com>
1168 * opc-itab.scm (@arch@_cgen_init_opcode_table): Unconditionally
1169 call @arch@_cgen_build_insn_regex now that regex support is in
1172 2001-07-12 Frank Ch. Eigler <fche@redhat.com>
1174 * insn.scm (filter-harmlessly-ambiguous-insns): Fix msg typo.
1175 (mask-superset?): Look for strict supersets to allow rejection of
1178 2001-07-11 Frank Ch. Eigler <fche@redhat.com>
1180 * sid-cpu.scm (-gen-mach-params): New proc to emit ...CHUNK_BITSIZE...
1181 (cgen-desc.h): Call it.
1182 * sid-decode.scm (-gen-decode-fn): Use base-insn-bitsize as
1184 * utils-sim.scm (-gen-decode-insn-entry): For SID only, prepare
1185 entire_insn for extraction, if it's shorter than base-insn-bitsize.
1187 2001-07-11 Frank Ch. Eigler <fche@redhat.com>
1189 * desc-cpu.scm (-gen-mach-table-defns): Emit fourth field: the
1190 mach->cpu insn-chunk-bitsize.
1191 (-gen-cpu-open): In @arch@_cgen_rebuild_tables, process above new
1192 field toward CGEN_CPU_TABLE->insn_chunk_bitsize.
1193 * mach.scm (<cpu>): New field insn-chunk-bitsize.
1194 (-cpu-parse, -cpu-read): Parse/initialize it.
1195 * doc/rtl.texi (define-cpu): Document it.
1197 2001-07-09 Geoffrey Keating <geoffk@redhat.com>
1199 * ifield.scm (<ifield> 'field-start): Don't look at word-len.
1201 2001-07-06 Ben Elliston <bje@redhat.com>
1203 * opcodes.scm (read-cpu.opc): Read .opc files from subdir/cpu.
1205 2001-07-05 Ben Elliston <bje@redhat.com>
1209 * read.scm (include): Include files from srcdir/cpu.
1210 (-cgen): Likewise for loading .cpu files.
1211 * sid.scm (sim-finish!): Read .sim files from srcdir/cpu.
1212 * *.cpu: Move all cpu descriptions into cpu subdirectory.
1214 * simplify.inc: Likewise.
1216 2001-07-04 Ben Elliston <bje@redhat.com>
1218 * read.scm (include): Log "Including file" message at level 1,
1219 rather than outputting it with (display).
1220 (cpu-load): Log "Loading cpu description" and "Processing cpu
1221 description" messages at levels 1 and 2, respectively, rather than
1224 2001-06-14 Geoffrey Keating <geoffk@redhat.com>
1226 * desc.scm (<keyword> 'gen-defn): Add extra zero into
1227 CGEN_KEYWORD_ENTRY initializers.
1229 * gas-test.scm (gen-gas-test): Create 8 testcases, not just 5.
1230 (<operand> 'test-data): Involve both the index and the hardware
1231 in testcase generation.
1232 (<hw-indx> 'test-data): Generate test data from the underlying
1234 (<ifield> 'test-data): Generate test data by computing bit
1235 patterns for the field, then decoding them.
1236 (<hw-address> 'test-data): Allow for new calling convention.
1237 (<hw-iaddress> 'test-data): Likewise.
1238 (<keyword> 'test-data): Convert index values into keywords.
1239 (<hw-asm> 'test-data): Convert index values into integer strings.
1241 * gas-test.scm (cgen-build.sh): Escape '.' as well.
1243 2001-06-01 Frank Ch. Eigler <fche@redhat.com>
1245 * rtl.scm (hw): Encode hw access mode into <operand> name, since this
1246 is required for multi-mode hw types (memory).
1248 2001-05-11 Ben Elliston <bje@redhat.com>
1250 * gas-test.scm (cgen-build.sh, gentest): Escape $ with a backslash
1251 when generating allinsn.d from objdump output. Without it, the
1252 testsuite will treat $ as the regular expression for end of line.
1254 2001-05-09 Ben Elliston <bje@redhat.com>
1256 * doc/porting.texi (Doing a GAS port): Replace `cgen_opcode_open'
1257 with `cgen_cpu_open'; documentation had become out of date.
1258 * doc/rtl.texi (Instruction operands): Likewise.
1260 2001-05-07 Frank Ch. Eigler <fche@redhat.com>
1262 * iformat.scm (compute-insn-base-mask-length): Rewrite to tolerate
1263 various-base-length instruction sets.
1265 2001-04-02 Ben Elliston <bje@redhat.com>
1267 * sid-cpu.scm (-last-insn): New function.
1268 (-gen-sem-switch-engine): Loop through idesc while less than or
1269 equal to the last instruction enum, not less than the MAX enum.
1270 (-gen-sfrag-engine-fn): Clean up frag_label_table initialisation.
1271 * sid-decode.scm (-gen-decode-insn-globals): Define the idesc
1272 table's size to be the last instruction enum plus one, not
1274 * sid.scm (gen-cpu-insn-enum-decl): Do not append a dummy `max'
1275 instruction onto the instruction list.
1277 * sim-decode.scm (@prefix@_init_idesc_table): Compute tabsize
1278 using the size of the table and its elements.
1279 (-gen-decode-insn-globals): Define the idesc table's size to be
1280 the last instruction enum plus one, not @PREFIX@_INSN_MAX.
1281 * sim-model.scm (-gen-mach-defns): Define CPU_MAX_INSNS as the
1282 last instruction enum plus one, not @CPU@_INSN_MAX.
1284 2001-03-28 Ben Elliston <bje@redhat.com>
1286 * doc/version.texi (UPDATED, EDITION): Update.
1287 * doc/stamp-vti: Likewise.
1289 2001-03-26 Ben Elliston <bje@redhat.com>
1291 * doc/credits.texi (Credits): Update.
1293 * gas-test.scm (<keyword>,test-data): Prefix keywords by their
1294 specified prefix and, if necessary, escape `$' in gas-build.sh to
1295 prevent unwanted shell variable expansion.
1297 2001-03-24 Ben Elliston <bje@redhat.com>
1299 * gas-test.scm (<hw-asm>,test-data): Choose pseudo-random data.
1300 (<keyword>,test-data): Likewise.
1301 (<hw-address>,test-data): Likewise.
1302 (<hw-iaddress>,test-data): Likewise.
1303 (-collate-test-set): New function.
1304 (build-test-set): Use it.
1305 (gen-gas-test): Generate five test cases per instruction.
1306 (cgen-allinsn.exp): Include "-*- Tcl -*-" in DejaGNU test file.
1308 * read.scm: Load "slib/random" if random is not defined.
1309 * slib/random.scm: New file.
1311 * utils.scm: Remove comments about the Hobbit compiler.
1312 (copyright-cygnus): Add 2001.
1313 (package-cygnus-simulators): Replace "Cygnus" with "Red Hat".
1314 (package-gnu-simulators): Tidy.
1316 2001-03-23 Ben Elliston <bje@redhat.com>
1318 * cgen-gas.scm: Inline documentation improvements.
1320 2001-03-21 Ben Elliston <bje@redhat.com>
1322 * opc-itab.scm (compute-syntax): Emit a parse error if an operand
1323 given in a syntax string is undefined.
1325 * opc-itab.scm (compute-syntax): Emit a parse error if an operand
1326 name is empty or invalid -- eg. "$(rs)" instead of "($rs)".
1328 2001-03-20 Patrick Macdonald <patrickm@redhat.com>
1330 * desc-cpu.scm (@arch@_cgen_cpu_open): Correct machine calculation
1331 for arg_type CGEN_CPU_OPEN_BFDMACH.
1333 2001-03-20 Ben Elliston <bje@redhat.com>
1335 * opc-itab.scm (-gen-insn-enum): Do not append a dummy `max'
1336 instruction onto the instruction list. Define MAX_INSNS to be the
1337 value of the last instruction enum plus one.
1339 2001-03-14 Nick Clifton <nickc@redhat.com>
1341 * utils.scm (copyright-fsf): Add 2001. Remove (C).
1343 2001-03-05 Dave Brolley <brolley@redhat.com>
1345 * sim-decode.scm (-gen-extract-case): Generate declaration of "insn"
1346 if the number of ifields is greater than zero.
1348 2001-03-01 Frank Ch. Eigler <fche@redhat.com>
1350 * sid.cpu (-op-gen-set-trace[-parallel], -create-virtual-insns!):
1351 Emit LIKELY/UNLIKELY branch probability hints.
1352 * sid-decode.cpu (-gen-record-args): Ditto.
1354 2001-02-02 Patrick Macdonald <patrickm@redhat.com>
1356 * desc-cpu.scm (-gen-hash-defines): Rename
1357 CGEN_ACTUAL_MAX_SYNTAX_BYTES to CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS.
1359 2001-01-26 Frank Ch. Eigler <fche@redhat.com>
1361 * sid-cpu.scm (gen-parallel-exec-type): Use unsigned long long for
1363 (-gen-write-fn, -gen-sem-case, -gen-sfrag-case): Ditto.
1364 * sid-decode.scm (-gen-scache-decls): Exclude writeback tracking field
1366 * sid.scm (<operand> gen-write): Use unsigned long long expression
1368 (-op-gen-set-trace, -op-gen-set-trace-parallel): Ditto.
1369 (<unit> gen-profile-code): Ditto.
1371 2001-01-23 Johan Rydberg <jrydberg@opencores.org>
1373 * doc/rtl.texi (Expressions): Document the (index-of ...) and
1376 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
1378 * operand.scm (<operand> pretty-sem-name): New field.
1379 (<operand> make): Initialize it from hw-name.
1380 (op:set-pretty-sem-name!): New function.
1381 (<operand> gen-pretty-name): Default to fetching new field.
1382 * rtl.scm (hw): Copy hw-name to pretty-sem-name instead. Restore
1383 sem-name setting from -rtx-hw-name.
1385 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
1387 * rtl.scm (hw): Copy hw-name to new operand's sem-name, to simplify
1388 its subsequent gen-pretty-name.
1390 * read.scm: Increase thread working stack limit and backtrace
1393 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
1395 * doc/rtl.texi: Deprecate and depreciate the decode-assist construct.
1397 2001-01-06 Johan Rydberg <jrydberg@opencores.org>
1399 * openrisc.cpu (or32): Setup semantics for h-delay-insn to
1400 current insn plus 4.
1401 (h-delay-insn): New hardware register.
1402 (l-jal): Uses h-delay-insn instead of pc when setting link register.
1406 * openrisc.opc (parse_hi16): Sign extend value.
1407 (parse_lo16): Likewise.
1409 2001-01-06 Ben Elliston <bje@redhat.com>
1411 * utils-gen.scm (gen-sfmt-enum-decl): Use @prefix@ and @PREFIX@
1412 instead of @cpu@ and @CPU@ to generically prefix symbol names.
1413 * sim-cpu.scm (-gen-sem-fn-table-entry): Likewise.
1414 (-gen-semantic-fn-table): Likewise.
1415 (-gen-scache-semantic-fn): Likewise.
1416 (-gen-no-scache-semantic-fn): Likewise.
1417 (cgen-read.c): Likewise.
1418 (cgen-sem-switch.c): Likewise.
1419 * desc-cpu.scm (cgen-desc.c): Use @arch@, not @prefix@, since this
1420 is a filename prefix.
1421 * sim-decode.scm (IDESC-TABLE-VAR): Use @prefix@, et al.
1422 (-gen-decode-insn-globals): Likewise.
1423 (-gen-idesc-decls): Likewise.
1424 (cgen-decode.h): Likewise.
1425 (cgen-decode.c): Likewise.
1426 * sim.scm (gen-cpu-insn-enum-decl): Likewise.
1427 (gen-cpu-insn-enum): Likewise.
1428 (sim-finish!): Likewise.
1430 2001-01-05 Johan Rydberg <jrydberg@opencores.org>
1432 * openrisc.cpu: New file.
1433 * openrisc.opc: Likewise.
1435 2000-12-12 Ben Elliston <bje@redhat.com>
1437 * doc/rtl.texi (Expressions): Document the (delay ..) rtx.
1439 2000-12-07 Ben Elliston <bje@redhat.com>
1441 * sim-decode.scm (-gen-extract-case): Do not emit a definition for
1442 "insn" when there are zero ifields to extract.
1444 2000-12-04 Frank Ch. Eigler <fche@redhat.com>
1446 * utils-sim.scm (gen-define-argbuf-macro): Handle sfmt=#f case, to be
1447 used by simple/non-scache simulators.
1448 * sim-cpu.scm (-gen-read-case): Call gen-define/undef-field-macro
1449 regardless of with-scache?.
1450 (-gen-write-case, -gen-no-scache-semantic-fn, -gen-sem-case): Ditto.
1452 2000-12-03 Ben Elliston <bje@redhat.com>
1454 * desc-cpu.scm (cgen-desc.h): Clarify generated filenames.
1455 (cgen-desc.c): Likewise.
1457 2000-12-01 Greg McGary <greg@mcgary.org>
1459 * desc.scm (<keyword>,gen-defn): Prepend prefix to keyword names.
1461 2000-12-01 Ben Elliston <bje@redhat.com>
1463 * sim-cpu.scm (cgen-cpu.h): Only emit argbuf, scache and extract
1464 definitions if run without with-multipla-isa?.
1465 (cgen-defs.h): New function. Emit an ISA-specific defs file.
1466 * cgen-sim.scm (sim-arguments): Accept -G option to generate defs.
1468 2000-11-24 Ben Elliston <bje@redhat.com>
1470 * sim-cpu.scm (-gen-hardware-struct): New function.
1471 (-gen-hardware-types): If with-multiple-isa is specified, emit all
1472 hardware elements wich have share one or more ISAs with the ISAs
1475 * sim.scm (-with-multiple-isa?): New symbol.
1476 (with-multiple-isa?): New function.
1477 (option-init!): Initialise -with-multiple-isa?.
1478 (option-set!): Handle with-multiple-isa option.
1480 2000-11-21 Ben Elliston <bje@redhat.com>
1482 * utils.scm (copyright-fsf): Add the year 2000.
1484 2000-11-20 Frank Ch. Eigler <fche@redhat.com>
1486 * opc-itab.scm (-gen-ifmt-table, -gen-macro-insn-table: Remove
1487 unneeded "\n\n" from F() macro definition.
1489 2000-11-15 Greg McGary <greg@mcgary.org>
1491 * utils-cgen.scm (gen-define-with-symcat): New function.
1492 * desc-cpu.scm (gen-ifld-defns): Use it.
1493 (gen-hw-table-defns): Use it.
1494 (-gen-hash-defines): Use it.
1495 (gen-operand-table): Use it.
1496 (gen-insn-table): Use it. Remove spurious `#undef MNEM'.
1497 * opc-itab.scm (-gen-ifmt-table): Use it.
1498 (-gen-insn-opcode-table): Use it.
1499 (-gen-macro-insn-table): Use it.
1500 * opc-opinst.scm (-gen-operand-instance-tables): Use it.
1501 * sim-cpu.scm (cgen-semantics.c): Use it.
1502 (cgen-sem-switch.c): Use it.
1504 2000-11-10 Frank Ch. Eigler <fche@redhat.com>
1506 * utils-sim.scm (-gen-decode-insn-entry): Add fn? parameter to signal
1507 request to emit calls to insn extractors as functions rather than
1508 branches to inline blocks.
1509 (-gen-decode-expr-set-itype, -gen-decode-expr-entry): Ditto.
1510 (-gen-decode-table-entry, -gen-decoder-switch, gen-decoder): Ditto.
1512 * sim-decode.c (-gen-decode-fn): Tell (gen-decode) to emit branches
1513 to extractor clauses.
1515 2000-11-10 Frank Ch. Eigler <fche@redhat.com>
1517 * decode.scm (-distinguishing-bit-population): Significantly
1518 improve popularity heuristic. Renamed from
1519 (-mask-bit-population): Gone.
1520 (-population-above-threshold): Sort new bit numbers in order of
1522 (-population-top-few): Allow up to three more bits to be selected
1523 than requested. Correct selection order to prefer better bits.
1524 Correct bug in fewer-than-requested case. Keep threshold as
1526 (decode-best-get-bits): Pass also the insn-values.
1528 * utils-sim.scm (-gen-decoder-switch): Add comment suggesting a
1529 future optimization.
1531 * utils.scm (message): Format nested lists better.
1533 2000-11-09 Doug Evans <dje@casey.transmeta.com>
1535 * dev.scm: Add srcdir to %load-path.
1537 * rtx-funcs.scm (subword): Mode of argument can be different
1538 than mode of result, so don't use OP0 to specify argument's mode.
1540 2000-11-02 Ben Elliston <bje@redhat.com>
1542 * doc/porting.texi (Building a GAS test suite): Document my change
1545 2000-11-01 Ben Elliston <bje@redhat.com>
1547 * sim-test.scm (cgen-build.sh): Include "-*- Asm -*-" in test cases.
1549 2000-10-31 Ben Elliston <bje@redhat.com>
1551 * gas-test.scm (cgen-build.sh): Allow the generated script to run
1552 with no command line arguments if the gas build directory can be
1555 2000-10-26 Doug Evans <dje@casey.transmeta.com>
1557 * insn.scm (-parse-insn-format-symbol): Fix spelling error,
1558 op-ifld -> op-ifield.
1560 2000-10-23 Frank Ch. Eigler <fche@redhat.com>
1562 * thumb.scm (cc-tests): Add (ISA thumb) attribute.
1564 2000-10-13 matthew green <mrg@cygnus.com>
1566 * utils-cgen.scm (get-ifetch): Move from here ...
1567 * sim.scm (get-ifetch): ... to here.
1568 * sid.scm (get-ifetch): Copy and port to c++.
1570 2000-10-06 Dave Brolley <brolley@redhat.com>
1572 * utils-gen.scm (-gen-ifld-extract-base): Compute start position as
1573 ifld-start + ifld-word-offset.
1574 (gen-ifld-extract): Check adata-integral-insn? before checking whether
1575 the field is beyond the base number of bits.
1576 (gen-define-ifields): Use a base-length of 32 if adata-integral-insn?.
1577 (gen-extract-ifields): Ditto.
1578 * gas-test.scm (gentest): Generate backslashes before '[' and ']'
1579 characters in the regular expression.
1581 2000-10-02 Frank Ch. Eigler <fche@redhat.com>
1583 * desc-cpu.scm: (gen-operand-decls): Emit MAX_OPERANDS as a
1584 preprocessor constant.
1586 2000-09-21 Frank Ch. Eigler <fche@redhat.com>
1588 * slib/logical.scm: New file from slib. Provides robust bitwise
1589 logical operations for large integers.
1590 * read.scm: maybe-load it.
1592 2000-09-15 Frank Ch. Eigler <fche@redhat.com>
1594 * enum.scm (define-full-insn-enum): Filter with keep-isa predicate.
1595 * ifield.scm (-ifield-parse, -multi-ifield-parse): No longer assert
1596 single-isa predicate, but support keep-isa filtering.
1598 2000-09-08 Frank Ch. Eigler <fche@redhat.com>
1600 * rtl-c.scm (s-sequence): Handle nested c-calls in both
1601 statement-expression and comma-expression contexts.
1602 (s-c-call, s-c-raw-call): Add warning comment about bad assumption.
1604 2000-09-08 Frank Ch. Eigler <fche@redhat.com>
1606 * decode.scm (-population-top-few): Signal error gracefully if
1607 decoding is about to become ambiguous.
1609 2000-09-06 Frank Ch. Eigler <fche@redhat.com>
1611 * doc/rtl.texi (decode-assist): Describe this field as optional.
1613 2000-09-06 Frank Ch. Eigler <fche@redhat.com>
1615 * utils-gen.scm (gen-multi-ifld-extract): Handle case of multi-ifield
1618 2000-09-05 Dave Brolley <brolley@redhat.com>
1620 * sim.scm (sim-finish!): Honour the definition of FAST_P when calling
1621 @cpu@_pbb_begin. Use 0 if FAST_P is not defined.
1623 2000-08-29 Dave Brolley <brolley@redhat.com>
1625 * utils-gen.scm (gen-ifld-extract): Pass total-len if
1626 adata-integral-insn is true for this architecture.
1628 2000-08-24 Frank Ch. Eigler <fche@redhat.com>
1630 * hardware.scm (<hw-immediate> get-index-mode): Define method.
1631 * operand.scm (<operand> gen-pretty-name): Tolerate no op:sem-name.
1632 * rtl-c.scm (-c-rtl-get): Improve an error message.
1633 * sim.scm (-op-gen-set-trace): Support <derived-operand> lvalues.
1635 2000-08-22 Frank Ch. Eigler <fche@redhat.com>
1637 * Makefile.in (DIST_COMMON): Regenerated.
1638 * ifield.scm (<derived-ifield> needed-iflds): New method.
1639 * iformat.scm (-ifmt-lookup-sfmt!): Use base ifields for
1640 sfmts built from <derived-ifield>s.
1641 * operand.scm (-derived-parse-encoding): Give <derived-ifield> a fixed
1642 type symbol 'derived-ifield, not an unparseable string.
1643 * utils-sim.scm (op-needed-iflds) Handler 'derived-ifield case.
1644 (-sfmt-contents): Add tracing.
1646 From Doug Evans <dje@transmeta.com>:
1647 * sim.scm (<operand> cxmake-get): Result is a <c-expr>, not a string of
1650 2000-08-20 Doug Evans <dje@casey.transmeta.com>
1652 * rtl-c.scm (rtl-c-expr-with-estate): New fn.
1653 (rtl-c-expr-parsed,rtl-c-expr): New fns.
1654 (-rtl-c-get): Rename from rtl-c-get.
1655 (rtl-c-get): New fn for getter logging.
1657 2000-07-28 Ben Elliston <bje@redhat.com>
1661 2000-07-25 Ben Elliston <bje@redhat.com>
1663 * doc/credits.texi (Credits): Add Frank Eigler.
1665 2000-07-24 Dave Brolley <brolley@redhat.com>
1667 * opc-itab.scm (gen-insn-opcode-table): Initialize the first element
1669 * desc.scm (gen-attr-table-defn): Initialize all elements fully.
1670 (<keyword>): Initialize all elements fully.
1671 * desc-cpu.scm (-gen-isa-table-defns): Initialize the last element
1673 (-gen-mach-table-defns): Ditto.
1674 (-gen-ifld-defns): Ditto.
1675 (-gen-operand-table): Ditto.
1676 (-gen-insn-table): Ditto.
1677 (-gen-cpu-open): Nothing to do for the mach table.
1679 2000-07-13 Ben Elliston <bje@redhat.com>
1681 * doc/version.texi (UPDATED): Update.
1683 2000-07-05 Ben Elliston <bje@redhat.com>
1685 * configure.in (AC_PATH_PROG): Remove.
1686 * configure: Regenerate.
1687 * Makefile.am (GUILE): Locate guile dynamically.
1688 * Makefile.in: Regenerate.
1689 * doc/Makefile.in: Likewise.
1691 2000-07-03 Ben Elliston <bje@redhat.com>
1693 * desc-cpu.scm (cgen-desc.c): Include "libiberty.h".
1694 * opc-itab.scm (cgen-opc.c): Likewise.
1696 2000-06-28 Frank Ch. Eigler <fche@redhat.com>
1698 * rtl.scm (-rtx-traverse-locals): Correct call to `symbol?' for
1699 guile 1.4 compatibility.
1700 (rtx-env-dump): Comment out buggy display calls.
1702 2000-06-15 matthew green <mrg@redhat.com>
1704 * opc-itab.scm (-gen-ifmt-table-1): Add extra braces to pacify GCC.
1706 2000-06-14 Frank Ch. Eigler <fche@redhat.com>
1708 * Makefile.in: Regenerated.
1710 * desc-cpu.scm (gen-ifld-decls): Exclude derived ifields.
1711 (gen-ifld-defns): Ditto.
1712 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
1713 * rtl.c (rtl-finish!): Ditto.
1714 * opc-itab.scm (-gen-ifield-decls): Ditto.
1715 * opcodes.scm (gen-switch): Exclude derived operands.
1716 * operand.scm (op-iflds-used): Expand derived operands.
1717 (hw-index-derived): New dummy function to create dummy object.
1718 (-derived-operand-parse): Fix mode arg passed to <derived-operand>
1719 constructor. Set object's hw-name and index fields.
1720 (-anyof-merge-subchoices): Set instance object's index also.
1721 (-anyof-name): New helper function.
1722 (anyof-merge-semantics): Correct replacement of operand names in
1724 (op-ifield): Tolerate derived-operands and their funny indices better.
1725 * ifield.scm (ifld-known-values): Expand derived ifields.
1726 (non-multi-ifields, non-derived-ifields): New utility functions.
1727 (ifld-decode-mode): Tolerate objects with unbound decode field.
1728 * iformat.scm (compute-insn-length): Expand derived ifields.
1729 (compute-insn-base-mask): Ditto.
1730 * insn.scm (insn-base-ifields): Remove.
1731 (<insn>): Add iflds-values entry to cache ifld-base-ifields values.
1732 (insn-value): Call ifld-base-ifields and ifld-constant? instead.
1733 * mach.scm (arch-analyze-insns!): Exclude multi-insns.
1734 * sem-frags.scm (sim-sfrag-analyze-insns!): Ditto.
1735 (-frag-test-data): Ditto.
1736 * sid-cpu.scm (cgen-write.cxx,-gen-sem-switch): Ditto.
1737 (-gen-sem-switch-engine); Ditto.
1738 * sid-model.scm (-gen-model-insn-fns, -gen-model-timing-table): Ditto.
1739 * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
1740 (-gen-record-args): Tolerate unbound op-ifield.
1741 * sid.scm (<derived-operand> cxmake-get): New sketch implementation.
1742 (-gen-arch-model-decls, scache-engine-insns, pbb-engine-insns):
1743 Exclude multi-insns.
1744 * sim-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
1745 * utils-sim.scm (op-extract?): Handle derived operands.
1747 * gas-test.scm (cgen-build.sh): Quote '*' chars printed by objdump.
1748 * semantics.scm (-build-operand!): Handle 'DFLT case during parsing.
1749 * hardware.scm (hardware-for-mode): New function.
1751 * insn.scm (filter-harmlessly-ambiguous-insns): New function for
1752 cleaning up decode tables.
1753 (mask-superset?): Little helper function for above.
1754 * decode.scm (-build-decode-table-entry): Call it.
1755 (-opcode-slots): Add some more tracing.
1756 * arm.cpu: Disable decode-splits construct due to implementation
1757 conflict with `filter-harmlessly-ambiguous-insns'
1759 * decode.scm (-population-top-few): New function for better decode
1760 bit generation. Includes minor helper functions.
1761 (decode-get-best-bits): Call it instead.
1762 (OLDdecode-get-best-bits): Renamed previous version of above.
1765 2000-06-13 Ben Elliston <bje@redhat.com>
1767 * configure.in: Use AC_EXEEXT with Cygnus mode. Remove AC_ARG_WITH
1768 for the Guile library directory.
1769 * configure: Regenerate.
1770 * Makefile.in, doc/Makefile.in: Regenerate.
1772 * Makefile.in, doc/Makefile.in: Regenerate.
1773 * configure.in: Remove unnecessary tests. Move to version 1.0.
1774 * acconfig.h, config.in: Remove.
1775 * configure, aclocal.m4: Regenerate.
1776 * doc/stamp-vti, doc/version.texi: Likewise.
1777 * AUTHORS: New file.
1779 2000-06-07 Ben Elliston <bje@redhat.com>
1781 * fixup.scm (symbol-bound?): Reduce debugging output.
1783 2000-06-02 matthew green <mrg@redhat.com>
1785 * insn.scm (insn-base-ifields): Returns all the instruction fields for
1786 a given instruction, replacing derived fields with their subfields.
1787 (insn-value): Use `insn-base-ifields' to find all constant values.
1788 (multi-insn-instantiate!): Comment some debug messages.
1790 2000-06-01 Ben Elliston <bje@redhat.com>
1792 * doc/rtl.texi (Expressions): Document a hazard with the choice of
1793 symbol names used in a (c-call ..) rtx.
1795 * sim-test.scm (build-test-set): Return (()) for an instruction
1796 with no operands, so it too is included in the generated test set.
1798 2000-05-31 Ben Elliston <bje@redhat.com>
1800 * Makefile.am (gas-test): Ensure $(ISA) is not empty.
1801 (sim-test): Likewise.
1802 * Makefile.in: Regenerate.
1804 2000-05-30 Frank Ch. Eigler <fche@redhat.com>
1806 * read.scm (-cgen): In debugging mode (-b), ask guile for untruncated
1807 stack traceback, in an order that resembles gdb's `bt'.
1809 2000-05-24 Frank Ch. Eigler <fche@redhat.com>
1811 * desc-cpu.scm (-gen-hash-defines): Use ifmt-ifields again.
1812 * opc-itab.scm (-gen-ifmt-table-1): Ditto.
1813 * gas-test.scm (gas-test-analyze!, cgen-build.sh): Filter out
1815 * ifield.scm (multi-ifield): Define workable field-mask and field-value
1817 (ifld-base-ifields): New routine to replace ifmt-expanded-ifields.
1818 * iformat.scm (ifmt-expanded-ifields): Gone.
1819 (ifields-base-ifields): New function. Call ifld-base-ifields for real
1821 (-ifmt-lookup-ifmt!): Use it to expand derived/multi combos in new
1824 * opcodes.scm (multi-ifield gen-extract): Correct spacing in generated
1827 2000-05-23 Frank Ch. Eigler <fche@redhat.com>
1829 * sid.scm (with-any-profile?): New function clone.
1831 2000-05-19 Frank Ch. Eigler <fche@redhat.com>
1833 * utils-gen.scm (gen-multi-ifld-extract): Fix decode hook for sim.
1835 2000-05-18 Frank Ch. Eigler <fche@redhat.com>
1837 * ifield.scm (-multi-ifield-parse): Add encode/decode args.
1838 (-multi-ifield-read): Parse them.
1839 (define-full-multi-ifield): Pass #f/#f as defaults for them.
1840 * opcodes.scm (multi-ifield gen-insert): Add encode hook.
1841 (multi-ifield gen-extract): Add decode hook.
1842 * utils-gen.scm (gen-multi-ifld-extract): Add decode hook for sim.
1844 * insn.scm (syntax-break-out): More correctly handle \-escaped
1846 (syntax-make-elements): Ditto.
1847 * opc-itab.scm (compute-syntax): Ditto.
1849 2000-05-17 Ben Elliston <bje@redhat.com>
1851 * gas-test.scm (cgen-build.sh): Log the correct script filename.
1853 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
1855 * gas-test.scm (build-test-set): Return (()) for an instruction
1856 with no operands, so it too is included in the generated test set.
1858 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
1860 * desc-cpu.scm (-gen-hash-defines): Define CGEN_ACTUAL_MAX values for
1861 IFMT_OPERANDS and SYNTAX_BYTES.
1863 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
1865 * sim.scm (with-any-profile?): New function.
1866 * utils-sim.scm (-sfmt-contents): Use above instead of `with-profile?'
1867 to decide whether or not to include profiling counters.
1869 2000-05-10 Frank Ch. Eigler <fche@redhat.com>
1871 Fuller derived-operand support for opcodes.
1872 * insn.scm (non-multi-insns): New filter to oppose `multi-insns'.
1873 * desc-cpu.scm (-define-hash-defines): Compute CGEN_MAX_SYNTAX_BYTES.
1874 Correctly compute ..._IFMT_OPERANDS. Omit useless ..._INSN_OPERANDS.
1875 (gen-operand-table): Omit derived- and anyof- operands from table.
1876 (gen-insn-table): Omit multi-insns from table.
1877 * iformat.scm (ifmt-expanded-fields): New function to expand
1878 subfields of derived-ifields.
1879 (ifmt-compute!): Ignore remaining multi-insns.
1880 * mach.scm (isa-min-insn-bitsize, isa-max-insn-bitsize): Ignore
1882 * opc-itab.scm (-gen-ifmt-table-1): Use ifmt-expanded-ifields.
1883 (-gen-insn-enum, -gen-insn-opcode-table): Ignore multi-insns.
1884 * opcodes.scm (derived-operand): Define abort()ing gen-insert,
1885 gen-extract, gen-fget, gen-fset, gen-parse, gen-print functions.
1886 (gen-switch): Omit anyof-operands.
1887 * operand.scm (-anyof-syntax): New function.
1888 (-anyof-merge-syntax): Call it.
1889 * utils.scm (collect): New idiomatic function.
1891 2000-05-10 Ben Elliston <bje@redhat.com>
1893 * m68k.cpu: New file (work in progress).
1895 2000-05-05 Frank Ch. Eigler <fche@redhat.com>
1897 * Makefile.am (all-local): New target. Create stamp-cgen.
1898 * Makefile.in: Regenerated.
1899 * doc/Makefile.in: Regenerated.
1901 2000-04-26 Frank Ch. Eigler <fche@redhat.com>
1903 * operand.scm (-operand-g/setter-syntax): Correct off-by-one error.
1904 (-operand-parse-setter): Ditto.
1905 * utils-sim.scm (needed-iflds): Store ifield (index) in argbuf, even
1906 for CACHE-ADDR operands.
1907 * sid-decode.scm (-gen-record-args): Remove newly duplicated extract
1908 trace entries. Widen byte-wide values for printing.
1909 * sid.scm (-op-gen-set-trace): Enhance result trace with op indices.
1910 Widen byte-wide values for printing. Hexify memory addresses.
1912 2000-04-23 matthew green <mrg@redhat.com>
1914 * m32r.cpu: Fix a typo.
1916 Fri Apr 21 22:18:48 2000 Jim Wilson <wilson@cygnus.com>
1918 * ia64.cpu (define-model): Change merced to Itanium.
1919 (f-qp): Change quilifying to qualifying.
1920 (movbr_ph, movbr_pvec): Delete.
1921 (I-I21): Delete uses of movbr_ph and movbr_pvec.
1923 2000-04-07 Ben Elliston <bje@redhat.com>
1925 * doc/porting.texi (Building a simulator test suite): Clarify
1926 where generated test cases are placed.
1928 2000-04-07 Ben Elliston <bje@redhat.com>
1930 * Makefile.am (gas-test): Remove dependency on `cgen'.
1932 * Makefile.in: Regenerate.
1934 2000-04-04 Frank Ch. Eigler <fche@redhat.com>
1936 * hardware.scm (<hw-pc> parse): Allow user to set type for pc register.
1937 * mode.scm (mode-finish!): Add placeholder code for mach-dependent
1938 type reconfiguration.
1939 * utils-sim.scm (-sfmt-contents): Add profile-counters only if
1942 2000-03-30 Ben Elliston <bje@redhat.com>
1944 * doc/rtl.texi (Enumerated constants): Add concept index entries.
1946 2000-03-24 Ben Elliston <bje@redhat.com>
1948 * Makefile.am (stamp-cgen): Reinstate target.
1949 * Makefile.in: Regenerate.
1951 2000-03-22 Ben Elliston <bje@redhat.com>
1953 * slib/ppfile.scm: Remove; unused.
1954 * slib/defmacex.scm: Likewise.
1956 2000-03-21 Ben Elliston <bje@redhat.com>
1958 * doc/internals.texi (Source file overview): Document.
1960 * Makefile.am (GUILEDIR): Remove.
1961 (CGEN): Ditto. Callers use $(GUILE) instead.
1962 (GUILEFLAGS): Ditto.
1964 (APPDESCFILES): Ditto.
1965 (OPCODESFILES): Ditto.
1967 (pkgdata_SCRIPTS): Ditto.
1968 (stamp-cgen): Remove target.
1969 * Makefile.in: Regenerate.
1971 * configure.in: Remove header and library tests.
1972 * configure: Regenerate.
1973 * config.in: Likewise.
1975 2000-03-20 Ben Elliston <bje@redhat.com>
1977 * read.scm: Cease loading "hob-sup.scm".
1978 * utils.scm: Inherit the fastcall family of procedures (for now).
1979 * hob-sup.scm: Remove.
1981 2000-03-20 Ben Elliston <bje@redhat.com>
1983 * configure.in (AC_OUTPUT): Do not emit .gdbinit.
1984 * configure: Regenerate.
1985 * gdbinit.in: Remove.
1987 2000-03-17 Ben Elliston <bje@redhat.com>
1989 * Makefile.am (CGEN): Use guile, not cgen.
1990 (CGENCFLAGS, LIBIBERTY, INCLUDES): Remove.
1991 (bin_PROGRAMS, cgen_SOURCES): Likewise.
1992 (CGENFILES): Fold CGEN_HOB_INPUT_FILES and CGEN_NOHOB_FILES.
1993 (HOBBIT_INPUT_FILES, HOBBIT_OUTPUT_FILE): Remove.
1994 (HOB_OBJS): Likewise.
1995 (CGEN_HOB_SRC, CGEN_HOB_OBJ): Likewise.
1996 (CGENOBJS): Likewise.
1997 (cgen_DEPENDENCIES, cgen_LDFLAGS, cgen_LDADD): Likewise.
1998 (hobbit, hobbit.o, hobbit.c): Remove targets.
1999 (cos.o, cgen.o, cgen-gh.o, hob-sup.o): Likewise.
2000 (CLEANFILES): Update.
2001 * acconfig.h (WITH_HOBBIT): Remove.
2002 * configure.in: Do not test for 3 arg scm_make_vector. Remove
2003 option --with-cgen-hobbit.
2004 * cos.h, cos.c, hob-main.c, hob-sup.c, hob-sup.h, hob.sh: Remove.
2005 * cgen-gh.h, cgen-gh.c, cgen-hob.scm, cgen.c: Likewise.
2006 * hobbit.c, hobbit.h, hobbit.scm: Likewise.
2007 * hobscmif.h, hobslib.scm, scmhob.h: Likewise.
2008 * Makefile.in: Regenerate.
2009 * config.in: Likewise.
2010 * aclocal.m4: Likewise.
2011 * configure: Likewise.
2012 * README (Hobbit support): Remove.
2013 * doc/internals.texi (Conventions): Do not mention Hobbit.
2014 * doc/porting.texi (Supported Guile versions): Likewise.
2016 2000-03-16 Frank Ch. Eigler <fche@redhat.com>
2018 * sid-cpu.scm (-gen-sem-switch-engine): Adjust calling &
2019 callback convention to new sid sidutil::basic_cpu code.
2020 (-gen-sfrag-engine-fn): Ditto.
2021 * sid.scm (-create-virtual-insns!): Ditto.
2022 (-hw-gen-set-quiet-pc): Mark delay slot execution specially in pbb
2024 (cxmake-skip): Implement properly for pbb mode.
2026 2000-03-03 Ben Elliston <bje@redhat.com>
2028 * doc/internals.texi: New file.
2030 2000-02-29 Ben Elliston <bje@redhat.com>
2032 * doc/rtl.texi (Derived operands): Remove unnecessary footnote.
2033 * doc/porting.texi: Formatting tweaks.
2035 2000-02-25 Nick Clifton <nickc@cygnus.com>
2037 * desc-cpu.scm (*_cgen_cpu_open): Initialise signed_overflow_ok_p
2040 Thu Feb 24 14:09:01 2000 Doug Evans <devans@seba.cygnus.com>
2042 * operand.scm (<anyof-operand>,make!): Initialize mode-name, not
2045 2000-02-23 Andrew Haley <aph@cygnus.com>
2047 * m32r.cpu (pcmpbz): Make pcmpbz a special (i.e. hidden)
2050 2000-02-24 Ben Elliston <bje@redhat.com>
2052 * doc/rtl.texi (Derived operands): Add some cindex entries.
2054 2000-02-23 Ben Elliston <bje@redhat.com>
2056 * ia32.cpu (dndo): Move general purpose macro from here ..
2057 * simplify.inc (dndo): .. to here.
2059 2000-02-18 Frank Ch. Eigler <fche@redhat.com>
2061 * arm.cpu (h-tbit): Add c-call setter function.
2064 2000-02-17 Frank Ch. Eigler <fche@redhat.com>
2066 * sem-frags.scm (-frag-hash-compute!): Add appstuff arg for traversal.
2067 (-frag-cost-compute!): Ditto.
2068 * utils.scm (copyright-cygnus): Add Y2K.
2069 * sid-cpu.scm (@prefix@_pbb_run): Add unsigned& argument.
2071 2000-01-25 Nick Clifton <nickc@cygnus.com>
2073 * desc-cpu.scm (@arch@_cgen_cpu_open): Add code to initialise
2074 flags field of the CGEN_CPU_TABLE structure.
2076 Sun Dec 12 14:20:36 1999 Doug Evans <devans@seba.cygnus.com>
2078 * operand.scm (<anyof-instance>): Renamed from <anyof-value>.
2079 All references updated.
2081 Tue Nov 30 11:06:22 1999 Doug Evans <devans@seba.cygnus.com>
2083 * ia32.cpu: Rewrite addressing mode support.
2085 * ifield.scm (<ifield>): New member `follows'.
2086 (ifld-known-values): New proc.
2087 (<ifield>): New method set-word-offset!.
2088 (ifld-set-word-offset!): New proc.
2089 (ifld-new-word-offset): New proc.
2090 (<ifield>): New method next-word.
2091 (<multi-ifield>): New method next-word.
2092 (ifld-next-word): New proc.
2093 (ifld-precedes?): New proc.
2094 (-ifield-parse): New args word-offset,word-length,follows.
2095 All callers updated. Handle CISC-style vs RISC-style ifields.
2096 (-ifield-read): Recognize word-offset,word-length,follows specs.
2097 (-ifld-parse-follows): New proc.
2098 (-multi-ifield-make-default-insert): New proc.
2099 (-multi-ifield-make-default-extract): New proc.
2100 (-multi-ifield-parse): Provide default values for insert,extract
2101 handlers if not specified.
2102 (<derived-ifield>): New class.
2103 (derived-ifield?): New predicate.
2104 (ifld-derived-operand?): New predicate.
2105 (f-anyof): New global.
2106 (ifld-anyof?,ifld-anyof-operand?): New predicates.
2107 (f-derived,ifld-derived?): Delete.
2108 (ifield-builtin!): Delete init of f-derived. Init f-anyof.
2109 * insn.scm (-sub-insn-ifields): New proc.
2110 (-sub-insn-make!): New proc.
2111 (multi-insn-instantiate!): Provide initial implementation.
2112 (-insn-parse): If insn contains "anyof" operands, create a
2113 <multi-insn> object instead of a plain <insn>.
2114 (-parse-insn-format-symbol): Rewrite derived operand handling.
2115 Add anyof operand handling.
2116 (-parse-insn-format-ifield-spec): Rewrite.
2117 (-parse-insn-format-operand-spec): Delete.
2118 (-parse-insn-format-list): Delete support for `(operand value)'.
2119 (anyof-operand-format?): Replaces derived-operand-format?.
2120 * operand.scm (-operand-parse-getter): Improve error messages.
2121 (-operand-parse-setter): Ditto.
2122 (<derived-operand>): New members args,syntax,base-ifield,encoding,
2124 (<anyof-operand>): Change baseclass from <derived-operand> to
2125 <operand>. Delete member values. New members base-ifield,choices.
2126 (anyof-operand?): New predicate.
2127 (-derived-parse-encoding,-derived-parse-ifield-assertion): New procs.
2128 (-derived-operand-parse): Rewrite.
2129 (-derived-operand-read): Rewrite.
2130 (-anyof-parse-choice): New proc.
2131 (-anyof-operand-parse): Rewrite.
2132 (-anyof-operand-read,define-anyof-operand): New procs.
2133 (<anyof-value>): Rewrite.
2134 (-anyof-initial-known): New proc.
2135 (anyof-satisfies-assertions?): New proc.
2136 (-anyof-merge-syntax,-anyof-merge-encoding): New procs.
2137 (-anyof-merge-getter,-anyof-merge-setter): New procs.
2138 (-anyof-merge-semantics,-anyof-merge-ifield-assertion): New procs.
2139 (-anyof-merge-subchoices,-anyof-all-subchoices): New procs.
2140 (-anyof-value-from-derived): New proc.
2141 (-anyof-all-choices-1,anyof-all-choices): New procs.
2142 (operand-init!): Create define-anyof-operand reader command.
2144 * insn (syntax-break-out): Take syntax as argument instead of insn.
2145 All callers updated.
2146 (syntax-make): Move here, from ???.
2148 * types.scm (<bitrange>): Rename accessors from bitrange:foo to
2149 bitrange-foo. All uses updated.
2150 (bitrange-next-word): New proc.
2152 * semantics.scm (-solve-expr-fn,rtx-solve): New procs.
2154 * rtl.scm (rtx-canonicalize): Provide initial implementation.
2155 (rtx-make-const,rtx-make-enum): New procs.
2156 (rtx-arg1,rtx-arg2): Renamed from -rtx-arg[12]. All callers updated.
2157 (rtx-mem-addr,rtx-mem-sel): New procs.
2158 (rtx-change-address): New proc.
2159 (rtx-make-ifield,rtx-make-operand,rtx-make-local): New proc.
2160 (rtx-make-set,rtx-single-set?): New procs.
2161 (rtx-combine): New proc.
2163 * rtl.scm (rtx-traverse): New arg `appstuff'. All callers updated.
2164 (rtx-traverse-with-locals): Ditto.
2165 (-rtx-traverse,-rtx-traverse-*): Ditto.
2167 * rtl.scm (define-subr): New proc.
2168 (rtl-init!): Create reader command `define-subr'.
2170 * cos.c (_object_mi_p): Ensure argument is an object.
2171 (indent): New function.
2172 (_object_print_elms): Add pretty-printing support.
2173 (_object_print): Ditto.
2175 * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall7.
2176 (*floats-s->c-fun-table*): Ditto.
2177 * hobbit.c,hobbit.h: Rebuild.
2178 * hob-sup.c (fastcall7): New proc.
2179 * hob-sup.h (fastcall7): Declare.
2180 * hob-sup.scm (fastcall7): New macro.
2182 * mach.scm (<arch>): New member subr-list.
2183 (current-subr-list,current-subr-add!,current-subr-lookup): New procs.
2184 (arch-finish!): Reverse recorded subr list.
2186 * read.scm (debug-env): New global.
2187 (debug-var-names,debug-var,debug-repl-env): New procs.
2188 (debug-repl): Rewrite. New arg `env-list'. All callers updated.
2189 (debug-quit): Renamed from `continue'.
2191 * simplify.inc (dsmf): New pmacro.
2193 * utils.scm (plus-scan): New proc.
2194 (split-bits): Rewrite.
2195 (split-value): New proc.
2197 1999-10-13 Doug Evans <devans@casey.cygnus.com>
2199 * doc/Makefile.am (DOCFILES): Add notes.texi.
2200 * doc/Makefile.in: Rebuild.
2202 1999-10-11 Doug Evans <devans@casey.cygnus.com>
2204 * ifield.scm (ifld-derived?): New proc.
2205 (f-derived): New global.
2206 (ifield-builtin!): Create ifield f-derived.
2207 (<multi-insn>): New class.
2208 (multi-insn?): New predicate.
2209 (multi-insn-instantiate!): New proc.
2210 (-insn-parse): Create <multi-insn> objects for insns with derived
2212 (-parse-insn-format-symbol): Handle derived ifields.
2213 (-parse-insn-format-ifield-spec): New proc.
2214 (-parse-insn-format-operand-spec): New proc.
2215 (-parse-insn-format-list): Simplify.
2216 (-parse-insn-format): No longer allow (ifield-object value) spec.
2217 (derived-operand-format?): New proc.
2218 (insn-alias?): New proc.
2219 (non-alias-insns): Rewrite.
2220 (insn-real?): Renamed from real-insn?, all callers updated.
2221 (virutal-insns): Rewrite.
2222 (multi-insns): New proc.
2223 * mach.scm (arch-analyze-insns!): Instantiate multi-insns if present.
2224 * operand.scm (op-ifield): Renamed from op:ifield, all callers updated.
2225 Return #f if operand doesn't have an index or if index is not an
2227 (hw-index-anyof): New proc.
2228 (-operand-parse): Allow integer indices.
2229 (<derived-operand>): New class.
2230 (derived-operand?): New predicate.
2231 (<anyof-operand>): New class.
2232 (<anyof-value>): New class.
2233 (-anyof-parse-value,-anyof-operand-parse): New procs.
2234 (-derived-operand-parse,-derived-operand-read): New procs.
2235 (define-derived-operand,define-full-derived-operand): New procs.
2236 (operand-init!): New reader command define-derived-operand.
2238 * utils.scm (list-take): Handle negative amount.
2239 (element?): Rewrite.
2241 1999-10-10 Doug Evans <devans@casey.cygnus.com>
2243 * dev.scm: quick-utils.scm renamed to ~/.cgenrc.
2245 1999-10-04 Richard Henderson <rth@cygnus.com>
2247 * ia64.cpu: Checkpoint.
2249 1999-09-29 Doug Evans <devans@casey.cygnus.com>
2251 * sim-cpu.scm (-gen-semantic-fn-table): Virtual insns are always valid.
2253 * sim.scm (sim-finish!,x-invalid): Always set pc. Set vpc based on
2254 default-insn-bitsize. Pass vpc to sim_engine_invalid_insn.
2256 Wed Sep 29 14:39:39 1999 Dave Brolley <brolley@cygnus.com>
2258 * sim.scm (sim-finish!): Don't call sim_io_error for invalid insn. Use
2259 PC returned by sim_engine_invalid_insn.
2261 1999-09-28 Doug Evans <devans@casey.cygnus.com>
2263 * ia32.cpu: New file.
2265 1999-09-25 Doug Evans <devans@casey.cygnus.com>
2267 * utils.scm (bit-set?): Fix off by one error.
2269 * rtl-c.scm (s-sequence): Fix non-void-mode result output.
2271 * rtl.scm (hw): Check for valid hardware element before trying to
2274 * arm.cpu (arm7f cpu): Renamed from arm. All users updated.
2275 * arm7.cpu (bx): Fix name of target address operand in assembler spec.
2276 (*): arm_compute_operand2_foo renamed to compute_operand2_foo.
2277 * thumb.cpu (*): arm_compute_operand2_foo renamed to
2278 compute_operand2_foo.
2280 * cgen-sid.scm (sim_arguments): Add support for building defs.h.
2281 * sid.scm (-hw-gen-set-quiet-pc): Handle #:delay modifier.
2282 Call delayed_branch/branch methods instead of assigning to `vpc'.
2283 (<hw-pc>,cxmake-skip): Call skip method.
2284 (-gen-hw-selector): Call rtl-c++ instead of rtl-c.
2285 (<pc>,cxmake-skip): Ditto.
2286 (-create-virtual-insns!): Ditto.
2287 (op:read): Call estate-make-for-normal-c++ instead of estate-...-c.
2289 (op:record-profile): Specify #:output-language "c++".
2290 * sid-cpu.scm (-gen-insn-attr-decls): Rename @cpu@_insn_attr to
2292 (cgen-desc.h): Use @arch@ namespace instead of @cpu@.
2294 (-gen-reg-access-defns): Use rtl-c++ instead of rtl-c.
2295 (gen-semantic-code): Ditto.
2296 (-gen-sem-case,-gen-sfrag-code): Ditto.
2297 (-gen-hardware-types): Delete class @cpu@_cpu_base.
2298 (cgen-cpu.h): File is now #included by main cpu class, rather than
2300 (cgen-defs.h): New proc.
2301 (-gen-scache-semantic-fn): Change result type to sem_status.
2302 New local `status'. Call done_cti_insn/done_insn method at end.
2303 (cgen-semantics.cxx): Include @cpu@.h instead of @arch@-main.h,
2305 (cgen-sem-switch.cxx): Ditto.
2306 * sid-decode.scm (-gen-idesc-decls): Update return type of
2308 (cgen-decode.h): Add using namespace @arch@.
2309 (cgen-decode.cxx): Include @cpu@.h instead of @arch@-main.h.
2311 * rtl-c.scm (<rtl-c-eval-state>): New member output-language.
2312 (estate-output-language-c?,estate-output-language-c++?): New procs.
2313 (<rtl-c-eval-state>,vmake!): Handle #:output-language.
2314 (estate-make-for-normal-rtl-c++): New proc.
2315 (rtl-c++-parsed,rtl-c++): New proc.
2316 (s-c-call): Invoke cpu class method if c++.
2317 (join): Use s-c-raw-call.
2319 * rtl-c.scm (subword): Don't pass current_cpu to SUBWORD.
2322 * rtl-c.scm (delay): Mark the sequence as #:delay'd.
2323 * rtl.scm (<eval-state>): New member `modifiers'.
2324 (<eval-state>,vmake!): Handle #:modifiers.
2325 (estate-with-modifiers): New proc.
2327 * rtl.scm (rtx-side-effects?): New proc.
2328 (rtx-canonical-bool): Don't change expr if it has side effects.
2329 * semantics.scm (-simplify-expr-fn): Handle exprs with side-effects
2332 1999-09-23 Doug Evans <devans@casey.cygnus.com>
2334 * sim.scm (gen-scache-type): Fix typo in last patch.
2336 Tue Sep 21 17:12:55 1999 Dave Brolley <brolley@cygnus.com>
2338 * sim.scm (gen-scache-type): Add last_insn_p flag for parallel support.
2340 1999-09-05 Doug Evans <devans@casey.cygnus.com>
2342 * sid.scm (<hw-pc>,cxmake-skip): New method.
2343 (<pc>,cxmake-skip): New method.
2345 * decode.scm (decode-build-table): Delete args startbit,index-list.
2346 All callers updated.
2347 * utils-sim.scm (gen-decoder): Delete args startbit,index-list.
2348 All callers updated.
2349 * sim-decode.scm (-gen-decode-fn): Always pass 0 for startbit
2350 to decode-get-best-bits.
2351 * sid-decode.scm (-gen-decode-fn): Ditto.
2353 * hardware.scm (hw-bits): New proc.
2354 (-hw-parse): New arg layout. All callers updated.
2355 (define-full-hardware): New arg layout. All callers updated.
2356 (-hw-validate-layout): New proc.
2357 (-hw-create-[gs]etter-from-layout): New procs.
2358 (<hw-register>,parse!): Handle layout spec.
2359 * types.scm (type-bits): New proc.
2361 * sem-frags.scm (-frag-cost-compute!): Fix calculation of
2362 UNARY, BINARY, TRINARY rtxs.
2364 * attr.scm (<enum-attribute>,parse-value): Allow strings.
2365 * enum.scm (parse-enum-vals): Use reverse! instead of reverse.
2366 Support '- as "unused spot" indicator.
2368 1999-09-03 Doug Evans <devans@casey.cygnus.com>
2370 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Fix typo.
2372 1999-09-02 Doug Evans <devans@casey.cygnus.com>
2374 * rtx-funcs.scm (subword): Fix mode spec of `value'.
2376 * rtl.scm (-rtx-traverse-operands): Fix debugging message
2378 (tstate-make): New arg `depth'. All callers updated.
2379 (tstate-depth,tstate-set-depth!): New procs.
2380 (tstate-incr-depth!,tstate-decr-depth!): New procs.
2381 (-rtx-traverse-operands): Indent debugging output by traversal depth.
2382 (-rtx-traverse): Ditto. Keep track of traversal depth.
2384 1999-09-01 Doug Evans <devans@casey.cygnus.com>
2386 * sim-decode.scm (-gen-decoder+supporting cast): Move to utils-sim.scm.
2387 * sid-decode.scm (-gen-decoder+supporting cast): Ditto.
2388 * utils-sim.scm: Decoder generator support moved here.
2389 (-decode-equiv-entries?,-decode-sort-entries): New procs.
2390 (-gen-decoder-switch): Sort entries for more fall-throughs.
2392 * Makefile.am (gas-test,sim-test): Specify ISA when invoking cgen.
2393 * Makefile.in: Rebuild.
2394 * sim-test.scm (build-sim-testcase): Add logging message.
2395 * dev.scm (cload): Recognize SIM-TEST application.
2396 (load-stest): Set APPLICATION to SIM-TEST.
2398 * desc-cpu.scm (-gen-hash-defines): Add \n to output.
2400 * ifield.scm (-ifield-parse): Allow bit numbers up to 127.
2401 * mach.scm (-isa-parse): Allow insn bitsizes from 8 to 128.
2402 * mode.scm (mode-make-int,mode-make-uint): Allow values up to 64 bits.
2404 * insn.scm (syntax-break-out): Handle ${foo}.
2406 Sun Aug 29 11:11:15 1999 Doug Evans <devans@canuck.cygnus.com>
2408 * Makefile.am (noinst_PROGRAMS,noinst_LIBRARIES): Delete.
2409 (bin_PROGRAMS): Define.
2410 (CGEN_HOB_INPUT_FILES): Remove $(srcdir)/.
2411 (cgen-hob.c): Prepend $(srcdir)/ here.
2412 (APPDESCFILES,OPCODESFILES,SIMFILES,pkgdata_SCRIPTS): Define.
2413 (libcpu_a_SOURCES): Delete.
2414 (cgen_DEPENDENCIES,cgen_LDADD): Rewrite.
2415 (CGEN_HOB_OBJ,CGENOBJS): New variables.
2416 * configure.in (LIBS): Replace -Wl,-rpath with -R.
2417 Add AC_CHECK_LIB(guile,main).
2418 * Makefile.in: Rebuild.
2419 * doc/Makefile.in: Rebuild.
2420 * aclocal.m4: Rebuild.
2421 * config.in: Rebuild.
2422 * configure: Rebuild.
2424 1999-08-28 Doug Evans <devans@casey.cygnus.com>
2426 Rename rtx functions from name: to name, accept optional leading
2428 VM -> VOID, DM -> DFLT, use DFLT instead of VM for default mode.
2429 * attr.scm (-attr-eval): Update.
2430 * hardware.scm (hw-mode-ok?): Rename arg mode to new-mode-name.
2431 (<hw-register>,mode-ok?): Disallow VOID.
2432 (<hw-immediate>,mode-ok?): Disallow VOID.
2433 (<hw-address>,mode-ok?): Disallow VOID.
2434 * mode.scm (mode-name?): New proc.
2435 (VOID): Renamed from VM.
2436 (DFLT): Renamed from DM.
2437 (mode-builtin!): Update.
2438 * opcodes.scm (<ifield>,gen-insert): Update.
2439 (<ifield>,gen-extract): Update.
2440 (<multi-ifield>,gen-insert,gen-extract): Update.
2441 * operand.scm (op:mode): Update.
2442 (<pc>,make!): Update.
2443 (op:new-mode): Update.
2444 (-operand-read): Update.
2445 * rtl.scm (-rtx-valid-types): Add OPTIONS, EXPLNUMMODE,
2446 NONVOIDMODE, DFLTMODE. Rename VMMODE to VOIDMODE.
2447 (def-rtx-dual-mode,define-rtx-dual-mode): Delete.
2448 (-rtx-lazy-sem-mode): Renamed from -rtx-mode. All callers updated.
2449 (rtx-make): Call -rtx-munge-mode&options.
2450 (rtx accessors): Rewrite.
2451 (rtx-pretty-name): Update.
2452 (-rtx-traverse-*): Update.
2453 (-rtx-traverse-explnummode,-rtx-traverse-nonvoidmode): New procs.
2454 (-rtx-traverse-voidmode,-rtx-traverse-dfltmode): New procs.
2455 (-rtx-make-traverse-table): Update.
2456 (-rtx-traverse-operands): Update.
2457 (-rtx-option?,-rtx-option-list?): New procs.
2458 (-rtx-munge-mode&options): New proc.
2459 (-rtx-traverse-expr): Call -rtx-munge-mode&options.
2460 (-rtx-traverse): Update.
2461 (rtx-traverse,rtx-traverse-with-locals,rtx-compile): Update.
2462 (rtx-compile-time-constant?): Update.
2463 (rtx-true?,rtx-false?,rtx-true,rtx-false): Update.
2464 (rtx-value): Update.
2465 (hw,reg,mem): Renamed from foo:. Update. All callers updated.
2466 * rtx-funcs.scm (*): Update.
2467 * rtl-c.scm (rtl-c-get): Update.
2468 (rtl-c-set-quiet,rtl-c-set-trace): Update.
2469 (s-c-call,s-c-raw-call): Update.
2470 (s-boolifop,s-convop,s-if,s-cond): Update.
2471 (s-case-vm,-gen-non-vm-case-test,s-case): Update.
2472 (-par-replace-set-dests,-par-replace-set-srcs): Update.
2473 (s-parallel,s-sequence): Update.
2474 (rtl-c-build-table): Update.
2475 * sem-frags.scm (-frag-hash-compute!): Update.
2476 (-frag-cost-compute!): Improperly handle unary,binary,trinary ops
2477 for temporary bug compatibility with previous version.
2478 (-frag-expr-locals,-frag-expr-stmts): Update.
2479 (-frag-compute-desired-frags,-frag-pick-best): Update.
2480 * semantics.scm (-simplify-expr-fn): Update.
2481 (rtx-simplify): Update.
2482 (-rtx-ref-type): Update. Account for modifiers.
2483 (-build-operand!,-build-reg-operand!,-build-mem-operand!): Update.
2484 (-build-ifield-operand!): Update.
2485 (-build-known-values): Update.
2486 (semantic-compile): Update.
2487 (-gen-reg-access-defns): Update.
2488 (gen-semantic-code,-gen-sem-case): Update.
2489 (-gen-sfrag-code,-gen-sfrag-case): Update.
2490 * sim-cpu (gen-semantic-code): Update.
2491 * sim.scm (<hw-pc>,gen-write,cxmake-skip): Update.
2492 (<hw-register>,gen-write,gen-set-macro,cxmake-get-raw): Update.
2493 (-hw-cxmake-get): Update.
2494 (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
2495 (<hw-index>,cxmake-get): Update.
2496 (<operand>,gen-type,gen-read,cxmake-get): Update.
2497 (<operand>,gen-set-quiet,gen-set-trace): Update.
2498 (<pc>,cxmake-get): Update.
2499 (sim-finish!): Update.
2500 * utils-gen.scm (-gen-ifld-extract-base): Update.
2501 (-gen-ifld-extract-beyond): Update.
2502 (gen-multi-ifld-extract): Update.
2503 * sid-decode.scm (-decode-expr-ifield-values-used): Update.
2504 * sid.scm (<hw-pc>,gen-write): Update.
2505 (-gen-decode-insn-globals): Update.
2506 (-hw-cxmake-get): Update.
2507 (<hw-register>,cxmake-get-raw): Update.
2508 (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
2509 (<hw-index>,cxmake-get): Update.
2510 (<operand>,gen-type,gen-read,cxmake-get): Update.
2511 (<operand>,gen-set-quiet,gen-set-trace): Update.
2512 (<pc>,cxmake-get): Update.
2513 (-create-virtual-insns!): Update.
2514 (-decode-split-build-assertion): Update.
2516 * simplify.inc: Update.
2518 1999-08-20 Doug Evans <devans@casey.cygnus.com>
2520 * sim.scm (-op-gen-queued-write): Fix memory address calculation.
2521 Prefix queue function name with sim_ instead of @cpu@_.
2523 * sim.scm (-with-parallel-only?): New global.
2524 (option-init!): Initialize it.
2525 (option-set!): Set it.
2526 (with-parallel-only?): New proc.
2527 * sim-decode.scm (-gen-decode-insn-globals): Don't include parallel
2528 and writeback markers if with-parallel-only.
2529 (-gen-idesc-init-fn): Update.
2530 * sim-cpu.scm (cgen-cpu.h): Don't generate struct parexec if
2533 Wed Aug 18 15:04:30 1999 Doug Evans <devans@canuck.cygnus.com>
2535 * sim-cpu.scm (-gen-semantic-fn-table): Handle unsupported insns
2536 with the invalid insn handler.
2538 * utils.scm (list-maybe-ref): New proc.
2540 * mach.scm (-isa-parse): Signal error if isa wasn't specified in
2542 (-mach-parse): Signal error if mach wasn't specified in define-arch.
2544 * i960.cpu (test*-*): Delete `expr' arg.
2545 (test-op,branch-op): Update.
2547 1999-08-09 Doug Evans <devans@casey.cygnus.com>
2549 * sim.scm (gen-reg-getter-fn,gen-reg-setter-fn): New procs.
2550 (gen-reg-access-decl): Replace `name' arg with `hw'. All callers
2552 (gen-reg-access-defn): Ditto.
2553 (-gen-hw-addr): Rewrite.
2554 (-op-gen-queued-write): Rewrite.
2555 * sim-cpu.scm (-gen-cpu-reg-access-decls):
2556 (-gen-scache-semantic-fn): Handle with-generic-write.
2557 (-gen-no-scache-semantic-fn): Ditto.
2559 1999-08-08 Doug Evans <devans@casey.cygnus.com>
2561 * utils-gen.scm (gen-define-ifmt-ifields): Tweak output.
2563 * sim.scm (-with-generic-write?): New global.
2564 (option-init!): Initialize it.
2565 (option-set!): Set it.
2566 (with-generic-write?): New proc.
2567 (-gen-hw-addr): New proc.
2568 (-op-gen-queued-write): New proc.
2569 (-op-gen-set-{quiet,trace}-parallel): Use it if with-generic-write?.
2571 * sim-cpu.scm (-gen-hardware-types): Output code with parallel support
2573 (-gen-sem-switch): Preserve existing with-parallel? value.
2574 (-gen-sem-parallel-switch): Ditto.
2575 (-gen-write-case): Add /indent support.
2576 (cgen-write.c): Rewrite.
2578 * utils.scm (-current-print-state): New global.
2579 (make-print-state): New proc.
2580 (pstate-indent,pstate-set-indent!): New procs.
2581 (pstate-cmd?,pstate-cmd-do): New procs.
2582 (/indent): New global.
2583 (/indent-set,/indent-add): New procs.
2584 (string-write): Set -current-print-state.
2585 (-string-write): New arg pstate, all callers updated.
2586 Handle print-state commands.
2587 (-string-list-flatten): New proc.
2588 (string-list->string): Use it.
2590 * sim-cpu.scm (-gen-sem-fn-name): Move here from sim-decode.scm.
2591 (-gen-sem-fn-table-entry): New proc.
2592 (-gen-semantic-fn-table): New proc.
2593 (-gen-scache-semantic-fn): Make fn static.
2594 (-gen-no-scache-semantic-fn): Ditto.
2595 (cgen-semantics.c): Define macro SEM_FN_NAME.
2596 * sim-decode.scm (-gen-decode-insn-globals): Delete FMT,TYPE,IDX,
2597 FAST,FULL. Update @cpu@_insn_sem contents.
2598 (-gen-semf-fn-name): Delete.
2599 (-gen-sem-fn-decls): Delete.
2600 (-gen-idesc-decls): Output prototypes of @cpu@_sem_init_idesc_table,
2601 @cpu@_semf_init_idesc_table.
2602 (-gen-idesc-init-fn): Update. Don't initialize pointers to semantic
2604 (cgen-decode.h): Print sfmt enum.
2605 * sid-decode.scm (-gen-semf-fn-name): Delete.
2606 * utils-gen.scm (gen-sfmt-enum-decl): New proc.
2608 * iformat.scm (sfmt-build): Rename sformats from fmt-foo to sfmt-foo.
2609 (ifmt-compute!): Ditto.
2610 * sim-decode.scm (-gen-decoder-switch): Ditto.
2611 * sid-decode.scm (-gen-decode-expr-entry): Ditto.
2612 (-gen-decoder-switch): Ditto.
2614 * insn.scm (insn-virtual?): New proc.
2616 * enum.scm (gen-enum-decl): Speed up, build string as list and then
2618 * mach.scm (<arch>): attr-list is now a pair of lists.
2619 (current-attr-list): Rewrite.
2620 (current-attr-add!,current-attr-lookup): Rewrite.
2621 * sim.scm (gen-cpu-insn-enum-decl): Replace append with append!.
2623 1999-08-06 Richard Henderson <rth@cygnus.com>
2625 * ia64.cpu: Initial checkpoint.
2627 1999-08-06 Doug Evans <devans@casey.cygnus.com>
2629 * pmacros.scm (-pmacro-apply): Fix definition, takes only 1 arg.
2630 (pmacros-init!): Update .apply help string.
2632 1999-08-03 Doug Evans <devans@casey.cygnus.com>
2634 * sim.scm (-hw-gen-set-quiet-pc): Update call to SEM_BRANCH_VIA_CACHE.
2635 (<hw-pc>,cxmake-skip): New method.
2636 (<pc>,cxmake-skip): New method.
2637 (-gen-argbuf-fields-union): Add branch_target to `chain' member.
2638 (gen-argbuf-type): New member `skip_count'.
2639 (sim-finish!): Update calls to @cpu@_pbb_cti_chain.
2640 * utils-cgen.scm (atlist-cti?): Don't include SKIP-CTI insns.
2642 * utils-sim.scm: New file.
2643 * dev.scm (load-sim): Load it.
2644 (load-sid): Load it.
2645 * cgen-sid.scm: Load it.
2646 * cgen-sim.scm: Load it.
2647 * iformat.scm (<sformat>): New member sbuf, not initialized by
2649 * rtx-funcs.scm (skip): Rewrite.
2650 * rtl-c.scm (skip): Rewrite.
2651 * m32r.cpu (sc,snc): Update `skip' usage.
2652 * mode.scm (mode-real-mode): New proc.
2653 * sem-frags.scm (-frag-split-by-sbuf): Rename from -frag-split-by-sfmt.
2654 Distinguish fragments by the <sformat-abuf> they use.
2655 * sim.scm (gen-profile-index-type): Delete.
2656 (ifield argbuf support): Move to utils-sim.scm and sim-decode.scm.
2657 (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
2658 (hardware argbuf support): Move to utils-sim.scm and sim-decode.scm.
2659 (operand argbuf support): Move to utils-sim.scm and sim-decode.scm.
2660 (-gen-argbuf-elm): Rewrite.
2661 (-gen-argbuf-hw-elm): Delete.
2662 (-gen-argbuf-fields-union): Generate structs for each sbuf instead
2664 (-sim-sformat-argbuf-list,-sim-insns-analyzed?): New globals.
2665 (sim-init!): Initialize them.
2666 (sim-analyze-insns!): Set them.
2667 (current-sbuf-list): New proc.
2668 * sim-cpu.scm (-gen-no-scache-semantic-fn): Update calls to
2669 gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns.
2670 * sim-model.scm (-gen-model-insn-fn): Ditto.
2671 * sim-decode.scm (-gen-extract-decls): Delete.
2672 (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
2673 (<hardware-base>,gen-extract,gen-trace-extract): Move here from
2675 (<hw-register,gen-extract,gen-trace-extract): Ditto.
2676 (<hw-address,gen-extract,gen-trace-extract): Ditto.
2677 (-gen-op-extract,-gen-op-trace-extract): New procs.
2678 (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
2679 gen-sfmt-argvars-foo and rewrite.
2680 (-gen-record-args): Rewrite.
2681 (-gen-extract-case): Tweak.
2682 * sid.scm (gen-profile-index-type): Delete.
2683 (ifield argbuf support): Move to utils-sim.scm.
2684 (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
2685 (hardware argbuf support): Move to utils-sim.scm and sid-decode.scm.
2686 (operand argbuf support): Move to utils-sim.scm and sid-decode.scm.
2687 (-sim-sformat-argbuf-list): New global.
2688 (sim-init!): Initialize it.
2689 (sim-analyze-insns!): Set it.
2690 (current-sbuf-list): New proc.
2691 * sid-decode.scm (-gen-argbuf-elm): Rewrite.
2692 (-gen-argbuf-hw-elm): Delete.
2693 (-gen-argbuf-fields-union): Generate structs for each sbuf instead
2695 (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
2696 (-gen-extract-decls): Delete.
2697 (<hardware-base>,gen-extract,gen-trace-extract): Move here from
2699 (<hw-register,gen-extract,gen-trace-extract): Ditto.
2700 (<hw-address,gen-extract,gen-trace-extract): Ditto.
2701 (-gen-op-extract,-gen-op-trace-extract): New procs.
2702 (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
2703 gen-sfmt-argvars-foo and rewrite.
2704 (-gen-record-args): Rewrite.
2705 (-gen-extract-case): Tweak.
2707 * cgen-gh.c (gh_putc,gh_puts): New functions.
2708 * cgen-gh.h (gh_putc,gh_puts): Declare them.
2709 * cos.c (_object_print_elms,_object_print): Use them.
2710 * hob-sup.c (fastcall_print): Use them.
2711 * configure.in: Check for scm_gen_puts, scm_puts.
2712 * config.in: Rebuild.
2713 * configure: Rebuild.
2714 * aclocal.m4: Rebuild.
2715 * Makefile.in: Rebuild.
2717 * dev.scm (load-opc): Use load instead of maybe-load.
2718 (load-gtest,load-sim,load-stest): Ditto.
2721 1999-07-23 Doug Evans <devans@casey.cygnus.com>
2723 * sid-cpu.scm (-gen-sem-switch-engine): Move definition of `count'
2724 up to avoid g++ 'goto crosses initialization' warning.
2725 (-gen-sfrag-engine-fn): Delete vpc arg to NEXT_FRAG.
2726 (-gen-sfrag-case): Update use of NEXT_FRAG.
2728 1999-07-22 Doug Evans <devans@casey.cygnus.com>
2730 * cos.c (cos_init): Protect _make_x_symbol from garbage collection.
2732 * read.scm: Load sem-frags.scm.
2733 * sem-frags.scm (*): Lots rewritten.
2734 * sid.scm (-with-sem-frags?): New global
2735 (with-sem-frags?): New proc.
2736 (option-init!): Initialize -with-sem-frags?.
2737 (option-set!): Recognize with-sem-frags.
2738 (sim-init!): Call sim-sfrag-init! if with-sem-frags.
2739 * sid-cpu.scm (cgen-sem-switch.cxx): Generate semantic frag version
2741 (-gen-sfrag-engine-decls): New proc.
2742 (-gen-sfrag-code,-gen-sfrag-case,-gen-sfrag-enum-decl): New procs.
2743 (-gen-sfrag-engine-frag-table,-gen-sfrag-engine-fn): New procs.
2744 (-gen-sfrag-engine): New proc.
2745 (-gen-sem-case): Emit setup-semantics if specified.
2746 (-gen-sem-switch-engine): Update init/use of computed goto label.
2747 * sid-decode.scm (-gen-decode-expr-entry): Fetch ifield values
2749 (-gen-idesc-decls): Replace sem_address with cgoto.
2750 (-gen-scache-decls): Rewrite definition of `execute' member.
2751 * arm.cpu (arm isa): Enable decode-splits.
2752 * arm7.cpu (multiply insns): Rename result to mul-result.
2754 Rename decode-specialize to decode-split.
2755 * decode.scm (*): Update.
2756 * insn.scm (*): Update.
2757 * mach.scm (*): Update.
2758 * sid.scm (*): Update.
2760 1999-07-19 Doug Evans <devans@casey.cygnus.com>
2762 Record objects as a smob.
2763 * cos.c (scm_tc16_object): New static global.
2764 (cos_init): Initialize it.
2765 (OBJECT_P,OBJECT_ELEMENTS,OBJECT_CLASS_DESC): Update macros.
2766 (OBJECT_CLASS,OBJECT_ELEMENT_OFFSET): Update.
2767 (_object_tag): Delete.
2768 (_object_make_smob): New function.
2769 (_object_make_x,_object_make_with_values_x): Rewrite.
2770 (_object_elements,_object_class_desc): Rewrite.
2771 (_object_copy,object_p): Rewrite.
2772 (_object_specialize): Rewrite.
2773 (_object_print_elms,_object_print): New functions.
2774 (object_smob): New static global.
2775 (default_make_x): Use OBJECT_ELEMENT_OFFSET instead of magic number.
2777 * cos.c (_make_x_symbol): New static global.
2778 (object_make): Use it.
2779 (cos_init): Initialize it.
2781 1999-07-15 Doug Evans <devans@casey.cygnus.com>
2783 * rtl-c.scm (ifield): Back out last patch, use estate-ifield-var?
2784 instead to determine whether to use FLD macro.
2785 (<rtl-c-eval-state>): New member ifield-var?.
2786 (<rtl-c-eval-state>,vmake!): Recognize #:ifield-var?.
2787 * utils-gen.scm (-gen-ifld-extract-base): Specify #:ifield-var? #f.
2788 (-gen-ifld-extract-beyond,gen-multi-ifld-extract): Ditto.
2790 * rtl.scm (rtx-sequence-assq-locals): New proc.
2792 * cos.scm (-object-error): Don't crash on non-objects.
2794 * Makefile.am (CLEANFILES): Add hobbit.
2795 * Makefile.in: Rebuild.
2797 * rtl-c.scm (s-c-call): Delete unnecessary code.
2799 1999-07-14 Doug Evans <devans@casey.cygnus.com>
2801 * rtl-c.scm (ifield): Always reference value via `FLD'.
2803 * cos.c (elm_bound_p): Return problem SCM boolean values.
2805 * utils-cgen.scm (display-argv): New proc.
2806 * cgen-opc.scm (cgen): Call it.
2807 * cgen-sim.scm (cgen): Ditto.
2808 * cgen-gas.scm (cgen): Ditto.
2809 * cgen-stest.scm (cgen): Ditto.
2810 * cgen-sid.scm (cgen): Ditto.
2812 1999-07-05 Doug Evans <devans@casey.cygnus.com>
2814 * opc-asmdis.scm (-gen-parse-switch): New local var `junk'.
2815 * opc-ibld.scm (-gen-insert-switch): Initialize result to NULL.
2816 (-gen-extract-switch): Initialize result to 1.
2817 * opcodes.scm (gen-ifield-default-type): New proc.
2818 (gen-ifield-value-decl): Renamed from gen-ifield-type. All callers
2820 (<hw-index>,gen-insert): Handle non-ifield indices.
2821 (<hw-index>,gen-extract): Ditto.
2822 (<hw-asm>,gen-parse): Ditto.
2823 (<hw-asm>,gen-print): Ditto.
2824 (<keyword>,gen-parse): Ditto.
2825 (<keyword>,gen-print): Ditto.
2826 (<operand>,gen-fget): Ditto.
2827 (<operand>,gen-fset): Ditto.
2829 * sim.scm (-gen-hw-index-raw): Handle scalar indices.
2830 (-gen-hw-index): Ditto.
2831 * sid.scm (-gen-hw-index-raw): Handle scalar indices.
2832 (-gen-hw-index): Ditto.
2834 * sem-frags.scm: New file.
2836 * attr.scm (attr-parse): Add better checking of input.
2838 * hardware.scm (-hw-parse-getter): Renamed from -hw-parse-get.
2840 (-hw-parse-setter): Renamed from -hw-parse-set. All uses updated.
2842 * ifield.scm (ifld-nil?): New proc.
2844 * operand.scm (<operand>): New members getter,setter.
2845 (<operand>,make!): New args getter,setter. All uses updated.
2846 (op:getter,op:setter): New procs.
2847 (<hw-index>,field-start): Return 0 for non-ifield indices.
2848 (<hw-index>,field-length): Return 0 for non-ifield indices.
2849 (-operand-parse-getter,-operand-parse-setter): New procs.
2850 (-operand-parse): New args getter,setter. All callers updated.
2851 Always use hw-index-scalar for scalar operands.
2852 (-operand-read): Handle getter,setter.
2853 (define-full-operand): New args getter,setter. All uses updated.
2854 * semantics.scm (-build-ifield-operand!): Update.
2855 (-build-index-of-operand!): Update.
2856 * sim.scm (<operand>,cxmake-get): If operand has getter, use it.
2857 * simplify.inc (define-normal-operand): Update.
2859 * rtl.scm (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
2860 * rtl-c.scm (s-unop): Indirect fp ops through fpu op vector.
2861 (s-binop,s-cmpop,s-convop): Ditto.
2862 (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
2863 * sparc.cpu (insn-fmt2): Add FPOPS1,FPOPS2.
2864 (fcc-tests): New insn-enum.
2865 (fcc-value): Rename from fcc-type.
2866 * sparcfpu.cpu: New file. All fp support moved here.
2868 * rtl.scm (<rtx-func>): New member class.
2869 (rtx-class-*?): New procs.
2870 (def-rtx-node): New arg class. All callers updated.
2871 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-dual-node): Ditto.
2872 * rtx-funcs.scm (*): Specify class.
2874 * utils-cgen.scm (context-make-reader): New proc.
2876 * utils.scm (assert-fail-msg): New variable.
2878 (list-drop,list-tail-drop): New procs.
2880 1999-06-22 Doug Evans <devans@casey.cygnus.com>
2882 * desc-cpu.scm (-gen-hash-defines): Restore generation of
2883 CGEN_MIN_INSN_SIZE deleted on March 22.
2885 * ifield.scm (<ifield>,needed-iflds): New method.
2886 (<multi-ifield>,needed-iflds): New method.
2887 (ifld-needed-iflds): New proc.
2888 (multi-ifield?): New proc.
2889 * iformat.scm (<sfmt>): Delete member ifmt. New members length,iflds.
2890 (-sfmt-search-key): Include insn length in key.
2891 (-sfmt-order-iflds,-sfmt-used-iflds): New procs.
2892 (<fmt-desc>): Delete members ifmt-key,sfmt-key. New member used-iflds.
2893 (-ifmt-lookup-ifmt!): Compute key here.
2894 (-ifmt-lookup-sfmt!): Compute key here. Delete arg ifmt.
2895 All callers updated.
2896 (ifmt-build): Delete arg desc. New args search-key,iflds.
2897 All callers updated.
2898 (sfmt-build): Delete args desc,ifmt. New args search-key,cti?,
2899 in-ops,out-ops,sorted-used-iflds. All callers updated.
2900 * minsn.scm (minsn-make-alias): Use insn-set-ifmt!. Update call
2902 * operand.scm (op-iflds-used): New proc.
2903 * utils-gen.scm (gen-ifld-type): Move here from sim.scm
2905 And from sid.scm,sid-cpu.scm as well.
2906 (gen-ifld-extract-decl,-gen-ifld-extract-base): Ditto.
2907 (-gen-extract-word,-gen-ifld-extract-beyond): Ditto.
2908 (gen-ifld-extract,gen-multi-ifld-extract): Ditto.
2909 (gen-extracted-ifld-value): Ditto.
2910 (-extract-chunk-specs): Ditto.
2911 (gen-define-ifields,gen-define-ifmt-ifields): Ditto.
2912 (-extract-chunk,-gen-extract-beyond-var-list): Ditto.
2913 (gen-extract-ifields,gen-extract-ifmt-ifields): Ditto.
2914 (-extract-insert-subfields): New function.
2915 * sim.scm (gen-record-argbuf-ifld): Renamed from gen-ifld-extract.
2916 (gen-record-argvar-ifld): Renamed from gen-ifld-extract-argvar.
2917 * sim-cpu.scm (-gen-extract-ifmt-macro): Replace calls to
2918 gen-define-ifields with gen-define-ifmt-ifields. Ditto for
2920 (-gen-no-scache-semantic-fn): Ditto.
2921 (-gen-sem-case): Ditto.
2922 (-gen-read-case): Update calls to gen-define-ifields,
2923 gen-extract-ifields.
2924 * sim-decode.scm (-gen-record-args): Update.
2925 (-gen-sfmt-argvars-assigns): Update.
2926 (-gen-extract-case): Update.
2927 * sim-model.scm (-gen-model-insn-fn): Replace calls to
2928 gen-define-ifields with gen-define-ifmt-ifields. Ditto for
2930 * sid.scm (gen-ifld-argbuf-defn): Use gen-ifld-type.
2931 (gen-record-argbuf-ifld): Rename from gen-ifld-extract.
2932 (gen-record-argvar-ifld): Rename from gen-ifld-extract-argvar.
2933 * sid-decode.scm (-gen-decode-expr-entry): Update calls to
2934 gen-define-ifields, gen-extract-ifields.
2935 (-gen-record-args): Update.
2936 (gen-sfmt-argvars-assigns): Update.
2937 (-gen-extract-case): Replace calls to gen-define-ifmt-ifields
2938 with gen-define-ifields. Ditto for gen-extract-foo.
2939 (-gen-decode-fn): Use gen-ifld-extract-decl/gen-ifld-extract
2940 procs rather than method calls.
2942 1999-06-18 Doug Evans <devans@casey.cygnus.com>
2944 * sid.scm (-create-virtual-insns!): New local `context', pass it
2947 * rtl.scm (-rtx-traverse): Output symbol shortcuts in source form,
2948 (operand name) not (operand object), (local name) not (local object).
2949 (rtx-traverse-with-locals): New proc.
2950 (-compile-expr-fn): New proc.
2951 (rtx-compile): Rewrite.
2952 * rtl-c.scm (rtl-c-get): Handle operand/local names for src arg.
2953 (rtl-c-set-quiet): Don't accept operand/local names for dest arg.
2954 (rtl-c-set-trace): Ditto.
2955 (operand define-fn): Recognize operand name argument.
2956 (local define-fn): Recognize sequence temp name argument.
2957 * rtx-funcs.scm (operand): Argument is operand name, not object,
2958 so call current-op-lookup.
2959 (local): Similarily, so call rtx-temp-lookup.
2961 * rtl.scm (rtx-field?): Use rtx-name instead of car.
2962 (rtx-operand?): Ditto.
2963 (rtx-pretty-name): Ditto.
2964 (rtx-local-obj): Flag symbol argument as an error.
2965 (rtx-local-name): New proc.
2966 (rtx-sequence-locals,rtx-sequence-exprs): New procs.
2968 * rtl.scm (-rtx-traverse-operands): Fix debugging output of arg-types.
2970 * read.scm (debug-repl): Renamed from -debug-repl. All callers
2973 * arm7.cpu (do-word/byte-store): Use (trunc: QI rd) rather than
2976 * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall4, fastcall6.
2977 (*floats-s->c-fun-table*): Ditto.
2978 * hobbit.c,hobbit.h: Rebuild.
2979 * rtl.scm (-rtx-traverse-expr): Use fastcall6.
2980 * semantics.scm (rtx-simplify): Use /fastcall-make.
2982 * iformat.scm (-sfmt-search-key): Don't include memory modes.
2984 * insn.scm (<insn>): Delete members condition, compiled-condition.
2985 (<insn>,make!): Update
2986 (<insn> getters,setters): Update.
2987 (-insn-parse,insn-read,define-full-insn): Update.
2988 * minsn.scm (minsn-make-alias): Update.
2989 * iformat.scm (ifmt-analyze): Delete insn-condition reference.
2990 (ifmt-compute!): Ditto.
2991 * sim.scm (sim-finish!): Update.
2992 * simplify.inc: (define-normal-insn): Update.
2993 * sid-cpu.scm (gen-semantic-code): Update.
2995 * iformat.scm (-ifmt-lookup-ifmt!): Use insn-set-ifmt!.
2996 (-ifmt-lookup-sfmt!): Use insn-set-sfmt!.
2997 (ifmt-compute!): Ditto.
2999 1999-06-16 Doug Evans <devans@casey.cygnus.com>
3001 * minsn.scm (minsn-compute-iflds): Print better error message for
3004 1999-06-12 Doug Evans <devans@casey.cygnus.com>
3006 * rtl.scm (tstate->estate): Don't copy over expr-fn.
3008 * Makefile.am (HOBFLAGS): New variable.
3009 (cgen-hob.c): Use it.
3011 (libcpu_a_SOURCES): Add hob-sup.c.
3012 (hob-sup.o): New rule.
3013 * Makefile.in: Rebuild.
3014 * cgen.c: #include hob-sup.h.
3015 (cgen_init_c): Call hobbit_init_support.
3016 * hobbit.scm (*fastcall-make*,*c-symbol*): New variables.
3017 (*special-scm->c-functions*): Add them.
3018 (display-c-expression): Handle *c-symbol*.
3019 (*reckless-s->c-fun-table*): Add *fastcall-make*, fastcall5.
3020 (*floats-s->c-fun-table*): Ditto.
3021 (normalize): Recognize /fastcall-make.
3022 (normalize-fastcall-make): New proc.
3023 * hobbit.c,hobbit.h: Rebuild.
3024 * hob-sup.scm: New file.
3025 * hob-sup.c: New file.
3026 * hob-sup.h: New file.
3027 * read.scm: Load hob-sup.scm.
3028 * rtl.scm (-rtx-name-list): New variable.
3029 (rtx-name-list): New proc.
3030 (rtx-lookup): Try symbol first.
3031 (def-rtx-node): Add name to -rtx-name-list.
3032 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
3033 (-rtx-traverse-anymode): New proc.
3034 (-rtx-traverse-{emode,intmode,floatmode,nummode,vmmode}): New procs.
3035 (-rtx-traverse-{rtx,setrtx,testrtx,condrtx,casertx}): New procs.
3036 (-rtx-traverse-{locals,env,attrs,symbol,string,number}): New procs.
3037 (-rtx-traverse-{symornum,object}): New procs.
3038 (-rtx-make-traverse-table): Rewrite.
3039 (-rtx-traverse-operands): Rewrite arg-types handling.
3040 Handle #f result of traverser.
3041 (-rtx-traverse): Renamed from -rtx-traverse-normal.
3042 Move debug handling here.
3043 (-rtx-traverse-debug): Delete.
3044 (rtl-finish!): Change -rtx-traverse-table into list of handlers
3046 * semantics.scm (semantic-compile:process-expr!): Fix call to
3048 * utils.scm (map1-improper): New proc.
3050 1999-06-08 Doug Evans <devans@casey.cygnus.com>
3052 * arm.sim (h-tbit): Replace FUN-ACCESS with FUN-SET.
3054 * sid.scm (-hw-cxmake-get): s/FUN-ACCESS/FUN-GET/.
3055 (-hw-gen-set-quiet): s/FUN-ACCESS/FUN-SET/.
3056 (<operand>,cxmake-get): Tweak.
3057 (sim-finish!): Delete FUN-ACCESS attribute. Create FUN-GET,FUN_SET.
3059 1999-06-07 Doug Evans <devans@casey.cygnus.com>
3061 * thumb.cpu (dnti): Delete timing spec.
3064 * arm.cpu (arm isa): New fields condition, setup-semantics.
3065 (thumb isa): New field setup-semantics.
3066 (h-gr): Add attribute CACHE-ADDR.
3067 * arm7.cpu (dnai): Delete condition.
3068 (eval-cond): Delete.
3070 * mach.scm (<isa>): New member setup-semantics.
3071 (-isa-parse-setup-semantics): New proc.
3072 (-isa-parse): New arg setup-semantics.
3073 (-isa-read): Recognize setup-semantics.
3075 * sid-cpu.scm (gen-extract-fields): Split into two:
3076 gen-extract-ifields, gen-extract-ifmt-ifields.
3077 (-gen-scache-semantic-fn): Delete `taken_p'. Delete
3078 tracing begin/end messages (done by caller now).
3079 (-gen-sem-case): Delete `taken_p'. Add npc,br_status. Delete
3080 tracing begin/end messages (done by x-before,x-after virtual insns).
3081 (-gen-sem-switch-engine): Redo vpc initialization. Save vpc at
3082 end so don't have to look it up again next time.
3083 * sid-decode.scm (-decode-expr-ifield-values): New proc.
3084 (-decode-expr-ifield-tracking-key): New proc.
3085 (-decode-expr-ifield-tracking): New proc.
3086 (-decode-expr-ifield-values-used): New proc.
3087 (-decode-expr-ifield-mark-used!): New proc.
3088 (-gen-decode-expr-set-itype): New proc.
3089 (-gen-decode-expr-entry): Rewrite.
3090 (-gen-decode-table-entry): New proc.
3091 (-gen-decoder-switch): Use it.
3092 (-gen-virtual-insn-finder): New proc.
3093 (-gen-argbuf-elm): Move here from sid.scm.
3094 (-gen-argbuf-hw-elm): Ditto.
3095 (-gen-argbuf-fields-union): Add entries for chain,before insns.
3096 (-gen-scache-decls): Add `cond' member to @prefix@_scache for
3097 conditional-execution isas.
3098 (-gen-decode-fn): Record conditional-exec ifield.
3099 * sid.scm (-current-pbb-engine?): New global.
3100 (current-pbb-engine?,set-current-pbb-engine?!): New procs.
3101 (<ifield>,gen-ifld-extract): New arg `indent'.
3102 (<multi-ifield>,gen-ifld-extract): Ditto.
3103 (-hw-gen-set-quiet-pc): Add pbb support. Delete `taken_p'.
3104 (-op-gen-set-trace): Don't print tracing messages for pbb engine.
3105 (-gen-arch-model-decls): Only scan real insns.
3106 (scache-engine-insns,pbb-engine-insns): New procs.
3107 (-create-virtual-insns!): New proc.
3108 (sim-finish!): Call it.
3109 (-decode-specialize-insn?): New proc.
3110 (-decode-specialize-build-assertion): New proc.
3111 (-decode-specialize-insn-1): New proc.
3112 (-decode-specialize-insn): New proc.
3113 (-fill-sim-insn-list!): New proc.
3114 (sim-analyze!): Create copies of insns to be specialized.
3115 * utils-cgen.scm (obj-set-name!): New proc.
3117 * attr.scm (-attr-eval): Rewrite calls to rtx-simplify/rtx-compile.
3118 * iformat.scm (ifmt-analyze): Pass `insn' to semantic-compile,
3120 (ifmt-compute!): Delete arg `arch'. Result is list of iformats,
3122 * mach.scm (arch-analyze-insns!): Update call to ifmt-compute!.
3123 * rtl-c.scm (rtl-c-get): Use DM for default mode instead of VM.
3124 Avoid infinite loop when rtx-eval-with-estate leaves expr alone.
3125 (attr): Rewrite test for insn owner.
3126 (member): New rtx function.
3127 * rtl.scm (rtx-* accessors): Define as cxr directly rather than
3128 as separate function.
3129 (rtx-ifield?,rtx-ifield-name): New procs.
3130 (rtx-operand-obj): Rewrite.
3131 (rtx-operand-name): New proc.
3132 (rtx-cmp-op-mode,rtx-cmp-op-arg): New procs.
3133 (rtx-number-list-values,rtx-member-value,rtx-member-set): New procs.
3134 (tstate-make): New args owner, known. All callers updated.
3135 (tstate-known-lookup): New proc.
3136 (rtx-traverse): New arg owner. All callers updated.
3137 (rtx-make-bool): New proc.
3138 (rtl-find-ifields): Rewrite.
3139 (rtx-simplify,rtx-simplify-eq-attr-{insn,mach}): Moved to ...
3140 * semantics.scm: ... here.
3141 (rtx-const-equal,rtx-const-list-equal): New procs.
3142 (-build-known-values): New proc.
3143 (semantic-compile): New arg `insn'. Call rtx-simplify.
3144 (semantic-attrs): Ditto.
3145 * rtx-funcs.scm (member,number-list): New rtx functions.
3147 * attr.scm (attr-remove-meta-attrs-alist): Delete leading '-' in name.
3148 Rewrite. Delete arg `all-attrs'. All callers updated.
3149 (attr-remove-meta-attrs): Delete leading '-' in name. All callers
3151 * utils-cgen.scm (gen-bool-attrs): Remove meta attrs.
3153 * decode.scm (subdtable-add): Handle `expr' entries.
3154 (exprtable-entry-make): Use vector. Record ifields refered to by expr.
3155 (exprtable-entry-*): Update.
3156 (exprtable-entry-iflds): New proc.
3157 (exprentry-cost): New proc.
3158 (exprtable-sort,-gen-exprtable-name): New procs.
3159 (exprtable-make): New arg `name'. All callers updated. use vector.
3160 (exprtable-*): Update.
3161 (-build-decode-table-entry): Don't issue collision warning if all are
3162 specialized insns. Sort exprtable entries before building table.
3164 * read.scm (-reader-process-expanded-1): Move pretty printing of
3165 input to logging level 4.
3167 * utils.scm (string-list->string): New proc.
3169 * insn.scm (<insn>): Define setters for ifield-assertion, condition,
3171 (insn-read): Delete leading '-' in name. All callers updated.
3172 (real-insn?): New proc.
3173 (real-insns): Rewrite.
3174 (insn-has-ifield?): New proc.
3175 (insn-builtin!): Create insn attribute SPECIALIZED.
3177 * mach.scm (<arch>): Delete member app-data.
3178 (current-raw-insn-list): New proc.
3179 (insn-list-car,insn-list-splice!): New procs.
3180 (<decode-specialize>): New class.
3181 (-isa-parse-decode-specialize): New proc.
3182 (-isa-parse-decode-specializes): New proc.
3183 (<isa>): New members `condition', `decode-specializes'.
3184 (-isa-parse-condition): New proc.
3185 (-isa-parse): New args condition, decode-specializes.
3186 (-isa-read): Recognize condition, decode-specializes.
3187 (-isa-add-decode-specialize!): New proc.
3188 (modify-isa): New proc.
3189 (isa-conditional-exec?,state-conditional-exec?): New procs.
3190 (arch-init!): New reader command `modify-isa'.
3192 * mode.scm (mode-class-signed?,mode-class-unsigned?): New procs.
3193 (mode-signed,mode-unsigned?): New procs.
3195 Thu Jun 3 16:00:40 1999 Doug Evans <devans@canuck.cygnus.com>
3197 * types.scm (<array>): New method get-shape.
3198 * hardware.scm (<hardware-base>): Forward get-shape,get-num-elms
3200 (hw-shape,hw-num-elms): New procs.
3201 * sim.scm (<hw-register>,gen-profile-index-type): Use "unsigned short"
3202 if there's more than 255 registers.
3203 * sid.scm (<hw-register>,gen-profile-index-type): Ditto.
3205 * hardware.scm (-hw-parse): Flag as error CACHE-ADDR specified
3208 1999-05-21 Doug Evans <devans@casey.cygnus.com>
3210 * cgen-sid.scm (sim-arguments): Add -X.
3211 * sid-cpu.scm (-gen-hardware-types): Comment out scache vars.
3212 (-gen-all-semantic-fns): Don't include PBB support virtual insns.
3213 (-gen-sem-case): Use CASE/NEXT macros again. Tweak indenting.
3214 Simplify by supporting pbb engine only.
3215 (-gen-sem-switch-init): New proc.
3216 (-gen-sem-switch-engine): Rename from -gen-sem-switch-fn.
3217 (cgen-sem-switch.cxx): New proc.
3218 * sid-decode.scm (-gen-decode-insn-globals): Replace with-sem-switch?
3219 with with-pbb?. Support dual scache/pbb engines.
3220 (-gen-idesc-decls): Replace with-sem-switch? with with-pbb?.
3221 Support dual scache/pbb engines.
3222 (cgen-decode.h): Generate semantic fn decls if with-scache?.
3223 * sid.scm (*) with-pbb? replaces with-sem-switch?.
3224 (sim-finish!): Create pbb support virtual insns if with-pbb?.
3226 1999-05-10 Ben Elliston <bje@cygnus.com>
3228 * arm7.cpu: Remove coprocessor related fields, operands and insn
3229 definitions for now. Take the undefined instruction trap instead.
3230 (ldmda-wb): New instruction.
3231 (ldmib-wb): Likewise.
3232 (ldmdb-wb): Likewise.
3233 (stmdb-wb): Likewise.
3234 (stmib-wb): Likewise.
3235 (stmda-wb): Likewise.
3237 1999-05-08 Doug Evans <devans@casey.cygnus.com>
3239 * sid.scm (<hw-memory>,cxmake-get): Call GETMEM method, not function.
3240 (<hw-memory>,gen-set-quiet): Call SETMEM method, not function.
3242 * utils-cgen.scm (keyword-list->arg-list): Fix call to substring,
3243 hobbit can't handle optional third arg.
3245 1999-05-07 Doug Evans <devans@casey.cygnus.com>
3247 * arm.cpu (h-tbit): Delete set spec.
3248 (h-mbits): Don't call arm_mbits_set in set spec.
3249 * arm.sim: New file.
3250 * hardware.scm (modify-hardware): New proc.
3251 (hardware-init!): Add modify-hardware command.
3252 * sid.scm (-hw-cxmake-get): Use method call if FUN-ACCESS specified.
3253 (-hw-gen-set-quiet): Ditto.
3254 (sim-finish!): Call invalid_insn method. Define FUN-ACCESS builtin
3255 hardware attribute. Load $arch.sim file if present.
3256 * utils-cgen.scm (keyword-list?): New proc.
3257 (keyword-list->arg-list,arg-list-validate-name): New procs.
3258 (arg-list-check-no-args,arg-list-symbol-arg): New procs.
3260 * arm7.cpu (eval-cond): Pass pc to @cpu@_eval_cond handler.
3262 * sid-cpu.scm (-gen-hardware-types): Rename @cpu@_cpu to
3265 * attr.scm (obj-prepend-atlist!): New proc.
3267 * opc-opinst.scm (cgen-opinst.c): Analyze instructions if necessary.
3269 * sid.scm (<operand>,profilable?): Use op:type.
3270 * sim.scm (<operand>,profilable?): Use op:type.
3272 1999-05-04 Doug Evans <devans@casey.cygnus.com>
3274 * utils.scm (find-index,find): Be more stack friendly.
3276 * arm7.cpu (arith-imm-op): Compute pc before setting cpsr.
3279 1999-05-01 Doug Evans <devans@casey.cygnus.com>
3281 * arm.cpu (h-gr-usr): New hardware element.
3282 (h-gr-fiq,h-gr-svc,h-gr-abt,h-gr-irq,h-gr-und): New hardware elements.
3283 (arm-mode): New keyword.
3284 (h-mbits): Add set spec.
3285 (h-spsr): Implement get/set specs.
3287 * read.scm: Load slib/pp.scm, slib/genwrite.scm.
3288 (-reader-process-expanded-1): Pretty print logging output.
3290 * sid-cpu.scm (-gen-reg-access-defns): Make getters `const'.
3291 (cgen-cpu.h): Print enums before hardware elements.
3292 (cgen-semantics.cxx): @arch@-cgen.h renamed to @arch@-main.h.
3293 * sid-decode.scm (cgen-decode.cxx): Ditto.
3294 * sid-model.scm (cgen-model.cxx): Ditto.
3296 * utils-cgen.scm (context-error): Accept variable number of
3299 * rtx-funcs.scm (error:): New rtx function.
3300 * rtl-c.scm (s-case-vm): New proc.
3301 (-gen-non-vm-case-get,s-case-non-vm): New procs.
3302 (s-case): Simplify, handle non-VM result.
3303 (error:): New rtx function.
3305 1999-04-30 Doug Evans <devans@casey.cygnus.com>
3307 * arm.cpu (h-pc): Add set spec to zero bottom bits.
3308 (test-hi,test-ls): Fix cbit handling.
3309 (shift-type,h-operand2-shifttype): Move here ...
3310 * arm7.cpu: ... from here.
3311 (set-cond,set-cond-maybe,dnix): Delete, unused.
3312 (set-zn-flags,set-logical-cc,set-add-flags,set-sub-flags): Move ...
3313 * arm.cpu: ... to here.
3314 * thumb.cpu (cmp,alu-cmp): Use set-sub-flags.
3315 (alu-cmn): Use set-add-flags.
3316 (alu-tst): Use set-zn-flags.
3317 (alu-cmp): Use set-sub-flags.
3318 (lsl,lsr,asr): Set condition codes.
3319 (add,addi,sub,subi,mov,addi8,subi8): Ditto.
3320 (alu-op): Split into three: alu-logical-op,alu-arith-op,
3322 (hireg-op): Split sem-fn into lo-dest-sem-fn,hi-dest-sem-fn.
3323 All callers updated.
3324 (sub-sp): Rename from add-sp-neg.
3325 (f-lbwl-offset): Delete.
3326 (f-lbwl-hi,f-lbwl-lo): New ifields.
3327 (lbwl-hi,lbwl-lo): Update.
3328 (bl-hi): Add 4 to pc.
3329 (push-reg,pop-reg): Simplify.
3330 (push,push-lr): Push registers in correct order.
3331 (pop,pop-pc): Pop registers in correct order.
3332 (save-reg-inc,load-reg-inc): Simplify.
3333 (ldmia): Save registers in correct order.
3335 1999-04-30 Ben Elliston <bje@cygnus.com>
3337 * arm7.cpu (f-op-hdt): Remove; unused.
3338 (f-ror-imm8-value,f-ror-imm-rotate): New fields.
3339 (f-ror-imm8): New multi-ifield.
3340 (f-operand2-bit7): Remove; use the generic `f-bit7' instead. All
3342 (f-uimm12): New field.
3343 (ror-imm8): New operand.
3345 (hdt-offset8): Reinstate operand.
3346 (offset4-hi,offset4-lo): Remove.
3347 (set-cond): Remove macro; unused.
3348 (set-cond-maybe): Likewise.
3349 (load-word/byte): Use uimm12 operand for a true 12-bit immediate.
3350 (store-word/byte): Likewise.
3351 (load-halfword): Use hdt-offset8 multifield operand instead of two
3352 4-bit operands that are explicitly combined by semantic code.
3353 (do-halfword-store): Bug fix. Set address when not preindexing.
3354 (store-halfword): Also use hdt-offset8 operand.
3355 (arith-op): Avoid clobbering source registers when one of them is
3356 the destination register.
3357 (arith-imm-op): Likewise.
3358 (tst-imm): Use ror-imm8 operand. Handle special case of rot 0.
3359 (teq-imm): Likewise.
3360 (ldm-p): Rename to ldmdb.
3361 (stm-pw): Rename to stmdb-wb.
3362 (multi-action): New macro; test reg-list bits and execute a
3363 semantic fn if the bit is set.
3364 (ldmda,ldmib,ldmia,ldmia-wb,ldmdb): New multiple load insns.
3365 (stmdb,stmib,stmia,stmia-wb,stmda,stmdb-wb): Store insns.
3366 (all insns): Use dnai entries for simplicity rather than dni.
3367 (*): Use short-form of (const ..).
3369 1999-04-29 Doug Evans <devans@casey.cygnus.com>
3371 * rtl.scm (<rtx-func>): Rename member type to style. Rename
3372 member eval to evaluator.
3373 (rtx-foo accessors): Rename from rtx:foo. All callers updated.
3374 (tstate-make): Delete arg op-fn. All callers updated.
3375 (tstate-op-fn,tstate-set-op-fn!): Delete.
3376 (rtx-traverse): Delete op-fn arg. All callers updated.
3377 * semantics.scm (-simplify-for-compilation-process-expr): New proc,
3378 split out of -simplify-for-compilation.
3380 * Makefile.am (CGEN_NONHOB_FILES,CGENFILES): New variables.
3381 (cgen_DEPENDENCIES): Add stamp-cgen.
3382 (stamp-cgen): New rule.
3383 * Makefile.in: Rebuild.
3385 * rtl-c.scm (enum:): Define emitter for.
3386 * rtl.scm (rtx-constant?): Rename from rtx-const? and check for
3388 (rtx-constant-value,rtx-enum-value): New procs.
3389 (-rtx-traverse-normal): Expand enum-value to (enum enum-value).
3390 (rtx-compile-time-constant?): Return #t for enums.
3391 (rtx-true?,rtx-false?): Handle enums.
3392 (rtx-simplify-eq-attr-mach): Use rtx-true,rtx-false instead of
3393 building result by hand.
3394 (rtx-simplify-eq-attr-insn): Ditto.
3395 * rtx-funcs.scm (enum:,enum): New rtx functions.
3397 * mach.scm (<arch>): New members insns-analyzed?, semantics-analyzed?,
3399 (arch-analyze-insns!): New proc.
3400 * opcodes.scm (opcodes-analyze!): Call arch-analyze-insns! instead
3401 of calling ifmt-compute! directly.
3402 * sid.scm (-sim-insns-analyzed?): Delete.
3403 (sim-analyze!): Call arch-analyze-insns! instead of calling
3404 ifmt-compute! directly.
3405 * sim.scm (-sim-insns-analyzed?): Delete.
3406 (sim-analyze!): Call arch-analyze-insns! instead of calling
3407 ifmt-compute! directly.
3409 * utils.scm (string-take-with-filler): New proc.
3410 (string-take): Use it.
3412 * pgmr-tools.scm: New file.
3413 * read.scm: Load it.
3414 * insn.scm (pretty-print-insn-format): Move to pgmr.scm.
3416 * insn.scm (insn-base-mask): Renamed from insn:mask.
3417 All callers updated.
3418 (insn-base-mask-length): Renamed from insn:mask-length.
3419 All callers updated.
3420 (insn-foo): Renamed from insn:foo. All callers updated.
3421 * minsn.scm (minsn-foo): Renamed from minsn:foo. All callers updated.
3422 * iformat.scm (compute-insn-base-mask-length): Renamed from
3423 compute-insn-mask-length. All callers updated.
3424 (compute-insn-base-mask): Renamed from compute-insn-mask.
3425 All callers updated.
3427 * enum.scm (-enum-parse-prefix): New proc.
3428 (<enum>,make!): Don't parse enum values here.
3429 (-enum-parse): Do it here. Call -enum-parse-prefix.
3430 (define-full-insn-enum): Ditto.
3431 (enum-vals-upcase): New proc.
3432 * hardware.scm (define-keyword): Make enum prefix uppercase.
3433 * hobscmif.h (CHAR_LOWERP,CHAR_UPPERP,CHAR_WHITEP): New macros.
3435 * ifield.scm (<ifield>,field-mask): Allow container to be #f.
3436 (<ifield>,field-extract): New method.
3437 (<multi-ifield>,field-extract): New method.
3438 (ifld-extract): New proc.
3439 * opcodes.scm (ifld-insert-fn-name): Renamed from ifld-insert.
3440 (ifld-extract-fn-name): Renamed from ifld-extract.
3442 * ifield.scm (ifld-new-value): Renamed from ifield-make.
3443 All callers updated.
3445 * ifield.scm (ifld-lsb0?): New proc.
3446 (sort-ifield-list): New arg up?. All callers updated.
3447 * iformat.scm (compute-insn-mask): Get lsb0? flag from argument,
3448 rather than global state.
3450 1999-04-27 Doug Evans <devans@casey.cygnus.com>
3452 * insn.scm (pretty-print-insn-format): New proc.
3454 * Makefile.in: Rebuild.
3455 * aclocal.m4: Rebuild
3456 * configure: Rebuild.
3458 Mon Apr 26 10:30:18 1999 Doug Evans <devans@canuck.cygnus.com>
3460 * configure.in (AM_INIT_AUTOMAKE): Update version to 0.7.2.
3461 * configure: Rebuild.
3462 * aclocal.m4: Rebuild.
3463 * Makefile.in: Rebuild.
3464 * doc/Makefile.in: Rebuild.
3465 * doc/version.texi: Rebuild.
3467 1999-04-25 Doug Evans <devans@casey.cygnus.com>
3469 * utils.scm (bits->bools): New proc.
3471 1999-04-23 Doug Evans <devans@casey.cygnus.com>
3473 * sid.scm (<multi-ifield>,gen-ifld-extract-decl): Fix call to
3474 subfield's gen-ifld-extract-decl method.
3476 1999-04-23 Ben Elliston <bje@cygnus.com>
3478 * arm7.cpu (ldrsh-pu): Remove.
3479 (do-halfword-load): New pmacro.
3480 (load-halfword): Likewise.
3481 (do-halfword-store): Likewise.
3482 (store-halfword): Likewise.
3483 (strh-*): New instructions.
3484 (ldrsb-*): Likewise.
3486 (ldrsh-*): Likewise.
3488 1999-04-22 Doug Evans <devans@casey.cygnus.com>
3490 * ifield.scm (ifld-constant?): Delete special handling of RESERVED
3493 * arm7.cpu (do-word/byte-store): Fix typo.
3495 1999-04-22 Ben Elliston <bje@cygnus.com>
3497 * arm7.cpu (do-word/byte-load): Handle cases where the destination
3498 register is the program counter (R15).
3500 * arm7.cpu (do-word/byte-store,store-word/byte): New pmacros.
3501 (str-*): Implement using store-word-byte. Remove older versions.
3502 (bic): Use the `inv' rtx for obtaining bitwise complements.
3503 (bic-imm): Likewise.
3505 (mvn-imm): Likewise.
3506 (store-indev-reg): Remove crufty pmacro.
3507 (load-indiv-reg): Likewise.
3508 (ldm-p): Reverse the order of register processing for decrement.
3510 (stbi): Remove; handled by the str-* insns.
3512 1999-04-21 Doug Evans <devans@casey.cygnus.com>
3514 * thumb.cpu (cmp): Fix carry bit computation.
3517 1999-04-20 Doug Evans <devans@casey.cygnus.com>
3519 * arm.cpu (h-tbit): Specify set spec.
3521 * arm7.cpu (bx): Don't call C routine, just set h-tbit.
3522 (set-sub-flags): Interpret "carry bit" as a borrow.
3523 (all sub/cmp insns): Carry bit is actually a borrow bit.
3524 * thumb.cpu (bx-rs,bx-hs): Don't call C routine, just set h-tbit.
3525 (add-carry,sub-carry,thumb-neg,thumb-bic,thumb-inv): Delete. Use
3527 (hireg-add,hireg-cmp,hireg-move): Ditto.
3529 * read.scm (-CGEN-VERSION): Change version to 0.7.2.
3530 (-CGEN-LANG-VERSION): Ditto.
3532 1999-04-18 Doug Evans <devans@casey.cygnus.com>
3534 * pmacros.scm (-pmacro-make): New arg `default-values',
3535 all callers updated.
3536 (-pmacro-default-values): New proc.
3537 (-pmacro-process-keyworded-args): New proc.
3538 (-pmacro-process-args): New proc.
3539 (-pmacro-invoke): Process arguments before expanding macro.
3540 (-pmacro-get-arg-spec,-pmacro-get-default-values): New procs.
3541 (define-pmacro): Handle default values specified in arg list.
3542 * rtl.scm (rtx-alu-op-mode,rtx-alu-op-arg): New procs.
3543 (rtx-boolif-op-arg[01]): New procs.
3544 (rtx-true,rtx-false,rtx-canonical-bool): New procs.
3545 (rtx-simplify): Handle not,orif,andif.
3546 * semantics.scm (-simplify-for-compilation): Simplify not,orif,andif.
3547 * utils.scm (alist-copy): New proc.
3548 * arm7.cpu (do-word/byte-load,load-word/byte): New pmacros.
3550 (swi): Explicitly set pc.
3552 * thumb.cpu (bx-rs,bx-hs): Reverse test for switch to arm mode.
3554 1999-04-17 Ben Elliston <bje@cygnus.com>
3556 * arm7.cpu (ldr-pu): Do not add 8 to R15; the step() method
3557 correctly adjusts the program counter now.
3559 * arm7.cpu (f-halfword?): Rename from `f-hdt-halfword?'.
3560 (f-signed?): Rename from `f-hdt-signed?'.
3561 (f-offset4-hi): Rename from `h-hdt-off4-ms'.
3562 (f-offset4-lo): Rename from `h-hdt-off4-ls'.
3563 (f-hdt-offset8): Use new field names.
3564 (ldr): Use `imm12' field, not `offset12', since we do our own
3566 (str, str-*): Likewise.
3567 (ldu-*): Remove most; better not implemented than broken.
3569 (ldrsh-pu): New insn.
3573 (ldm-p): Likewise; replace (load-indiv-reg) version.
3575 1999-04-15 Doug Evans <devans@casey.cygnus.com>
3577 * arm.cpu (h-pc): Delete VIRTUAL attribute, get/set specs.
3578 * arm7.cpu (*): Fix mode of result of arm_compute_carry_out_*.
3579 (*): Explicitly specify mode in c-call.
3580 (logical-op): Recognize sets of h-gr[15] as sets of pc.
3582 (and-imm,orr-imm,xor-imm,mov-imm,bic-imm,mvn-imm): Ditto.
3583 (arith-imm-op): New pmacro.
3584 (add-imm,adc-imm,sub-imm,sbc-imm,rsb-imm,rsc-imm): Use it.
3585 * thumb.cpu (bx-rs,bx-hs): Rewrite.
3587 1999-04-14 Doug Evans <devans@casey.cygnus.com>
3589 * rtl.scm (rtx-simplify-eq-attr-insn): Fix call to context-error.
3591 * rtl.scm (rtl-find-ifields): Implement.
3593 * utils-gen.scm: New file.
3594 * read.scm: Load it.
3595 * desc.scm: Move generic attribute code to utils-gen.scm.
3596 * Makefile.am (CGEN_HOB_INPUT_FILES): Add it.
3597 * Makefile.in: Rebuild.
3599 * arm7.cpu (R15-OFFSET): New attribute.
3601 (logical-op): Delete arg `result?'. All callers updated. Use dnai.
3602 Delete use of eval-cond (dnai specifies it). Specify R15-OFFSET of 12
3603 for reg-shift version.
3605 (data processing insns): Reorganize. Use dnai.
3607 * attr.scm (attr-kind): New proc.
3608 (attr-list-enum-list): Rewrite.
3609 (-attr-sort): Split result into two lists, bools and non-bools.
3610 (current-attr-list-for): Update.
3612 * cgen-sid.scm (sim-arguments): Add -H -> build desc.h file.
3613 * sid-cpu.scm (-gen-attr-decls): New proc.
3614 (-gen-insn-attr-decls): New proc.
3615 (cgen-desc.h): New proc.
3616 (cgen-cpu.h): Put everything in @cpu@ namespace.
3617 (gen-parallel-exec-type): Change prefix of parexec struct from
3619 (-gen-trace-record-type): Ditto for trace_record struct.
3620 (-gen-write-case): Update.
3621 (-gen-scache-semantic-fn): Change function prefix from @cpu@ to
3622 @prefix@. Update scache struct references.
3623 (-gen-sem-case): Update scache struct references.
3624 (-gen-sem-switch-fn): Update idesc struct reference.
3625 Update insn_type enum reference.
3626 (cgen-write.cxx): Update scache,argbuf references.
3627 (cgen-semantics.cxx): Simplify namespace choice (always @cpu@).
3628 * sid-decode.scm (IDESC-TABLE-VAR): Change prefix of insn_data
3629 from @cpu@ to @prefix@.
3630 (-gen-decode-insn-entry): Use gen-cpu-insn-enum.
3631 (-gen-decode-expr-entry): Ditto. Change prefix of INSN_X_INVALID
3632 from @CPU@ to @PREFIX@.
3633 (-gen-decoder-switch): Change prefix of INSN_X_INVALID
3634 from @CPU@ to @PREFIX@.
3635 (-gen-decode-insn-globals): Generate insn attributes.
3636 (-gen-sem-fn-name): Change function prefix from @cpu@ to @prefix@.
3637 (-gen-sem-fn-decls): Use -gen-sem-fn-name. Add `using' for
3638 semantic fn typedef.
3639 (-gen-idesc-decls): Simplify cpu class name (always @cpu@_cpu).
3640 Change prefix of scache struct from @cpu@ to @prefix@.
3641 Change prefix of semantic fn typedef from @cpu@ to @prefix@.
3642 Change prefix of idesc struct from @cpu@ to @prefix@.
3643 Change prefix of insn_type enum from @cpu@ to @prefix@.
3644 (-gen-argbuf-fields-union): Change prefix of sem_fields union
3645 from @cpu@ to @prefix@.
3646 (-gen-scache-decls): Change prefix of scache struct from
3647 @cpu@ to @prefix@. Update idesc struct name.
3648 Update decode,execute methods.
3649 (-gen-extract-case): Update to type name changes.
3650 (-gen-decode-fn): Ditto.
3651 (cgen-decode.h): Put everything in @cpu@ namespace (except
3652 semantic fn decls). Change prefix of insn_word from @cpu@ to @prefix@.
3653 (cgen-decode.cxx): Add using namespace @cpu@.
3654 * sid-model.scm (-gen-hw-profile-decls): Change prefix of
3655 model_mark_get/set from @cpu@ to @prefix@.
3656 (gen-model-unit-fn-name): Change function prefix from @cpu@ to
3658 (gen-model-fn-decls): Update idesc struct name. Change prefix
3659 of model_insn_before/after from @cpu@ to @prefix@.
3660 (-gen-model-insn-fn): Update scache/idesc/argbuf struct names.
3661 Update insn_word type name.
3662 (-gen-model-timing-table): Update INSN_TIMING struct name.
3663 (-gen-model-init-fn): Update MODEL_DATA struct name.
3664 (-gen-mach-defns): Update name of init_idesc_table fn.
3665 (cgen-model.cxx): Add using namespace @cpu@.
3666 * sid.scm (gen-cpu-class): Delete.
3667 (gen-attr-type): New proc.
3668 (gen-obj-attr-sid-defn): New proc.
3669 (<operand>,gen-profile-code): Update name of model_mark_get/set fn.
3670 (gen-cpu-insn-enum-decl): Change prefix of insn_type enum from
3672 (gen-cpu-insn-enum): Update name of insn enum.
3673 * thumb.cpu (bx-rs): Rename @cpu@_do_bx to @prefix@_do_bx.
3675 (swi): Rename @cpu@_swi to @prefix@_swi.
3677 * decode.scm (-build-decode-table-entry): Remove heuristic for
3678 distinguishing insns, and use insn ifield-assertion specs.
3680 * desc-cpu.scm (gen-A-attr-mask): Simplify.
3681 (gen-ifld-defns): Boolean attributes begin at number 0 now.
3682 (gen-hw-table-defns,gen-operand-table,gen-insn-table): Ditto.
3683 * opc-itab.scm (-gen-macro-insn-table): Ditto.
3684 * utils-cgen.scm (gen-attr-enum-decl): Change type arg to prefix,
3685 all callers updated.
3686 (gen-attr-name): New proc
3687 (gen-attr-mask): Use it. Boolean attributes start at 0 now.
3688 (gen-obj-attr-defn): Delete num_nonbools count.
3690 * iformat.scm (ifmt-analyze): Handle insn-condition.
3691 (ifmt-compute!): Ditto.
3692 * insn.scm (<insn>): Specify default value for condition,
3693 post-cond-trap,compiled-condition,compiled-semantics.
3694 (<insn>,make!): New arg condition.
3695 (<insn>): Add getters for condition,compiled-condition.
3696 (-insn-parse): New arg condition, all callers updated.
3697 (-insn-read): Recognize condition spec.
3698 (define-full-insn): New arg condition.
3699 * minsn.scm (minsn-make-alias): Update call to (make <insn> ...).
3700 * semantics.scm (semantic-compile): Change arg sem-code to
3702 (semantic-attrs): Ditto.
3703 * sim.scm (sim-finish!): Update calls to define-full-insn.
3704 * simplify.inc (define-normal-insn): Update call to define-full-insn.
3705 * sid-cpu.scm (gen-semantic-code): Handle insn-condition.
3706 * sid.scm (sim-finish!): Update call to define-full-insn.
3708 Tue Apr 13 17:04:34 1999 Doug Evans <devans@canuck.cygnus.com>
3710 * Makefile.am (sim-cpu): Allow specification of ISA.
3711 * Makefile.in: Rebuild.
3713 Sun Apr 11 00:37:56 1999 Jim Wilson <wilson@cygnus.com>
3715 * i960.cpu (sll-expr, srl-expr, sra-expr): Handle large shift counts.
3717 1999-04-10 Doug Evans <devans@casey.cygnus.com>
3719 * sparccom.cpu (check-fp-enable): Wrap TRAP32_FP_DIS in c-code.
3721 * arm.cpu (gr-names): Put pc first so it gets prefered in disassembly.
3723 * attr.scm (atlist?): New proc.
3724 (-attr-eval): Rewrite.
3725 (attr-parse): New proc.
3726 (atlist-parse): Use it.
3728 * decode.scm (exprtable-entry-make): New proc.
3729 (exprtable-entry-insn,exprtable-entry-expr): New procs.
3730 (exprtable-make,exprtable-insns): New procs.
3732 * hardware.scm (hw-mode-ok?): Delete argument `set?'.
3734 (hardware-builtin!): Make h-memory a vector.
3736 * iformat.scm (ifmt-ifields): Renamed from ifmt-fields.
3737 All callers updated.
3738 (ifmt-analyze): Use csem-* accessors on result of semantic-compile.
3740 * insn.scm (<insn>). Rename ifld-assertions to ifield-assertion.
3742 (-insn-parse): Set semantics to #f if not specified.
3743 (define-insn,define-full-insn): Take out code that ignores ALIAS's
3745 (-parse-insn-format): Recognize `=' iformat spec.
3747 * mach.scm (isa-min-insn-bitsize): Ignore ALIAS's.
3748 (isa-max-insn-bitsize): Ditto.
3750 * opcodes.scm (<ifield>,gen-insert): Call rtl-c instead of
3752 (<ifield>,gen-extract): Ditto.
3753 (<multi-ifield>,gen-insert,gen-extract): Ditto.
3754 * sid-cpu.scm (-gen-reg-access-defns): Ditto.
3755 (gen-define-ifmt-ifields): New proc.
3756 (gen-semantic-code): Rewrite.
3757 * sid-decode.scm (-gen-decode-expr-entry): New proc.
3758 (-gen-decoder-switch): Handle expression tables.
3759 (-gen-extract-case): Call gen-define-ifmt-ifields instead of
3761 * sid-model.scm (-gen-model-insn-fn): Call gen-define-ifmt-ifields
3762 instead of gen-define-fields.
3763 * sid.scm (<ifield>,gen-ifld-extract-decl): New arg `indent', all
3765 (<multi-ifield,gen-ifld-extract-decl): Ditto.
3766 (-gen-ifld-extract-base): Call rtl-c instead of rtl-c-with-alist.
3767 (-gen-ifld-extract-beyond): Ditto.
3768 (<multi-ifield>,gen-ifld-extract): Ditto.
3769 (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
3770 rtl evaluation code.
3771 (op:read): Build an <eval-state> to pass to gen-read.
3772 (op:write): Build an <eval-state> to pass to gen-write.
3773 (op:record-profile): Build an <eval-state> to pass to
3775 * sim-cpu.scm (gen-semantic-code): Rewrite.
3776 * sim.scm (-gen-ifld-extract-base): Call rtl-c instead of
3778 (-gen-ifld-extract-beyond): Ditto.
3779 (<multi-ifield>,gen-ifld-extract): Ditto.
3780 (<hw-register>,gen-get-macro,gen-set-macro): Ditto.
3781 (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
3782 rtl evaluation code.
3783 (op:read): Build an <eval-state> to pass to gen-read.
3784 (op:write): Build an <eval-state> to pass to gen-write.
3785 (op:record-profile): Build an <eval-state> to pass to
3788 * operand.scm (<operand>): Give `selector' default value of #f.
3789 Give `num' default value of -1. Give `cond?' default value of #f.
3790 (op:new-mode): Delete arg `set?', all uses updated.
3792 * read.scm (reader-error): Handle #f return from port-filename.
3793 (-init-parse-cpu!): Call rtl-c-init!.
3794 (reader-install-builtin!): Call rtl-builtin!.
3796 * rtl-c.scm: New file.
3797 * semantics.scm: New file.
3798 * read.scm: Load them.
3799 * rtl.scm: C generation moved to rtl-c.scm. Semantic analysis moved
3801 (<rtx-func>): Delete members syntax?,macro,c,expr. New members
3803 (rtx-lookup): Renamed from -rtx-func-lookup. All callers updated.
3804 (-rtx-num-text,-rtx-max-num): New globals.
3805 (def-rtx-operand-node,define-rtx-operand-node): New procs.
3806 (-rtx-macro-lookup): New proc.
3807 (rtx-lvalue-mode-name): Renamed from rtx-expr-mode-name.
3808 (rtx-env-stack-empty?,rtx-env-stack-head): New procs.
3809 (rtx-env-var-list,rtx-env-empty-stack,rtx-env-init-stack1): New procs.
3810 (rtx-env-make,rtx-env-empty?,rtx-env-make-locals): New procs.
3811 (rtx-env-push,rtx-temp-lookup,-rtx-closure-make): New procs.
3812 (rtx-make,rtx-kind?,rtx-const?,rtx-const-value,rtx-symbol-name,
3813 rtx-operand?,rtx-operand-obj,rtx-local?,rtx-local-obj, rtx-xop-obj,
3814 rtx-index-of-value,rtx-if-mode,rtx-if-test,rtx-if-then,rtx-if-else,
3815 rtx-eq-attr-owner,rtx-eq-attr-attr,rtx-eq-attr-value): New procs.
3816 (rtx-pretty-name): New proc.
3817 (-rtx-traverser-table,-rtx-make-traverse-table): New procs.
3818 (rtx-traverse-*): Rewrite rtx traversing.
3819 (rtx-eval-*): Rewrite rtx evaluation.
3820 (rtx-compile): New proc.
3821 (rtx-simplify): New proc.
3822 (rtx-simply-eq-attr-mach,rtx-simplify-eq-attr-insn): New procs.
3823 * rtx-funcs.scm: C generation moved to rtl-c.scm.
3824 (ifield,index-of): Rewrite.
3825 (name): Renamed from `operand:'.
3826 (operand,xop,local): New rtx's.
3827 (current-insn): Rewrite.
3828 * Makefile.am (CGEN_HOB_INPUT_FILES): Add rtl-c.scm, semantics.scm.
3829 (cgen-hob.h): Remove rule for.
3830 (cgen-hob.o): Depend on cgen-hob.c only.
3831 * Makefile.in: Rebuild.
3833 * utils-cgen.scm (vmake): New proc.
3834 (<context>): New class.
3835 (context-make-prefix,context-error): New procs.
3837 Fri Apr 9 19:26:28 1999 Jim Wilson <wilson@cygnus.com>
3839 * i960.cpu: Add some ??? comments.
3840 (xnor, ornot): New instructions.
3841 (*): Delete obsolete COND-CTI and UNCOND-CTI attributes.
3843 1999-04-08 Doug Evans <devans@casey.cygnus.com>
3845 * cos.scm (-object-error): Print better error message.
3847 * pmacros.scm (-pmacro-env-make): Renamed from -env-make.
3848 (-pmacro-env-ref): Renamed from -env-ref.
3850 1999-03-31 Doug Evans <devans@casey.cygnus.com>
3852 * hardware.scm (<hw-pc>,parse!): Allow get/set specs.
3854 (hardware-builtin!): Delete h-pc builtin.
3855 * arm.cpu (h-pc): Define.
3856 (h-gr): Delete get,set specs. Make array of 16 regs again.
3857 * arm7.cpu (set-logical-cc-maybe): Delete.
3858 (set-zn-flags,set-add-flags,set-sub-flags): New macros.
3859 (data processing insns): Rewrite.
3860 * m32r.cpu (h-pc): Define.
3861 * fr30.cpu (h-pc): Define.
3862 * i960.cpu (h-pc): Define.
3863 * sparc.cpu (h-pc): Define.
3865 * rtl.scm (-rtx-traverse-operands): Add some error checking to LOCALS.
3866 (s-parallel): Replace do {...} while (0) with {...}.
3867 (s-sequence): Ditto.
3869 * sid-cpu.scm (gen-parallel-exec-type): Make type of `written'
3871 (-gen-write-case,-gen-sem-case): Ditto.
3872 (-gen-sem-case): Only specify `written' if profiling or
3873 parallel-write-back.
3874 (-gen-scache-semantic-fn,-gen-all-semantic-fns): Put procs back in.
3875 (-gen-sem-switch-fn): New proc.
3876 (cgen-semantics.cxx): Emit either semantic fns or semantic switch
3877 based on with-sem-switch option.
3878 * sid-decode.scm (-gen-decode-insn-globals): Only define
3879 idesc_table_initialized_p if with-sem-switch. Record semantic fn
3880 addresses in idesc_table if !with-sem-switch.
3881 (-gen-sem-fn-decls): Rewrite.
3882 (-gen-idesc-decls): Define @cpu@_sem_fn type. Define `execute'
3883 member based on with-sem-switch. Only define
3884 `idesc_table_initialized_p' member if with-sem-switch.
3885 (cgen-decode.h): If !with-sem-switch, declare semantic fns.
3886 * sid.scm (-with-sem-switch?): New variable.
3887 (option-init!): Initialize it.
3888 (option-set!): Set it.
3889 (with-sem-switch?): New proc.
3890 (-op-gen-set-trace): Only emit `written' reference if profiling.
3891 (sim-finish!): Use h_pc_set to set pc.
3893 1999-03-30 Doug Evans <devans@casey.cygnus.com>
3895 * sparccom.cpu (arith-cc-binop): New args s32-set-flags,s64-set-flags.
3896 All callers updated.
3897 (arith-carry-cc-binop): New arg set-flags. All callers updated.
3899 * sid.scm (gen-argbuf-type): Delete.
3900 (-gen-argbuf-fields-union): Move to ...
3901 * sid-decode.scm: ... here.
3903 * read.scm (-reader-process-expanded-1): New proc.
3904 (-reader-process-expanded): Call it to catch nested begin's.
3905 (reader-process): Move `begin' handling to -reader-process-expanded.
3907 * insn.scm (-insn-read): Fix name of `format' spec.
3909 * pmacros.scm (.pmacro): New builtin.
3910 (scan-symbol): If procedure macro, return macro rather than its symbol.
3911 (check-macro): Don't do lookup, instead check if (car expr) is
3913 (scan-list): Handle .pmacro.
3914 (scan): No longer re-examine text for another macro invocation.
3915 (-pmacro-build-lambda): New proc.
3916 (define-pmacro): Rewrite. If defining one pmacro to be an alias of
3917 another, fetch the other's value (rather than doing it during
3920 1999-03-27 Doug Evans <devans@casey.cygnus.com>
3922 * Makefile.am (CGEN_HOB_INPUT_FILES): Add decode.scm.
3923 * Makefile.in: Rebuild.
3925 * decode.scm (decode-get-best-bits): Use memq instead of element?.
3926 (-fill-slot!): Simplify.
3927 (-build-slots): Simplify.
3929 * dev.scm (load-sid): Don't load sid-arch.scm.
3931 * sid-decode.scm: Replace computed goto decoder/extractor with plain
3933 * sim-decode.scm: Replace computed goto decoder/extractor with plain
3936 1999-03-26 Doug Evans <devans@casey.cygnus.com>
3938 * sim-decode.scm: Clean up pass. Move decoder computation into ...
3939 * decode.scm: ... here. New file.
3940 * sid-decode.scm: Use decoder computation code in decode.scm.
3941 * read.scm: Load decode.scm.
3943 * arm.cpu (arm710 model): Add u-exec function unit.
3944 (h-gr): Delete CACHE-ADDR for now. Make array of 15, not 16 regs.
3945 Add get/set specs to redirect reg 15 to h-pc.
3946 (h-*): Indicate for both ARM and THUMB isas.
3947 (cbit,nbit,vbit,zbit): Ditto.
3948 (h-ibit,h-fbit,h-tbit,h-mbits): New hardware elements.
3949 (h-cpsr): Make virtual. Add get/set specs.
3950 (h-spsr-fiq,h-spsr-svc,h-spsr-abt,h-spsr-irq,h-spsr-und): New hw.
3951 (h-spsr): New virtual reg.
3952 * arm7.cpu (shift-type): New explicitly defined keyword.
3953 (h-operand2-shifttype): Use it.
3954 (set-logical-cc-maybe): Delete carry-out arg. New args arg1,arg2.
3955 All callers updated. Don't set cbit.
3956 (logical-op): Add rm to ifield list. Change case to case:. Use
3957 shift-type enum as case choices. Set cbit.
3958 (and,orr,eor,add-imm): Uncomment out.
3959 (undefined): Temporarily comment out.
3960 * thumb.scm (mov,cmp,addi8,subi8,str-sprel,ldr-sprel): s/rd/bit10-rd/.
3961 (lda-pc,lda-sp): Ditto.
3962 (ldr-pc): Rename from ldr.
3963 (cbranch): Mark insns as being thumb insns.
3965 * attr.scm (<bitset-attribute>,parse-value): Recognize strings.
3967 * cgen-sid.scm: Don't load sid-arch.scm.
3968 (sim-arguments): Delete unused entries.
3969 * sid-arch.scm: Delete.
3971 * insn.scm (<insn>,iflds): Renamed from flds. All uses updated.
3972 (<insn>,ifld-assertions): New member.
3973 (<insn>,make!): New arg ifld-assertions, all callers updated.
3974 (<insn> accessors): Change insn:foo to insn-foo. All callers updated.
3975 (insn:fields): Delete.
3976 (-insn-parse): New arg ifld-assertions. All callers updated.
3977 (-insn-read,define-insn): New procs.
3978 (define-full-insn): New arg ifld-assertions. All callers updated.
3979 (insn-init!): New comment define-insn.
3981 * model.scm (-model-parse): Ensure at least one unit specified.
3983 * rtl.scm (-rtx-traverse-operands): Recognize environments.
3984 (<c-expr-temp>,get-name): New method.
3985 (-rtx-make-current-closure,s-closure): New proc.
3986 (hw:): Wrap rtx indices in a closure.
3987 (-gen-case-prefix): New proc.
3989 * rtx-funcs.scm (case:): Fix call to s-case.
3990 (closure): New rtx func.
3992 * hardware.scm (<hardware-base>): New member isas-cache.
3993 (<hardware-base>,get-isas): New method.
3994 (hardware-builtin): Indicate for all isas.
3995 * ifield.scm (-ifield-parse): Only keep if isa+mach are kept.
3996 * mach.scm (current-arch-mach-name-list): Return list of names.
3997 (current-isa-mach-name-list): Ditto.
3998 (define-arch): Install builtin objects here.
3999 * read.scm (keep-atlist?): Only keep if both mach and isa are
4001 (keep-mach-atlist?): New proc.
4002 (keep-isa-multiple?,current-keep-isa-name-list): New proc.
4003 (reader-install-builtin!): Renamed from -install-builtin!.
4004 * sid-cpu.scm (-gen-reg-access-defns): Renamed from
4005 -gen-cpu-reg-access-defns. Rewrite.
4006 (gen-reg-access-defn): Delete.
4007 (-gen-hardware-struct): New proc.
4008 (-gen-hardware-types): Simplify. Add multiple-isa support.
4009 (gen-semantic-fn,-gen-all-semantics): Delete.
4010 (-gen-read-args,-gen-read-case,-gen-read-switch): Delete.
4011 (cgen-cpu.c,cgen-read.c,cgen-sem-switch.c,cgen-mainloop.in): Delete.
4012 (cgen-write.cxx,cgen-semantics.cxx,cgen-decode.cxx): Renamed from *.c.
4013 Call sem-analyze-insns!.
4014 (cgen-semantics.cxx): Add multiple-isa support.
4015 * sid-decode.c (-gen-idesc-decls): Add multiple-isa support.
4016 (-gen-scache-decls,-gen-decode-fn): Ditto.
4017 (cgen-decode.h): Call sem-analyze-insns!.
4018 * sid-model.scm (cgen-model.cxx): Renamed from cgen-model.c.
4019 * sid.scm (-with-multiple-isa?): New variable.
4020 (option-init!): Initialize it.
4021 (option-set!): Set it.
4022 (with-multiple-isa?): New proc.
4023 (gen-cpu-ref): New arg isas. All callers updated.
4024 (gen-cpu-class): New proc.
4025 (*-get-macro,*-set-macro): Delete.
4026 (gen-reg-get-fun-name,gen-reg-set-fun-name): New procs.
4027 (-hw-gen-fun-get): Call gen-reg-get-fun-name.
4028 (-hw-gen-fun-set): Call gen-reg-set-fun-name.
4029 (-gen-hw-index): Call rtx-c instead of rtx-c-with-temps for rtxs.
4030 (-sim-insns-analyzed): New global variable.
4031 (sim-init!): Reset it.
4032 (sim-analyze-insns!): New proc.
4033 (sim-analyze!): Don't do instruction analysis here.
4034 (sim-finish!): Specify isa of x-invalid insn.
4035 * sim.scm (sim-finish!): Specify isa of added x-* virtual insns.
4037 1999-03-22 Doug Evans <devans@casey.cygnus.com>
4039 * thumb.cpu (cpu,mach,model): Delete.
4040 (dntf): New pmacro. Use it for all field definitions.
4041 (dntop): New pmacro. Use it for all operand definitions.
4042 (asr): Correct field list.
4043 (add,addi,sub,subi,add-sp,add-sp-neg): Ditto.
4045 * utils-cgen.scm (define-getters): New macro to simplify
4046 writing class accessors.
4047 (define-setters): Ditto.
4048 (sanitize): Recognize isa elements.
4050 * sid-cpu.scm (*): Replace cpu:parallel-exec? call with
4051 state-parallel-exec?.
4052 * sid-model.scm (*): Ditto.
4053 * sid-decode.scm (*): Ditto. Replace cpu:decode-assist with
4054 state-decode-assist.
4056 * sid-decode.scm (decode-bits): Replace list-reverse! with reverse!.
4057 (-gen-decode-switch): Rewrite to not generate deeply nested lists.
4058 * sim-decode.scm (-gen-decode-switch): Ditto.
4060 * sim-arch.scm (-regs-for-access-fns): Delete.
4061 (-biggest-reg-mode,-gen-arch-reg-access-decls): Delete.
4062 (-gen-arch-reg-access-defns): Delete.
4064 * sim-cpu.scm (*): Replace cpu:liw-insns with state-liw-insns,
4065 cpu:parallel-insns with state-parallel-insns, cpu:parallel-exec?
4066 with state-parallel=exec?.
4067 (cgen-*): Call sim-analyze-insns! here.
4068 * sim-decode.scm (cgen-*): Ditto.
4069 * sim-model.scm (cgen-*): Ditto.
4070 * sim.scm (-sim-insns-analyzed): New global variable.
4071 (sim-init!): Reset it.
4072 (sim-analyze-insns!): Renamed from sim-analyze!. Keep track if we've
4073 already done the analysis.
4075 * sim-model.scm (-gen-mach-defns): Add mach attribute number to
4078 * arm.cpu: Only include arm7.cpu,thumb.cpu if necessary.
4079 (arm arch): Update isa spec.
4080 (arm,thumb isas): Define.
4081 (arm7 cpu): default-insn-bitsize,base-insn-bitsize moved to isas.
4082 (arm7tdmi mach): Add isa spec.
4083 * arm7.cpu (*): Replace subreg: with subword:. Remove unnecessary
4084 `const' on word number.
4085 * fr30.cpu (fr30 arch): Update isa spec.
4087 (fr30bf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
4089 * i960.cpu (i960 arch): Update isa spec.
4091 (i960base cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
4092 liw-insns,parallel-insns moved to isas spec.
4093 * m32r.cpu (m32r arch): Update isas spec.
4095 (m32rbf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
4096 liw-insns,parallel-insns moved to isa spec.
4097 * sparc.cpu (sparc arch): Update isas spec.
4098 (sparc isa): Define.
4099 * sparc32.cpu (sparc32 cpu): default-insn-bitsize,base-insn-bitsize,
4100 decode-assist moved to isa spec.
4101 * sparc64.cpu (sparc64 cpu): Ditto.
4102 * sparccom.cpu (trap insns): Correct mode of result of c-call:.
4103 * desc-cpu.scm (-gen-isa-table-defns): New proc.
4104 (-gen-mach-table-defns): Output mach table.
4105 (-gen-hash-defines): Delete insn size macros, except for
4107 (-cgen-cpu-open): Rewrite cpu_open handling. Take stdarg list of args.
4108 (cgen-desc.h): Define MAX_ISAS.
4109 (cgen-desc.c): Include stdarg.h. Call -gen-isa-table-defns.
4110 * mach.scm (<arch>): Rename arch-data to data. New member isa-list.
4111 (arch-* accessors): Renamed from arch:*. All callers updated.
4112 (current-arch-isa-name-list): New proc.
4113 (-arch-parse-isas): Renamed from -arch-parse-isa.
4114 (def-isa-attr!): Rewrite.
4115 (<iframe>): New class.
4116 (<itype>): New class.
4118 (isa-min-insn-bitsize,isa-max-insn-bitsize): New procs.
4119 (isa-integral-insn?,isa-parallel-exec?): New procs.
4120 (-isa-parse,-isa-read,define-isa): New proc.
4121 (<cpu>): Members default-insn-bitsize,base-insn-bitsize,decode-assist,
4122 liw-insns moved to <isa>.
4123 (cpu-* accessors): Renamed from cpu:*. All callers updated.
4124 (-cpu-parse,-cpu-read): Update.
4125 (state-*): Renamed from state:*. All callers updated.
4126 (state-default-insn-bitsize,state-base-insn-bitsize): Use isa spec,
4128 (state-parallel-insns,state-parallel-exec?,state-liw-insns): New procs.
4129 (state-decode-assist): New proc.
4130 (<derived-arch-data>): Delete min-insn-bitsize,max-insn-bitsize.
4131 (-adata-set-derived!): Rewrite.
4132 (adata-integral-insn?): Renamed from adata:integral-insn?. All
4134 (arch-init!): Add define-isa command.
4135 * read.scm (<reader>): Default keep-isa member to (all).
4136 (reader-* accessors): Renamed from reader:*. All callers updated.
4137 (-keep-isa-set!): Call string->symbol on isa name list.
4138 (keep-isa-validate!): Rewrite.
4139 (current-isa): New proc.
4140 (keep-isa?): Recognize "all".
4141 (-init-parse-cpu!): New arg keep-isa. All callers updated.
4142 Call -keep-isa-set!.
4143 (cmd-if): Recognize keep-isa?.
4144 (cpu-load): New arg keep-isa. All callers updated.
4145 (-opt-spec-update): New proc.
4146 (common-arguments): First arg is string, not symbol.
4147 (-cgen): Call -opt-spec-update. Rewrite argument parsing.
4149 * rtl.scm (rtx-get): Default mode of string arg is INT.
4151 * rtl.scm (s-subword): Renamed from s-subreg. All uses updated.
4153 * rtx-funcs.scm (join:): Pass cpu to handler.
4155 * configure.in (guile_include_dir): Delete.
4156 * configure: Rebuild.
4157 * Makefile.in: Rebuild.
4158 * doc/Makefile.in: Rebuild.
4160 * sid-cpu.scm (-extract-chunk-specs): New proc.
4161 (gen-define-fields): Use it.
4162 (-extract-chunk): New proc.
4163 (-gen-extract-beyond-var-list): Use it.
4164 (gen-extract-fields): Simplify.
4166 1999-03-22 Ben Elliston <bje@cygnus.com>
4168 * arm7.cpu (ldri-p): New instruction.
4169 (swi): Do not vector through 0x8 yet--there is nothing there.
4172 (all): Use (const x) in subreg expressions.
4174 1999-03-19 Ben Elliston <bje@cygnus.com>
4176 * arm7.cpu (smull): Use operand field `rs', not `mul-rn'. Thinko.
4179 1999-03-17 Doug Evans <devans@casey.cygnus.com>
4181 * fr30.cpu (define-arch): Specify "forced" default-alignment.
4182 * mach.scm (-parse-alignment): Recognize "forced" alignment.
4183 * sim-cpu.scm (-extract-chunk-specs): New proc.
4184 (gen-define-fields): Use it.
4185 (-extract-chunk): New proc.
4186 (-gen-extract-beyond-var-list): Use it.
4187 (gen-extract-fields): Simplify.
4189 Port to guile 1.3.1.
4190 * Makefile.am (GUILEINCDIR,GUILELDFLAGS,GUILELDADD): Delete.
4191 (LIBIBERTY): New var.
4192 (HOB_OBJS): Add cgen-gh.o.
4193 (hobbit): Delete $(CFLAGS) from link, add $(LIBS) $(LIBIBERTY).
4194 * Makefile.in: Rebuild.
4195 * acconfig.h: Add HAVE_3_ARG_SCM_MAKE_VECTOR.
4196 * config.in: Rebuild.
4197 * configure.in: Add checks for libdl, libreadline, libnsl, libsocket,
4198 libncurses, libtermcap.
4199 Add checks for needed functions in guile 1.2 not in guile 1.3,
4200 and vice versa. Add test for 3 argument scm_make_vector.
4201 * configure: Rebuild.
4202 * cgen-gh.c (scm_list_length,scm_list_append,scm_list_reverse): Provide
4203 definitions if guile doesn't have them.
4204 (gh_make_vector,gh_length,gh_vector_set_x,gh_vector_ref):
4205 (cgh_vector): Replace gh_vector with gh_make_vector. Replace gh_vset
4206 with gh_vector_set_x.
4207 (cgh_qsort): Replace gh_list_length with gh_length.
4208 * cgen-gh.h: Add decls for added functions.
4209 (cgh_qsort): Don't declare if IN_HOBBIT.
4210 * cos.c: Include config.h. Replace gh_vref with gh_vector_ref,
4211 gh_vset with gh_vector_set_x, gh_list_length with gh_length,
4212 scm_make_vector with gh_make_vector.
4213 * cos.scm: Use vector-length instead of length on vectors.
4214 * dev.scm (cload): Make varargs proc with keyword/value args.
4215 * hobscmif.h: Include config.h, cgen-gh.h. Undef make_vector and
4216 provide version that works with guile 1.2 or 1.3.
4217 Include private copy of scmhob.h.
4218 * scmhob.h: New file. Keep our own copy for now.
4220 Tue Mar 16 13:22:01 1999 Doug Evans <devans@canuck.cygnus.com>
4222 * rtl.scm (-rtx-traverse-error): Ensure expression is output in
4224 (-rtx-traverse-operands): Dump cx temp stack if debugging.
4225 (-cx-temp-dump-stack): Pretty up output.
4227 * arm.cpu: comment out thumb.cpu until isa support ready.
4228 * arm7.cpu (bl): Replace lr with (reg h-gr 14).
4229 (f-imm12,f-offset24,swi,undef): Fix thinko, add `const'.
4230 * thumb.cpu (h-gr-t,h-lr-t,h-sp-t,dnti,h-hiregs): s/MACH/ISA/.
4232 * sid-decode.scm (cgen-decode.c): Call rtl-gen-init!.
4234 1999-03-11 Doug Evans <devans@casey.cygnus.com>
4236 * hardware.scm (<hw-immediate>,mode-ok?): Ensure result is boolean.
4237 (<hw-address>,mode-ok?): unsigned/signed are compatible.
4239 * operand (op:new-mode): Improve error message.
4241 * arm.cpu: Move arm isa into arm7.cpu. Include arm7.cpu, thumb.cpu.
4242 * arm7.cpu: New file.
4244 1999-03-12 Ben Elliston <bje@cygnus.com>
4246 * arm.cpu: Lots of minor fixes after desk checking.
4248 1999-03-11 Doug Evans <devans@casey.cygnus.com>
4250 * thumb.cpu: snapshot of current work
4252 * rtl.scm (rtx-get): Tweak error message.
4254 1999-03-10 Doug Evans <devans@casey.cygnus.com>
4256 * Makefile.am (cos.o,cgen.o,cgen-gh.o): Fix dependencies.
4257 * Makefile.in: Rebuild.
4259 * cos.c (cos_vector_copy): New function.
4260 (_object_copy): Use it.
4262 * mode.scm (mode:eq?): Clean up.
4263 * rtl.scm (cx-new-mode): Copy attributes.
4264 (rtx-get): Don't make copy if <c-expr> with identical mode.
4266 * fr30.cpu (define-arch): Delete default-insn-word-bitsize,
4268 (gr-names): h-gr register names moved here.
4270 (cr-names): h-cr register names moved here.
4272 (dr-names): h-dr register names moved here.
4274 (h-ps): Replace FUN-ACCESS attribute with get/set specs.
4275 (h-sbit,h-ccr,h-scr,h-ilm): Ditto.
4276 * i960.cpu (define-arch): Delete default-insn-word-bitsize,
4278 * m32r.cpu (define-arch): Delete default-insn-word-bitsize,
4280 (gr-names): h-gr register names moved here.
4282 (cr-names): h-cr register names moved here.
4284 (h-accum): Replace FUN-ACCESS attribute with get/set specs.
4285 (h-accums,h-psw): Ditto.
4286 * sparc.cpu (define-arch): Delete default-insn-word-bitsize,
4288 (gr-names): h-gr register names moved here.
4289 (h-gr-indices): Delete.
4290 (sparc32 h-gr): Update. Replace FUN-ACCESS with get/set specs.
4291 (sparc64 h-gr): Ditto.
4292 (h-y): Add get/set specs.
4294 (fp operands): Rewrite.
4295 * sparc32.cpu (h-psr): Replace FUN-ACCESS with get/set specs.
4296 (h-tbr,h-cwp,h-wim): Ditto.
4297 * sparc64.cpu (h-fpsr): Add get/set specs.
4298 * sparccom.cpu (ldd-reg+reg): Load value all at once.
4299 (fp-ld-op): New arg `dest', all callers updated.
4300 (*): Replace `make-di' with `join'.
4302 * sid-cpu.scm (-gen-cpu-reg-access-defns): Use get/set specs if
4304 (gen-semantic-code): Save/restore rtl generator state.
4305 (cgen-cpu.h): Call rtl-gen-init!.
4306 * sid.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
4307 (-gen-ifld-extract-beyond): Ditto.
4308 (<multi-ifield>,gen-ifld-extract): Ditto.
4309 (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
4311 (-hw-gen-set-quiet-pc): Ditto.
4312 (<hw-pc>,gen-write): Ditto.
4313 (-hw-cxmake-get): Ditto. Call getter function if present.
4314 (<hw-register>,cxmake-get-raw): New method.
4315 (<hw-register>,gen-set-quiet-raw): New method.
4316 (-hw-gen-set-quiet): New arg `gstate'.
4317 (hw-fun-access?): Delete.
4318 (gen-reg-access-defn): Output function contents.
4319 (-gen-hw-index-raw): Update call to rtx-c. Update cxmake-get
4321 (-gen-hw-index): Ditto.
4322 (op:read): Update gen-read invocation.
4323 (op:write): Update gen-write invocation.
4324 (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Handle raw-reg
4326 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
4327 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
4328 (<unit>,gen-profile-code): Update to sim.scm version.
4330 * sim-arch.scm (-regs-for-access-fns): New proc.
4331 (-biggest-reg-mode): New proc.
4332 (-gen-arch-reg-access-decls,-gen-arch-reg-access-defns): Rewrite.
4333 * sim-cpu.scm (-gen-hardware-types): Output get/set handlers for
4334 virtual regs separately.
4335 (-gen-cpu-reg-access-defns): Replace fun-access? with new
4337 (gen-semantic-code): Save/restore rtl generator state.
4338 (cgen-cpu.h): Call rtl-gen-init!.
4339 (cgen-cpu.c): Ditto. #include cgen-ops.h.
4340 * sim-model.scm: mach:cpu renamed to mach-cpu. mach:bfd-name
4341 renamed to mach-bfd-name.
4342 * sim.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
4343 (-gen-ifld-extract-beyond): Ditto.
4344 (<multi-ifield>,gen-ifld-extract): Ditto.
4345 (<scalar>,gen-sym-get-macro): Update call to gen-get-macro.
4346 (<scalar>,gen-sym-set-macro): Update call to gen-set-macro.
4347 (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
4349 (hw-fun-access?): Delete.
4350 (-hw-gen-set-quiet-pc): New arg `gstate'.
4351 (<hw-register>,gen-get-macro): Rewrite.
4352 (<hw-register>,gen-set-macro): Rewrite.
4353 (-hw-gen-fun-get,-hw-gen-fun-set): Delete.
4354 (-hw-cxmake-get): New arg `gstate'. Rewrite.
4355 (<hw-register>,cxmake-get-raw): New method.
4356 (-hw-gen-set-quiet): New arg `gstate'. Rewrite.
4357 (<hw-register>,gen-set-quiet-raw): New method.
4358 (-gen-hw-index-raw): Update call to rtx-c. Update cxmake-get
4360 (-gen-hw-index): Ditto.
4361 (<hw-index>): New arg `gstate'.
4362 (-gen-hw-selector): Update call to rtx-c.
4363 (<pc>): New arg `gstate'.
4364 (op:read): Update gen-read invocation.
4365 (op:write): Update gen-write invocation.
4366 (<operand>,cxmake-get): Handle raw-reg.
4367 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
4368 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
4369 (<operand>,gen-set-quiet): Handle raw-reg.
4370 (<operand>,gen-set-trace): Handle raw-reg.
4371 (-gen-mach-data): mach:cpu renamed to mach-cpu.
4373 * desc-cpu.scm (gen-operand-decls): Take nub of operands for
4374 cgen_operand_type enum.
4375 (gen-operand-table): Add operand type enum. Replace pointer to
4376 hardware element with its enum. Null terminate table.
4377 (-gen-cpu-open): Add new `isa' argument to @arch@_cgen_cpu_open.
4378 Build operand table.
4379 * ifield.scm (-ifield-parse): Recognize ISA attribute.
4380 * mach.scm (<arch-data>): New member `isas'.
4381 (adata-isas): New accessor.
4383 (isa-default-insn-word-bitsize): New accessor.
4384 (isa-enum): New proc.
4385 (current-arch-default-insn-word-bitsize): Delete.
4386 (current-isa-list,current-isa-lookup): New procs.
4387 (-arch-parse-isa): New proc.
4388 (-arch-parse): Rewrite.
4389 (-arch-read): Recognize `isas'. Delete `default-insn-word-bitsize'.
4390 (define-arch): Define ISA attribute.
4391 (def-isa-attr!,isa-supports?): New procs.
4392 (<mach>): New member `isas'.
4393 (mach-isas): New accessor.
4394 (-mach-parse): New arg `isas', all callers updated.
4395 (-mach-read): Recognize `isas'.
4396 (arch-finish!): Rewrite.
4397 * opc-ibld.scm (-gen-fget-switch): Add `cd' arg to
4398 @arch@_cgen_get_{int,vma}_operand.
4399 (-gen-fset-switch): Add `cd' arg to @arch@_cgen_set_{int,vma}_operand.
4400 * opc-opinst.scm (-gen-operand-instance): Output operand enum instead
4401 of pointer to table entry.
4402 * opcodes.scm (gen-switch): Handle multiply defined operands.
4403 * operand.scm (op-sort): New proc.
4405 * hardware.scm (<hardware-base>): Rename getters/setters to get/set.
4406 (hw-getter,hw-setter): Renamed from hw-getters,hw-setter.
4407 (hw-enum): Accept symbol argument.
4408 (hardware-builtin!): Delete attribute FUN-ACCESS.
4409 * ifield.scm (ifld-encode-mode,ifld-decode-mode): New procs.
4411 * attr.scm (atlist-source-form): New proc.
4412 (attr-builtin!): New attr `PRIVATE'.
4413 * desc.scm (<keyword>,gen-defn): Make keyword entry table static.
4414 * desc-cpu.scm (-gen-hw-defn): Only output index and value tables
4415 if they have `PRIVATE' attribute.
4416 (gen-hw-table-defns): Output definitions of explicitly defined
4418 * hardware.scm (<keyword>): New member print-name. Rename member
4419 `value' to `values', all uses updated.
4420 (kw-mode,kw-print-name,kw-prefix,kw-values): New procs.
4421 (keyword-parse): Rewrite.
4422 (-keyword-read): New proc.
4423 (define-keyword): New proc.
4424 (-hw-parse-keyword): New proc.
4425 (-hw-parse-indices): Rewrite keyword handling, support new index spec
4427 (-hw-parse-values): Ditto.
4428 (-hw-parse-get,-hw-parse-set): Rewrite.
4429 (hardware-init!): Add new comment define-keyword.
4430 * mach.scm (<arch>): New member `kw-list'.
4431 (arch:kw-list,arch_set-kw-list!): New accessors.
4432 (current-kw-list,current-kw-add!,current-kw-lookup): New procs.
4434 * hardware.scm (<hw-register>,mode-ok?): Rewrite.
4435 * mode.scm (mode-class-integral?): New proc.
4436 (mode-class-float?,mode-class-numeric?): New procs.
4437 (mode-integral?,mode-float?,mode-numeric?): New procs.
4438 (mode-compatible?): New proc.
4439 * opcodes.scm (<ifield>,gen-insert): Update alist arg to
4441 (<ifield>,gen-extract): Ditto.
4442 * rtl.scm (-rtl-simulator?,-rtx-current-obj): Delete.
4443 (<gstate>): New class.
4444 (gstate-simulator?,gstate-set-simulator?!): New accessors.
4445 (gstate-context,gstate-set-context!): New accessors.
4446 (gstate-macro?,gstate-set-macro?!): New accessors.
4447 (gstate-make,gstate-copy): New procs.
4448 (-rtl-current-gstate): New global.
4449 (current-gstate-simulator?): New proc.
4450 (current-gstate-context,current-gstate-macro?): New procs.
4451 (current-gstate,current-gstate-set!): New procs.
4452 (rtl-gen-init!): Rewrite.
4453 (-rtx-valid-types): Add INTMODE, FLOATMODE, NUMMODE.
4454 (tstate-make): New arg `gstate', all callers updated.
4455 (tstate-set-expr-fn!,tstate-set-op-fn!): New accessors.
4456 (tstate-set-cond?!,tstate-set?,tstate-set-set?!): New accessors.
4457 (tstate-gstate,tstate-set-gstate!): New accessors.
4458 (tstate-copy): New proc.
4459 (tstate-new-cond?,tstate-new-set?): Rewrite.
4460 (-rtx-traverse-operands): Handle INTMODE, FLOATMODE, NUMMODE.
4461 (rtx-traverse): New arg `gstate', all callers updated.
4462 (rtx-strdump): New proc.
4463 (-simplify-for-compilation): New arg `gstate', all callers updated.
4464 (semantic-in-out-operands): Ditto.
4465 (semantic-attrs): Ditto.
4466 (rtx-eval): Rewrite. New arg `gstate', all callers updated.
4467 (rtx-eval-with-temps,rtx-eval-with-alist): Ditto.
4468 (rtx-value): Rewrite.
4469 (<c-expr>,gen-name): New method.
4470 (<c-expr>,gen-set-quiet): New arg `gstate', all callers updated.
4471 (<c-expr>,gen-set-trace): New arg `gstate', all callers updated.
4472 (cx-new-mode): New proc.
4473 (-rtx-c-with-tstate): New proc.
4474 (rtx-c,rtx-c-with-temps,rtx-c-with-alist): New arg `gstate', all
4476 (-rtx-mode): Rewrite.
4477 (-rtx-mode-compatible?): New proc.
4478 (<c-expr-temp>): New member `value'.
4479 (cx-temp:value): New accessor.
4480 (<c-expr-temp>,make!): Override default method.
4481 (<c-expr-temp>,cxmake-get): Rewrite.
4482 (<c-expr-temp>,gen-set-quiet): Rewrite.
4483 (<c-expr-temp>,gen-set-trace): Rewrite.
4484 (gen-temp-defs): Use cx-temp:value.
4485 (record-temp!): New arg value, all callers updated.
4486 (cx-temp:cx:make): Delete.
4487 (-cx-temp-dump-stack): New proc.
4488 (rtx-get): New arg `gstate', all callers updated. Do mode
4489 compatibility checks. Ensure result has specified mode.
4490 (rtx-set-quiet): New arg `gstate', all callers updated.
4491 (rtx-set-trace): Ditto.
4492 (s-c-call): New arg `tstate', all callers updated.
4493 (s-c-raw-call): Ditto.
4494 (s-unop,s-binop,s-binop-with-with,s-shop,s-boolifop,s-convop): Ditto.
4495 (s-cmpop,s-if,e-if): Ditto.
4496 (s-subreg): New proc.
4497 (-par-new-temp!): New proc.
4498 (-par-next-temp!): Rewrite.
4499 (-par-replace-set-dests): Use -par-new-temp!.
4500 (s-parallel): Rewrite temp handling. Use -rtx-c-with-state.
4501 (s-sequence): Use -rtx-c-with-state.
4502 * rtx-funcs.scm (*): Update.
4503 (raw-reg:): New rtx function.
4505 (join:,subreg:): New rtx functions.
4507 * insn.scm (<insn>): New members pre-cond-trap, condition,
4508 post-cond-trap, compiled-condition.
4510 * insn.scm (syntax-break-out): Replace eval with current-op-lookup.
4512 * opcodes.scm (<pc>,cxmake-get): New arg `selector'.
4514 * utils-cgen.scm (parse-symbol): New proc.
4515 (parse-string): New proc.
4516 (gen-get-macro,gen-set-macro): New arg `index-args'.
4517 (gen-set-macro2): Ditto. Enclose code in do { } while (0).
4518 Prepend \ to newlines.
4520 * utils.scm (alist-remove-duplicates): Delete.
4522 * sid.scm (sim-init!): Delete private debugging code.
4524 1999-03-10 Frank Ch. Eigler <fche@cygnus.com>
4526 * cgen-sid.scm: New file for C++ simulator application.
4527 * sid-arch.scm: Ditto.
4528 * sid-cpu.scm: Ditto.
4529 * sid-decode.scm: Ditto.
4530 * sid-model.scm: Ditto.
4532 * utils-cgen.scm (gen-mach-sid-name): Remove this accident.
4534 1999-03-05 Ben Elliston <bje@cygnus.com>
4536 * arm.cpu: New file.
4538 1999-03-03 Doug Evans <devans@casey.cygnus.com>
4540 * Makefile.am (CGEN_HOB_INPUT_FILES): Add hardware.scm.
4541 * Makefile.in: Rebuild.
4543 * attr.scm (<integer-attribute>,parse-value-def): Tweak.
4544 (-attr-parse): Validate default value.
4546 * read.scm (-CGEN-VERSION): Change to 0.7.1.
4547 (-CGEN-LANG-VERSION): Ditto.
4548 (-keep-all-machs): Renamed from -keep-all, all uses updated.
4549 (<reader>): New member keep-isa plus accessors.
4550 (-keep-isa-set!,keep-isa-validate!): New procs.
4551 (keep-isa?,keep-isa-atlist?,keep-isa-obj?): New procs.
4552 (common-arguments): New variable.
4553 (cgen-usage,getarg,catch-with-backtrace,option-arg): New procs.
4554 (-debug-repl,continue): New procs.
4555 (-cgen,cgen): New procs.
4556 * cgen-gas.scm: Rewrite.
4557 * cgen-opc.scm: Rewrite.
4558 * cgen-sim.scm: Rewrite.
4559 * cgen-stest.scm: Rewrite.
4561 * gas-test.scm (gas-test-init!): Call opcodes-init!.
4562 (gas-test-finish!): Call opcodes-finish!.
4563 (gas-test-analyze!): Call opcodes-analyze!.
4564 (<hw-asm>): New method test-data.
4565 (<operand>,testdata): Rewrite.
4566 * sim-test.scm (sim-test-init!): Call opcodes-init!.
4567 (sim-test-finish!): Call opcodes-finish!.
4568 (sim-test-analyze!): Call opcodes-analyze!.
4569 (<hw-asm>): New method test-data.
4570 (<operand>,testdata): Rewrite.
4572 1999-03-01 Doug Evans <devans@casey.cygnus.com>
4574 * fixup.scm (reverse!): Define if missing.
4575 * *.scm: Use reverse! instead of list-reverse!.
4577 * utils.scm (leading-id-char?): New proc.
4578 (id-char?): Rewrite.
4579 (chars-until-delimiter): New proc.
4580 * opc-itab.scm (extract-syntax-operands): Rewrite.
4581 (strip-mnemonic): Rewrite.
4582 (compute-syntax): Rewrite.
4584 * pmacros.scm (-pmacro-substr): New proc.
4585 (pmacros-init!): Add builtin .substr.
4587 1999-02-26 Doug Evans <devans@casey.cygnus.com>
4589 * thumb.cpu: New file.
4591 1999-02-24 Doug Evans <devans@casey.cygnus.com>
4593 * Makefile.am (CGENCFLAGS): New variable.
4594 (WITH_HOBBIT): Use automake conditional.
4595 (CGEN_HOB_SRC): New variable.
4596 (libcpu_a_SOURCES): Use $(CGEN_HOB_SRC).
4597 (*.o): Compile with CGENCFLAGS.
4598 (cgen-hob.c): Simplify.
4599 (cgen-nohob.c): New rule.
4600 (hobbit): Renamed from hob.x.
4601 (CLEANFILES): Add cgen-nohob.c.
4602 * Makefile.in: Rebuild.
4603 * doc/Makefile.in: Rebuild.
4604 * configure.in (AM_INIT_AUTOMAKE): Update CGEN version to 0.7.1.
4605 (WITH_HOBBIT): Use AM_CONDITIONAL.
4606 * configure: Rebuild.
4607 * aclocal.m4: Rebuild.
4609 * sim-arch.scm (-gen-arch-reg-access-defns): Replace string-map
4610 with string-write-map.
4612 * sim-cpu.scm (hw-need-storage?): New proc.
4613 (-gen-hardware-types): Use it.
4614 (gen-parallel-exec-elm): Call op-save-index?.
4616 * sim-decode.scm (cgen-decode.c): Call rtl-gen-init!.
4618 * sim.scm (-gen-ifld-extract-base): Use mode:class instead of
4620 (-gen-ifld-extract-beyond): Ditto.
4621 (<integer>): Delete all references.
4622 (<sim-hardware>): Delete.
4623 (hw-profilable?): New proc.
4624 (<hardware-base>): New methods gen-get-macro,gen-set-macro.
4625 (<hw-register>): Rename method get-index-mode to save-index?.
4626 (<hw-register>): New methods gen-get-macro,gen-set-macro.
4627 (<hw-register>,gen-sym-decl): Make virtual.
4628 (<hw-memory>,gen-sym-decl): Make virtual.
4629 (<hw-memory>): Rename method get-index-mode to save-index?.
4630 (<hw-address>,gen-sym-decl): Make virtual.
4631 (<operand>): New method save-index?.
4632 (sim-init!): Delete calls to sim-hw-init!,sim-hw-init-parsers!.
4634 * opc-itab.scm (opc-{parse,insert,extract,print}-handlers): opc-
4635 prefix added. All uses updated.
4637 * opc-opinst.scm (-gen-operand-instance): Output hw enum value
4638 rather than pointer to table entry.
4640 * opcodes.scm: Remove all attribute support, lives in desc.scm.
4641 Remove all hw-asm,op-asm support.
4642 (-gen-parse-number,-gen-parse-address): New procs.
4643 (<keyword>,gen-parse): Redo function name computation.
4644 (<keyword>,gen-print): Ditto.
4645 (<operand>,gen-function-name): Rewrite.
4646 (<operand>,gen-fget,gen-fset,gen-parse,gen-print): Ditto.
4647 (opcodes-init!): Delete call to add-parser!.
4649 * desc-cpu.scm (gen-hw-decls): Rename enum hw_type to cgen_hw_type.
4650 Define enum using hardware semantic name.
4651 (-gen-hw-decl,-gen-hw-defn): New procs.
4652 (gen-hw-table-decls): Use -gen-hw-decl.
4653 (gen-hw-table-defns): Use -gen-hw-defn. Rewrite generation of
4654 CGEN_HW_ENTRY structs.
4655 (gen-operand-table): Output hw's enum, not pointer to table entry.
4656 (-gen-cpu-open): Build table of selected hardware elements.
4658 * desc.scm (-hw-asm-specs,-parse-hw-asm): Delete.
4659 (<hardware> support): Delete.
4660 (<hw-asm>): Delete, moved to hardware.scm.
4661 (normal-hw-asm,hw-asm:parse,hw-asm:print): Delete.
4662 (<hw-asm>,gen-table-entry): New method.
4663 (<hw-asm>,parse!): Delete.
4664 (<keyword>,gen-table-entry): New method.
4665 (<keyword>,parse!): Delete.
4666 (<hw-{register,memory,immediate,address}>): Delete forwarding methods
4667 for gen-decl,gen-defn,gen-ref,gen-init.
4668 (desc-init!): Don't create parser for operand asm specs.
4670 * attr.scm (attr-builtin!): Delete UNSIGNED attribute.
4671 * ifield.scm (<ifield>): New member `mode'.
4672 (<ifield>,make!): New arg `mode'.
4673 (ifld-mode): Rewrite.
4674 (ifld-hw-type): Rewrite.
4675 (<ifield>,min-value): Rewrite.
4676 (<ifield>,max-value): Rewrite.
4677 (-ifield-parse): New arg `mode'.
4678 (-ifield-read): Update.
4679 (define-full-ifield): New arg `mode'.
4680 (define-full-multi-ifield): Ditto.
4681 (-multi-ifield-parse): Ditto.
4682 (-multi-ifield-read): Update.
4683 (define-full-multi-ifield): New arg `mode'.
4684 (ifield-builtin!): Update definition of f-nil.
4685 * simplify.inc (define-normal-ifield): Update call to
4687 (define-normal-multi-ifield): Update call to define-full-multi-ifield.
4688 (define-normal-hardware): Delete arg asm. New args indices, values,
4689 handlers. Update call to define-full-hardware.
4690 (define-simple-hardware,dsh): New pmacros.
4691 (define-normal-operand): Update call to define-full-operand.
4692 * fr30.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
4693 Specify INT/UINT mode instead.
4694 (h-gr,h-cr): Use "indices" instead of "asm".
4695 (h-dr,h-ps): Update keyword syntax.
4696 (h-r13,h-r14,h-r15): Ditto.
4697 (h-nbit,h-zbit,h-vbit,h-cbit): Use dsh instead of dnh.
4698 (h-d0bit,h-d1bit,h-ibit,h-sbit,h-tbit,h-ccr,h-scr,h-ilm): Ditto.
4699 (m4): Fix typo on HASH-PREFIX. Use "handlers" instead of "asm".
4700 (reglist_low_ld,reglist_hi_ld,reglist_low_st,reglist_hi_st): Ditto.
4701 * i960.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
4702 Specify INT/UINT mode instead.
4703 (h-gr): Use "indices" instead of "asm".
4704 (h-cc): Update keyword syntax.
4705 * m32r.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
4706 Specify INT/UINT mode instead.
4707 (h-hi16,h-slo16,h-ulo16): Update.
4708 (h-gr,h-cr): Use "indices" instead of "asm".
4709 (h-accum,h-cond,h-psw,h-bpsw,h-bbpsw,h-lock): Use dsh instead of dnh.
4710 (h-accums): Update keyword syntax.
4711 (hash,hi16,slo16,ulo16): Use "indices" instead of "asm".
4712 * sparc.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
4713 Specify INT/UINT mode instead.
4714 (h-gr-indices): New pmacro.
4715 (h-gr32,h-gr64): Split up from h-gr.
4716 (h-a): Update type spec. Use values instead of asm spec.
4717 (h-icc-[cnvz],h-xcc-[cnvz]): Use dsh instead of dnh.
4718 (h-y,h-annul-p): Ditto.
4719 (h-asr): Update keyword spec.
4720 (h-lo10,h-lo13,h-hi22): Update.
4721 (get-freg-spec,set-freg-spec): New pmacros.
4722 (h-fr32,h-fr64): Split up from h-fr.
4723 (rdd): Comment out get/set specs.
4724 (lo10,lo13,hi22): Use "handlers" instead of "asm".
4725 * sparc32.cpu (h-psr): Use dsh instead of dnh.
4726 (h-s,h-ps,h-pil,h-et,h-tbr,h-cwp,h-ag,h-ec,h-ef,h-fsr): Ditto.
4727 * sparc64.cpu (f-*): Delete UNSIGNED attribute. Default is now
4728 UNSIGNED. Specify INT/UINT mode instead.
4729 (h-*): Use dsh instead of dnh where appropriate.
4730 (h-ixcc): Update type spec. Use "values" instead of "asm".
4731 (h-p,h-membarmask): Ditto.
4732 (membarmask): Use "handlers" instead of "asm".
4734 * hardware.scm (<hardware-base>): New member sem-name,type,indices,
4735 values,handlers,getters,setters plus accessors.
4736 (hw-mode-ok?,hw-default-mode): New procs.
4737 (<hardware-base>): Rename method new-mode to mode-ok?
4738 (<hardware-base>): New method get-index-mode.
4739 (hw-index-mode): New proc.
4740 (pc?): Delete, moved to operand.scm.
4741 (address?): New proc.
4742 (<hardware>): Delete.
4743 (<hw-asm>): Definition moved here from desc.scm.
4744 (keyword-parse): New proc.
4745 (hardware-parsers): Delete.
4746 (-parse-hw-type,-parse-hw-asm,-parse-hw-profile): Delete.
4747 (-hw-parse-indices,-hw-parse-values,-hw-parse-handlers): New procs.
4748 (-hw-parse-get,-hw-parse-set): New procs.
4749 (-hw-parse): Delete args aasm,profile,extra. New args semantic-name,
4750 indices,values,handlers,get,set. Rewrite.
4751 (-hw-read-extra): Delete.
4753 (define-hardware): Don't add object if not selected.
4754 (define-full-hardware): Ditto.
4755 (current-hw-sem-lookup,current-hw-sem-lookup-1): New procs.
4756 (<hw-register>): Member `type' moved to baseclass. Delete member
4758 (<hw-register>,parse!): Rewrite.
4759 (<hw-register>): Delete methods get-rank,get-mode.
4760 (<hw-register>): Method new-mode renamed to mode-ok?
4761 (<hw-register>): New method get-index-mode.
4762 (<hw-pc>,parse!): Rewrite.
4763 (<hw-memory>): Member `type' moved to baseclass. Delete member hw-asm.
4764 (<hw-memory>,parse!): Rewrite.
4765 (<hw-memory>): Delete methods get-rank,get-mode.
4766 (<hw-memory>): Method new-mode renamed to mode-ok?
4767 (<hw-memory>): New method get-index-mode.
4768 (<hw-immediate>): Member `type' moved to baseclass. Delete member
4770 (<hw-immediate>,parse!): Rewrite.
4771 (<hw-immediate>): Delete methods get-rank,get-mode.
4772 (<hw-immediate>): Method new-mode renamed to mode-ok?
4773 (<hw-address>): Delete member hw-asm.
4774 (<hw-address>,parse!): Rewrite.
4775 (<hw-address>): Delete methods get-rank,get-mode.
4776 (<hw-address>): Method new-mode renamed to mode-ok?
4777 (hw-profilable?): Delete.
4778 (hardware-init!): Delete hardware-parsers reference.
4779 Update argument specs of command define-full-hardware.
4780 (hardware-builtin!): Update definitions of hardware builtins.
4781 * operand.scm (<operand>): New members hw-name,mode-name.
4782 Delete member op-asm. New member handlers.
4783 (<operand>,make!): Update.
4784 (op:hw-name,op:mode-name,op:handlers): New procs.
4787 (<operand>): New method get-index-mode.
4788 (<pc>,make!): Update.
4789 (op:new-mode): Rewrite.
4790 (operand-parsers): Delete.
4791 (-operand-parse): Rewrite. Return #f if insn not selected.
4792 (-op-read-extra): Delete.
4793 (-operand-read): Update.
4794 (define-operand,define-full-operand): Update.
4795 (operand-init!): Delete operand-parsers reference.
4796 Update syntax of define-full-operand command.
4798 * insn.scm (-insn-parse): Rewrite. Return #f if insn not selected.
4799 (define-full-insn): Update.
4800 * minsn.scm (-minsn-parse): Rewrite. Return #f if insn not selected.
4801 (define-full-minsn): Update.
4803 * mode.scm (<mode>): New member class.
4804 (mode:class): New proc.
4806 (-mode-parse): New arg class.
4807 (define-full-mode): Update.
4808 (mode-find): Rewrite.
4809 (mode-make-int,mode-make-uint): New procs.
4810 (mode-init!): Update syntax of define-full-mode command.
4811 (mode-builtin!): Update definitions of builtin modes.
4813 * model.scm (<profile>): Delete.
4815 * read.scm (keep-atlist?): New proc.
4816 (keep-multiple?): New proc.
4817 (<parser-list>): Delete.
4818 (add-parser!,parse-spec!): Delete.
4820 * rtl.scm (def-rtx-node): Prepend arg *tstate* to all handlers.
4821 (def-rtx-syntax-node): Ditto.
4822 (-rtx-traverse-debug?): New variable.
4823 (tstate-make): New proc.
4824 (tstate-expr-fn,tstate-op-fn,tstate-cond?,tstate-set?): New procs.
4825 (tstate-new-cond?,tstate-new-set?): New procs.
4826 (-rtx-traverse-normal): Delete args cond?,expr-fn,op-fn. New arg
4827 tstate. All callers updated.
4828 (-rtx-traverse-expr,-rtx-traverse-debug): Ditto.
4829 (-rtx-traverse-list,-rtx-traverse-operands): Ditto.
4830 (-build-operand!): Replace arg cond? with tstate.
4831 (-build-reg-operand!,-build-mem-operand!): Ditto.
4832 (-build-index-of-operand!): Update making of <operand> object.
4833 (s-ifield): New arg tstate. All callers updated.
4834 (hw:): New arg tstate. All callers updated. Replace call to
4835 current-hw-lookup with current-hw-sem-lookup-1.
4836 (s-index-of): New arg tstate. All callers updated.
4838 (-rtx-use-sem-fn?): New proc.
4839 (s-unop,s-binop,s-shop): Use it. Only use semantic mode when using
4841 (s-convop): Only use semantic mode when using semantic cover fns.
4842 (s-cmpop): Call -rtx-use-sem-fn?.
4843 (s-cond,s-case): New arg tstate. All callers updated.
4844 (s-parallel,s-sequence): Ditto.
4846 * rtx-funcs.scm (set,set-quiet:): Use SETRTX to mark the set dest.
4848 * types.scm (<scalar>): Rewrite implementation.
4849 (<integer>): Delete.
4850 (parse-type): Rewrite.
4852 * utils-cgen.scm (parse-handlers): New proc.
4854 * utils.scm (!=): New proc.
4856 Tue Feb 23 12:10:29 1999 Doug Evans <devans@canuck.cygnus.com>
4858 * pmacros.scm (-pmacro-expand): Fix typo.
4860 1999-02-12 Doug Evans <devans@casey.cygnus.com>
4862 * pmacros.scm (-pmacro-hex,-pmacro-upcase,-pmacro-downcase): New procs.
4863 (pmacros-init!): Install builtins .hex, .upcase, .downcase.
4864 * i960.cpu (build-hex2): New pmacro.
4865 (insn-opcode): Simplify.
4866 (insn-opcode2): Ditto.
4868 * cgen-sim.scm (catch-with-backtrace): Comment out debugging printf.
4869 * cgen-stest.scm (catch-with-backtrace): Ditto.
4871 1999-02-11 Doug Evans <devans@casey.cygnus.com>
4873 * pmacros.scm (-pmacro-lookup): Renamed from -pmacro-ref.
4874 All callers updated.
4875 (-pmacro-invoke): New proc.
4876 (-pmacro-sym,-pmacro-str): New procs.
4877 (-pmacro-iota,-pmacro-map,-pmacro-apply): New procs.
4878 (pmacros-init!): Install builtins .iota, .map, .apply.
4879 * sparc.cpu (cc-tests): Add CC_NZ,CC_Z,CC_GEU,CC_LU aliases.
4880 (h-fr): Simplify register name spec.
4881 * sparc64.cpu (cond-move-1): New arg mnemonic. All callers updated.
4882 * utils.scm (num-args-ok?): New proc.
4884 1999-02-10 Doug Evans <devans@casey.cygnus.com>
4886 * pmacros.scm (-pmacro-error): New proc.
4887 (-pmacro-expand): Use it.
4888 (-pmacro-splice): New proc.
4889 (pmacros-init!): Install new builtin .splice.
4891 * sparc.cpu: Include sparc64.cpu when appropriate.
4892 (f-mmask,f-simm11): Moved to sparc64.cpu.
4893 (insn-fmt2): Add FLUSH,FLUSHW,IMPDEP1,IMPDEP2,MEMBAR,MOVCC.
4894 (ANNUL attribute): Delete.
4895 (test-* pmacros): New arg cc, all callers updated.
4896 (uncond-br-sem,cond-br-sem): New arg cc, all callers updated.
4897 * sparc32.cpu (atom-op): Moved to sparccom.cpu and renamed to
4899 (ldstub,swap): Moved to sparccom.cpu.
4900 * sparc64.cpu: Add more insns.
4902 1999-02-09 Doug Evans <devans@casey.cygnus.com>
4904 * sim-cpu.scm (cgen-semantics.c): Replace CGEN_INSN_ATTR with
4906 (cgen-sem-switch.c): Ditto.
4907 * sim-decode.scm (-gen-idesc-decls): struct idesc definition
4908 moved to cgen-engine.h.
4909 (-gen-insn-sem-type): Delete, struct insn_sem mvoed to cgen-engine.h.
4910 (-gen-idesc-init-fn,init_idesc): Lookup insn table via descriptor, not
4911 global. Cache attributes and insn length in IDESC.
4912 * sim-model.scm (-gen-cpu-defns): Generate new func @cpu@_prepare_run.
4913 @cpu@_opcode renamed to @cpu@_get_idata.
4914 (-gen-mach-defns,@mach@_init_cpu): Don't initialize IDESC table here,
4915 done later underneath sim_resume.
4916 (@mach@_mach): Record @cpu@_prepare_run.
4917 * sim.scm (<hardware-base>,cxmake-get): New arg selector, all callers
4919 (-hw-gen-set-quiet-pc): Ditto.
4920 (-hw-cxmake-get,-hw-gen-set-quiet): Ditto.
4921 (<hw-memory>,cxmake-get,gen-set-quiet): Ditto.
4922 (<hw-addr>,cxmake-get): Ditto.
4923 (<hw-iaddr>,cxmake-get): Ditto.
4924 (<pc>,cxmake-get): Ditto.
4925 (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Ditto.
4926 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): Ditto.
4927 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
4928 (<hw-pc>,gen-write): Use hw-selector-default.
4929 (<hw-register>,gen-write): Ditto.
4930 (<hw-memory>,gen-write): Ditto.
4931 (-gen-hw-index-raw,-gen-hw-index): Handle selector.
4932 (-gen-hw-selector): New proc.
4934 * desc.scm: New file.
4935 * desc-cpu.scm: New file.
4936 * opcodes.scm: Split up into several smaller files.
4937 * opc-asmdis.scm: New file.
4938 * opc-ibld.scm: New file.
4939 * opc-itab.scm: New file.
4940 * opc-opinst.scm: New file.
4941 * Makefile.am (desc): New target.
4942 (opcodes): Update args to cgen-opc.scm.
4943 * Makefile.in: Rebuild.
4944 * aclocal.m4: Rebuild.
4945 * config.in: Rebuild.
4946 * configure.in: Update arg to AC_INIT.
4947 Update version number to 0.7.0. Change AM_EXEEXT to AC_EXEEXT.
4948 Update AC_PREREG arg to 2.13. Change AM_PROG_INSTALL to
4950 * configure: Rebuild.
4951 * cgen-gas.scm: Update files to load.
4952 * cgen-opc.scm: Ditto. Reorganize option letters.
4953 * cgen-sim.scm: Update files to load.
4954 * cgen-stest.scm: Ditto.
4955 * dev.scm (cload): New app "DESC".
4956 (load-opc): Update files to load.
4957 (load-gtest,load-sim,load-stest): Ditto.
4959 * attr.scm (bool-attr?): New proc.
4960 (attr-list-enum-list): New proc.
4961 (-attr-sort): Rewrite.
4962 (attr-builtin!): Give ALIAS attribute a fixed index.
4963 * utils-cgen.scm (gen-attr-enum-decl): Call attr-list-enum-list to
4964 calculate attribute enum list.
4965 (gen-attr-mask): Subtract CGEN_ATTR_BOOL_OFFSET from attribute's enum.
4967 * insn.scm (-insn-parse): Renamed from parse-insn.
4969 * hardware.scm (-hw-parse): New arg errtxt, all callers updated.
4972 * mode.scm (-mode-parse): Renamed from parse-mode.
4974 * operand.scm (<operand>): New member `selector'.
4975 (<operand>,make!): Use default selector.
4976 (hw-selector-default): New variable.
4977 (hw-selector-default?): New proc.
4979 * pmacros.scm (pmacros-init!): New proc.
4980 (-pmacro-{make,name,arg-spec,transformer,comment}): New procs.
4981 (-env-set!): Delete.
4982 (-pmacro-expand): New proc apply-macro.
4983 Use it in scan-list,scan. Scan list first, then see if macro
4985 (define-pmacro): Rewrite.
4986 * read.scm (-init-parse-cpu!): Call utils-init!,parse-init!.
4988 * rtl.scm (-simplify-for-compilation): Ensure at least one mach
4989 selected if (current-mach) seen.
4990 (rtx?): Renamed from rtx-uneval?, all callers updated.
4991 (<c-expr>,gen-set-quiet,gen-set-trace): New arg selector, all callers
4993 (<c-expr-temp>,cxmake-get,gen-set-quiet,gen-set-trace): New arg
4994 selector, all callers updated.
4995 (hw:): New arg selector, all callers updated. Delete old comments
4997 (reg:,mem:): Handle selectors
4998 * rtx-funcs.scm (reg:): Handle selectors.
5000 * read.scm: Renamed from cpu.scm.
5001 (<command>): New class.
5002 (<reader>): New member commands.
5003 (reader-add-command!): New proc.
5004 (reader-lookup-command): New proc.
5005 (reader-error,-reader-process-expanded,reader-process): New procs.
5006 (reader-read-file!): New proc.
5007 (include): Call reader-read-file!.
5009 (cpu-load): Call reader-read-file!.
5010 * utils.scm (num-args): New proc.
5011 * simplify.inc: New file.
5012 * *.scm: Delete def-foo procs. Rewrite define-foo/define-full-foo
5013 procs. Move define-normal-foo procs (and abbreviated forms) to
5014 simplify.inc. Install define-foo/define-full-foo commands in foo-init!
5016 * fr30.cpu: Include simplify.inc.
5017 * fr30.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
5018 * i960.cpu: Include simplify.inc.
5019 * m32r.cpu: Include simplify.inc.
5020 * m32r.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
5021 (CGEN_PRINT_NORMAL): Use CGEN_BOOL_ATTR.
5022 * sparc.cpu: Include simplify.inc.
5023 * sparc.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
5024 * utils-cgen.scm (parse-error): Moved to read.scm.
5025 (sanitize): Rewrite.
5026 (utils-init!): New proc.
5028 1999-02-02 Doug Evans <devans@casey.cygnus.com>
5030 * sparc.cpu: New file.
5031 * sparc32.cpu: New file.
5032 * sparc64.cpu: New file.
5033 * sparccom.cpu: New file.
5034 * sparc.opc: New file.
5036 1999-01-27 Frank Eigler <fche@cygnus.com>
5038 * utils.scm (gen-copyright): New proc.
5040 1999-01-27 Doug Evans <devans@casey.cygnus.com>
5042 Parameterize rtl parsing, rather than having lots of little handlers.
5043 * rtl.scm (<rtx-func>): New members arg-types,arg-modes.
5044 Delete member traverse.
5045 (rtx:set-traverse!): Delete.
5046 (-rtx-valid-types,-rtx-valid-matches): New variables.
5047 (-rtx-func-lookup): Take symbol or <rtx-func> object as argument
5048 instead of expression. All callers updated.
5049 (def-rtx-node): New args arg-types,arg-modes.
5050 (def-rtx-syntax-node): Ditto.
5051 (def-rtx-dual-mode): Ditto.
5052 (-rtx-macro-expand-list): Renamed from -rtx-macro-maybe-expand-list.
5053 All callers updated.
5054 (-rtx-macro-expand): Renamed from -rtx-macro-maybe-expand.
5055 All callers updated.
5056 (rtx-macro-expand): New proc.
5057 (-rtx-traverse-check-args): Delete.
5058 (-rtx-traverse-normal): Call -rtx-traverse-expr rather than calling
5059 an rtx specific traverser.
5060 (-rtx-any-mode?,-rtx-symornum?): New procs.
5061 (-rtx-traverse-rtx-list,-rtx-traverse-error): New proc.
5062 (-rtx-traverse-no-mode): Delete.
5063 (-rtx-traverse-syntax-expr,-rtx-traverse-syntax-no-mode): Delete.
5064 (-rtx-traverse-operands): Rewrite.
5065 (-rtx-traverse-expr): Rewrite.
5066 (rtx-traverse): Don't expand macros here, leave for caller to do.
5067 (rtx-simplify): Delete.
5068 (rtx-compile-time-constant?): Rewrite. Handle FALSE/TRUE for boolean
5070 (rtx-true?,rtx-false?): Ditto.
5071 (-rtx-ref-type): Set dest is operand 1 now.
5072 (-simplify-for-compilation): New proc.
5073 (semantic-in-out-operands): Recognize regno as an alias for index-of.
5074 Expand macros before calling rtx-traverse. Sort operands by name
5075 to avoid unnecessary semantic formats.
5076 (semantic-attrs): New proc.
5077 (rtx-uneval?): Handle (<rtx-func> ...).
5078 (s-boolifop): Delete arg mode. All callers updated.
5079 * rtx-funcs.scm (all non-macros): Add arg-type and arg-mode specs.
5080 (eq-attr): New arg obj.
5082 * m32r.cpu (rach): Update calls to andif.
5084 * minsn.scm (-minsn-parse-expansion): Renamed from
5085 parse-minsn-expansion.
5086 (-minsn-parse): Renamed from parse-minsn.
5087 (-minsn-read): Renamed from read-minsn.
5088 (def-minsn): Don't check APPLICATION here.
5089 (def-full-minsn): New proc.
5090 (define-macro-insn): Check APPLICATION here. Expand macros.
5091 (define-normal-macro-insn): Ditto.
5093 * utils.scm (word-value): New arg start-lsb?.
5094 (word-mask,word-extract): Ditto.
5095 (split-bits,powers-of-2): Use integer-expt instead of expt.
5096 (bit-set?): Handle 32 bit values (which are bignums).
5097 (cg-logand,cg-logxor): New functions.
5098 * ifield.scm (<ifield>,field-mask): Update call to word-mask.
5099 (<ifield>,field-value): Update call to word-value.
5100 (<ifield>,min-value): Use integer-expt instead of expt.
5101 (<ifield>,max-value): Ditto.
5103 * hardware.scm (<hw-register>,new-mode): Rename local mode to cur-mode.
5105 * insn.scm (def-full-insn): Discard ALIAS insns if simulator.
5107 Compute raw instruction format in addition to semantic based format.
5108 * iformat.scm: Delete members cti?,sem-in-ops,sem-out-ops.
5109 (<iformat> accessors): Rename accessors to ifmt-*.
5110 (<sformat>): New class.
5111 (fmt-enum): Renamed from fmt:enum.
5112 (-ifmt-search-key): Rewrite.
5113 (-sfmt-search-key): New proc.
5114 (ifmt-analyze): Rename arg include-sem-operands? to compute-sformat?
5115 Compute iformat and sformat search keys.
5116 (ifmt-build): Update.
5117 (sfmt-build): New proc.
5118 (-ifmt-lookup-ifmt!,-ifmt-lookup-sfmt!): New procs.
5119 (ifmt-compute!): Compute instruction format <iformat> based on
5120 instruction fields alone. Compute new semantic format <sformat>
5121 based on instruction fields and semantic information.
5122 (ifmt:lookup): Delete.
5123 * mach.scm (<arch>): New member sfmt-list, plus accessors.
5124 (current-sfmt-list): New proc.
5125 * insn.scm (<insn>): Rename member fmt-tmp to tmp.
5126 Rename member fmt to ifmt. New members fmt-desc, sfmt.
5127 (insn-length,insn-length-bytes): Update.
5128 (insn:mask-length,insn:mask): Update.
5129 (insn-lookup-op): Update.
5130 * gas-test.scm (gas-test-analyze!): Update.
5131 (gen-gas-test): Ditto.
5132 * sim-test.scm (sim-test-analyze!): Update.
5133 (gen-sim-test): Ditto.
5134 * opcodes.scm (gen-operand-instance-table): Update.
5135 (gen-operand-instance-ref): Ditto.
5136 (max-operand-instances): Use heuristic if semantics not parsed.
5137 (ifmt-opcode-operands): Renamed from fmt-opcode-operands.
5138 (opcodes-analyze!): Only scan semantics of building operand instance
5140 * sim-cpu.scm (*) Update calls to <iformat>/<sformat> accessors.
5141 (-gen-extract-ifmt-macro): Renamed from -gen-extract-fmt-macro.
5142 * sim-decode.scm (*) Update calls to <iformat>/<sformat> accessors.
5143 (gen-sfmt-argvars-defns): Renamed from gen-ifmt-argvars-defns.
5144 (gen-sfmt-argvars-assigns): Renamed from gen-ifmt-argvars-assigns.
5145 * sim-model.scm (*) Update calls to <iformat>/<sformat> accessors.
5146 * sim.scm (*) Update calls to <iformat>/<sformat> accessors.
5148 * sim-decode.scm (usable-decode-bit?): Rename from decode-bit?
5149 New arg lsb0? All callers updated.
5150 (decode-bits): New arg lsb0?. All callers updated.
5151 (opcode-slots): Update call to bit-set?. Call integer-expt instead
5153 (-gen-decode-bits): New arg lsb0?. All callers updated.
5154 (build-slots): Call integer-expt instead of expt.
5155 (build-decode-table-entry): Handle crossing word boundaries better.
5156 (-gen-decode-switch): New arg lsb0?. All callers updated.
5157 (-gen-extract-decls): Rename decode format entry from ifmt to sfmt.
5159 * enum.scm (define-enum): Rewrite.
5160 (define-normal-enum): Ditto.
5161 (def-full-insn-enum): New proc.
5162 (define-normal-insn-enum): Rewrite.
5164 * attr.scm (<bitset-attribute>,gen-value-for-defn): Ensure result is
5166 (<{integer,enum}-attribute>,gen-value-for-defn): Ditto.
5168 * dev.scm: Add sid support.
5170 * Makefile.am (opcodes,sim-arch,sim-cpu): New targets.
5171 (CLEANFILES): Add tmp-*.
5172 * Makefile.in: Rebuild.
5174 * doc/Makefile.am: New file.
5175 * doc/Makefile.in: New file.
5176 * doc/cgen.texi: New file.
5177 * Makefile.am (SUBDIRS): Define.
5178 * Makefile.in: Rebuild.
5179 * configure.in: Create doc/Makefile.
5180 * configure: Rebuild.
5182 1999-01-18 Doug Evans <devans@casey.cygnus.com>
5184 * insn.scm (insn:syn): Delete.
5186 1999-01-15 Doug Evans <devans@casey.cygnus.com>
5188 * fr30.cpu (model fr30-1): Add state variables load-regs,
5189 load-regs-pending. Delete h-gr. Clean up operand names of all units.
5190 * m32r.cpu (model m32r/d): Clean up operand names of u-exec.
5191 (model m32rx): Ditto.
5192 (addi): Simplify function unit usage spec.
5193 (ld-plus): Rewrite operand names in function unit usage spec.
5194 (mvtachi,mvtachi-a,mvtaclo,mvtaclo-a,st-plus,st-minus): Ditto.
5195 * sim.scm (<unit>,gen-profile-code): Redo how operand names are
5196 overridden. Allow operand to appear in input and output spec.
5197 (<insn>,gen-profile-code): string-append -> string-list.
5199 * ifield.scm (define-ifield): Call pmacro-expand.
5200 (define-full-ifield,define-normal-ifield): Ditto.
5201 (define-multi-ifield,define-normal-multi-ifield): Ditto.
5203 * sim.scm (gen-argbuf-type): Keep leading part of ARGBUF same for
5204 with-scache and without-scache cases.
5206 1999-01-14 Doug Evans <devans@casey.cygnus.com>
5208 * fr30.cpu (fr30-1): Add state variable h-gr.
5209 Add units u-cti, u-load, u-store, u-ldm, u-stm.
5210 (all insns): First pass at providing cycle counts.
5211 * sim.scm (<unit>,gen-profile-code): Only check for output operands
5212 when initializing unit output operands, ditto for input operands.
5214 * insn.scm (insn-length,insn-length-bytes): New procs.
5215 * mach.scm (-adata-set-derived!): Use them.
5216 * sim-cpu.scm (-gen-sem-case): Ditto.
5218 * sim-cpu.scm (-gen-trace-record-type): PCADDR->IADDR.
5219 (-gen-write-case): Ditto.
5220 (gen-semantic-fn): Ditto. Split into two:
5221 -gen-scache-semantic-fn and -gen-no-scache-semantic-fn. Fix bitrot
5223 (-gen-all-semantic-fns): Renamed from -gen-all-semantics. Handle
5224 scache/no-scache appropriately. All callers updated.
5225 (-gen-sem-case): PCADDR->IADDR.
5226 * sim.scm (gen-argbuf-type): PCADDR->IADDR.
5228 * sim-decode.scm (*): Replace string-append,string-map with
5229 string-list,string-list-map where the result is sufficiently large.
5230 (-gen-decode-insn-table): Go back to simple version for non-scache
5231 case: just record IDESC in decoder tables and leave field extraction
5233 (-gen-decode-switch): Ditto.
5234 (-gen-decode-fn): Ditto.
5235 (-gen-extract-decls): Only emit format enum if with-scache?.
5236 * sim-model.scm (-gen-model-insn-fn): Extract ifields here in
5238 (-gen-model-insn-fns): Don't emit model fns for virtual insns.
5239 (-gen-insn-timing): Ditto.
5240 * sim.scm (gen-argbuf-type): Only output sem_fields union in
5243 * sim.scm (-hw-gen-fun-get): Use GET_<H-NAME> macro.
5244 (-hw-gen-fun-set): Use SET_<H-NAME> macro.
5246 1999-01-12 Doug Evans <devans@casey.cygnus.com>
5248 * cpu.scm (keep-mach-validate!): New proc.
5249 (include): New proc.
5251 * mach.scm (current-arch-mach-name-list): New proc.
5252 (-parse-arch-machs): Always return canonical form.
5253 (def-arch): Validate user specified machs to be kept.
5254 (def-mach-attr!): Simplify.
5256 * opcodes.scm (-opcodes-build-operand-instance-table?): New global.
5257 (option-init!): Initialize it.
5258 (option-set!): Set it.
5259 (gen-insn-table-entry): Emit 0 for operand instance ref if not
5260 output operand instance tables.
5261 (cgen-opc.in): Only output operand instance tables if asked to.
5263 * sim.scm (option-init!,option-set!): Clarify returned value.
5265 * sim.scm (gen-mach-bfd-name): Move from here.
5266 * utils-cgen.scm: To here.
5268 1999-01-11 Doug Evans <devans@casey.cygnus.com>
5270 * fr30.cpu (ilm): Fix comment field.
5271 (cond-branch): Remove explicit setting of COND-CTI, let cgen
5274 * rtl.scm (rtx-simplify,rtx-compile-time-constant?): New procs.
5275 (rtx-true?, rtx-false?): New procs.
5276 * rtx-funcs.scm (annul): Rename vpc to pc.
5277 (-rtx-traverse-if): Improve determination of whether then/else parts
5278 are conditionally executed.
5280 * sim.scm (-gen-argbuf-fields-union): Move definition of union to
5282 (gen-argbuf-type): Simplify generated definition (big sem_fields
5283 union moved outside).
5285 1999-01-11 Ben Elliston <bje@cygnus.com>
5287 * doc/porting.texi: New file.
5289 * doc/intro.texi: New file.
5290 (Layout): Use @example to insert preformatted ASCII text (such as
5291 diagrams). @code is inappropriate here.
5293 1999-01-06 Doug Evans <devans@casey.cygnus.com>
5295 * ifield.scm (-multi-ifield-read): Fix handling of insert/extract.
5297 * m32r.opc (print_hash): Cast dis_info.
5299 * sim-cpu.scm (-gen-hardware-types): Sanitize get/set macros.
5300 * sim.scm (<sim-hardware>,make!): Emit a comment for user-written
5303 1999-01-05 Doug Evans <devans@casey.cygnus.com>
5305 * i960.cpu (f-br-disp): Remove RELOC attribute.
5306 (f-ctrl-disp): Ditto.
5307 (callx-disp): set-quiet -> set for (reg h-gr 2).
5308 (callx-indirect,callx-indirect-offset): Ditto.
5310 * Makefile.am (gas-test): Fix dependencies.
5311 * Makefile.in: Rebuild.
5312 * cgen-gas.asm: File creation args are -<uppercase-letter>.
5313 * gas-test.scm (break-out-syntax,make-file-name): Delete.
5314 (gas-test-analyze!): Use syntax-break-out.
5315 * sim-test.scm (break-out-syntax,make-file-name): Delete.
5316 (sim-test-analyze!): Use syntax-break-out.
5317 (cgen-build.sh): Use gen-file-name.
5318 (cgen-allinsn.exp): Compute and pass all machs to run_sim_test.
5319 * insn.scm (syntax-break-out): New proc.
5320 * utils.scm (gen-file-name): New proc.
5322 * fixup.scm (nil,<?,<=?,>?): Delete.
5324 * utils.scm (count-true): Rewrite.
5326 * slib/sort.scm: Move sort.scm to slib directory.
5329 * iformat.scm (ifmt-compute!): Record empty format.
5331 * rtl.scm (semantic-in-out-operands): Simplify by moving several
5332 internal procs outside. Handle expression register numbers.
5335 * rtx-funcs.scm (annul): Rename new_pc to vpc.
5337 * sim-cpu.scm (-gen-cpu-reg-access-defns): Define access fns for
5339 (-gen-write-case): Pass vpc to SEM_BRANCH_FINI.
5340 (gen-semantic-fn,-gen-sem-case): Ditto.
5341 (cgen-cpu.c): Define WANT_CPU to @cpu@.
5342 (cgen-semantics.c): Ditto.
5343 * sim-decode.scm (-gen-extract-decls): Handle non-with-scache case.
5344 (gen-ifmt-argvars-defns): New proc.
5345 (gen-ifmt-argvars-assigns): New proc.
5346 (-gen-all-extractors): Delete FMT_EMPTY case, now handled like others.
5347 (-gen-decode-fn): Handle non-with-scache case.
5348 (cgen-decode.c): Define WANT_CPU to @cpu@.
5349 * sim-models.scm (-gen-mach-defns): Emit bfd name.
5350 (cgen-model.c): Define WANT_CPU to @cpu@.
5351 * sim.scm (gen-ifld-extract-argvar): New proc.
5352 (<sim-hardware>,make!): Don't emit [GS]ET_H_FOO macros for elements
5353 with FUN-ACCESS specified.
5354 (hw-fun-access?): New proc, as <hardware-base>:fun-access? method.
5355 (<hw-register>,gen-extract): New arg local?.
5356 (<hw-address>,gen-extract): Ditto.
5357 (-hw-cxmake-get): Handle non-with-scache case.
5358 (-hw-gen-set-quiet): Ditto.
5359 (<hw-address>,cxmake-get): Handle non-with-scache case.
5360 (gen-op-extract-argvar): New proc.
5361 (<operand>,gen-record-profile): Rewrite.
5362 (<operand>,gen-profile-code): Rewrite.
5363 (<unit>,gen-profile-code): Use -gen-argfld-ref.
5364 (gen-argbuf-fields-union): New proc.
5365 (gen-argbuf-type): Use it. Handle non-scache case.
5367 * *.scm: class:foo procs renamed to class-foo.
5368 * attr.scm (<attribute>): New member `for'.
5369 (-attr-parse): New first value in list for default if
5371 (non-bool-attr-list,attr:add!): Delete.
5372 (def-attr): Use current-attr-add!.
5373 (atlist-attr-value-no-default): New proc.
5374 (attr-lookup-default): Handle boolean attributes.
5375 (gen-attr-enum): New proc.
5376 (-attr-remove-meta-attrs-alist): New proc.
5377 (attr-nub): New proc.
5378 (current-attr-list-for): New proc.
5379 (current-{ifld,hw,op,insn}-attr-list): New procs.
5380 (attr-builtin!): New proc.
5381 * cpu.scm (keep-obj?): Rewrite.
5382 (-init-parse-cpu!): Call arch-init!.
5383 (-install-builtin!): Call {attr,mode,ifield,insn}-builtin!.
5384 (-finish-parse-cpu!): Call arch-finish!.
5385 * enum.scm (enum-list,enum:add,enum:lookup): Delete.
5386 (def-enum,def-full-enum): Use current-enum-add!.
5387 (gen-obj-list-enums): New proc.
5388 * hardware.scm (hw:add!,hw:lookup): Delete.
5389 (def-hardware,def-hardware-ext): Use current-hw-add!.
5390 (hw:std-attrs,hw:attr-list): Delete.
5391 (hardware-builtin!): Define builtin hardware attributes.
5392 * ifield.scm (ifld:add!,ifld:lookup): Delete.
5393 (def-ifield,def-full-ifield): Use current-ifld-add!.
5394 (ifld:std-attrs,ifld:attr-list): Delete.
5395 (ifield-builtin!): New proc.
5396 * insn.scm (insn:add!,insn:lookup): Delete.
5397 (def-full-insn): Use current-insn-add!.
5398 (insn:std-attrs): Delete.
5399 (insn-builtin!): New proc.
5400 * mach.scm (<arch>): New members attr-list,enum-list,op-list,
5402 (<arch-data>): New member machs.
5403 (current-attr-list,current-enum-list): New procs.
5404 (current-op-list,current-minsn-list): New procs.
5405 (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-add!): Ditto.
5406 (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-lookup):
5408 (-parse-arch-machs): New proc.
5409 (-arch-parse): New arg machs, all callers updated.
5410 (-arch-read): Handle machs spec.
5411 (def-arch): Define MACH attribute here.
5412 (mach-init!,mach-finish!): Not here.
5413 (cpu:add!,cpu:lookup): Delete.
5414 (def-cpu): Use current-cpu-add!.
5415 (<mach>): New member bfd-name.
5416 (-mach-parse): New arg bfd-name, all callers updated.
5417 (-mach-read): Handle bfd-name spec.
5418 (mach:add!,mach:lookup): Delete.
5419 (def-mach): Use current-mach-add!.
5420 (def-mach-attr!): New proc.
5421 (arch-init!): New proc.
5422 (arch-finish!): New proc. Reverse all object lists here.
5423 * minsn.scm (minsn-list,minsn-add!,minsn:lookup): Delete.
5424 (def-minsn): Use current-minsn-add!. Ignore minsn if mach not kept.
5425 (define-normal-macro-insn): Ignore minsn if mach not kept.
5426 * mode.scm (mode-builtin!): New proc.
5427 * model.scm (model:add!,model:lookup): Delete.
5428 (def-model): Use current-model-add!.
5429 * opcodes.scm (insn:attr-list): Delete.
5430 (attr-bool-gen-decl,attr-bool-gen-defn): New procs.
5431 (gen-attr-table-defn): Emit value for default.
5432 (gen-attr-table-defns): Emit bool_attr. Emit ifield attr table.
5433 (op:attr-list): Delete.
5434 (gen-operand-decls,gen-insn-decls): New proc.
5435 (compute-insn-attr-list): Delete.
5436 (cgen-opc.h): Reorganize and simplify.
5437 * operand.scm (-operand-list,operand-list,op:add,op:lookup): Delete.
5438 (def-operand,def-full-operand): Use current-op-add!.
5439 (op:std-attrs): Delete.
5440 (operand-enum): Delete.
5441 (operand-builtin!): Define builtin operand attrs.
5442 * utils-cgen.scm (sanitize): Update calls to lookup procs.
5443 (gen-attr-enum-decl): Use gen-obj-list-enums.
5444 (gen-obj-attr-defn): Renamed from gen-attr-defn, all callers updated.
5446 * fr30.cpu (define-arch): Add machs spec.
5447 (f-i4): SIGNED attribute -> !UNSIGNED.
5448 (f-disp8,f-disp9,f-disp10,f-s10,f-rel9,f-rel12): Ditto.
5449 (HASH-PREFIX): Define operand attribute.
5450 (NOT-IN-DELAY-SLOT): Define insn attribute.
5451 * i960.cpu (define-arch): Add machs spec.
5452 * m32r.cpu (define-arch): Add machs spec.
5453 (h-hi16): Remove UNSIGNED,SIGN-OPT attributes.
5454 (HASH-PREFIX): Define operand attribute.
5455 (FILL-SLOT): Define insn attribute.
5457 Thu Dec 17 17:15:06 1998 Dave Brolley <brolley@cygnus.com>
5459 * fr30.cpu (stilm): Correct mask for and operation.
5461 1998-12-17 Doug Evans <devans@casey.cygnus.com>
5463 * sim-test.scm (cgen-build.sh): Use `mach' to specify machs, not `cpu'.
5464 Replace START/EXIT with start/pass.
5465 (gen-sim-test): Delete ".text".
5467 Wed Dec 16 16:16:39 1998 Dave Brolley <brolley@cygnus.com>
5469 * fr30.cpu (cond-branch): Conditional branches not allowed in delay slots.
5471 Tue Dec 15 17:30:01 1998 Dave Brolley <brolley@cygnus.com>
5473 * fr30.cpu: Add NOT-IN-DELAY-SLOT as appropriate.
5474 (h-sbit): Make it FUN-ACCESS.
5475 (h-gr): Reorder so that general regs are always printed by number.
5477 1998-12-14 James E Wilson <wilson@wilson-pc.cygnus.com>
5479 * i960.cpu (flushreg): Use nop.
5481 1998-12-14 Doug Evans <devans@casey.cygnus.com>
5483 * m32r.cpu (default-alignment): Specify.
5484 * mach.scm (<arch-data>): New member default-alignment.
5485 (adata:default-alignment): New proc.
5486 (current-arch-default-alignment): New proc.
5487 (-arch-parse): New arg default-alignment.
5488 (parse-alignment): New proc.
5489 (-arch-read): Handle default-alignment spec.
5491 * rtx-funcs.scm (attr:): Pass attr-name through gen-c-symbol.
5493 * insn.scm (f-%): Delete.
5494 * sim-cpu.scm (gen-define-fields): Delete support for f-%. Can
5495 be readded if proved useful.
5496 (gen-extract-fields): Ditto. Use gen-ifetch.
5497 * sim.scm (<hw-memory>,cxmake-get): Pass pc to GETMEM*.
5498 (<hw-memory>,gen-set-quiet): Pass pc to SETMEM*.
5500 Mon Dec 14 16:20:59 1998 Dave Brolley <brolley@cygnus.com>
5502 * fr30.cpu (div2): Set zbit properly when remainder not zero.
5504 1998-12-14 Dave Brolley <brolley@cygnus.com>
5506 * fr30.cpu: Remove stub macros.
5507 (div1): Shift bits from mdl into mdh. Don't use addc/subc.
5508 (div2): Don't use addc/subc.
5510 1998-12-11 Doug Evans <devans@casey.cygnus.com>
5512 * utils-cgen.scm (gen-obj-sanitize): Only catch spelling errors
5515 Thu Dec 10 18:37:34 1998 Dave Brolley <brolley@cygnus.com>
5517 * fr30.cpu (div0s,div0u,div1,div2,div3,div4s): Implemented.
5519 Thu Dec 10 12:28:53 1998 Doug Evans <devans@canuck.cygnus.com>
5521 * cpu.scm (keep-all?): New proc.
5522 (assert-keep-all): Use it.
5523 * opcodes.scm (gen-ifmt-table-1): Use gen-obj-sanitize.
5524 * utils-cgen.scm (gen-obj-sanitize): Handle macro-insns.
5525 Check for spelling errors.
5527 1998-12-09 Doug Evans <devans@casey.cygnus.com>
5529 * rtl.scm (s-convop): Call -rtx-sem-mode.
5531 Tue Dec 8 10:58:38 1998 Doug Evans <devans@canuck.cygnus.com>
5533 * hardware.scm (-parse-hw-type): parse! no longer returns a result.
5534 (-parse-hw-profile): Ditto.
5535 (<hw-register>, parse!): Return `void' result.
5536 (<hw-pc>, parse!): Ditto.
5537 (<hw-memory>, parse!): Ditto.
5538 (<hw-immediate>, parse!): Ditto.
5539 (<hw-address>, parse!): Ditto.
5541 * ifield.scm (-ifield-parse): Validate encode/decode fields.
5542 (-ifld-parse-encode-decode): New proc.
5543 (-ifld-parse-encode,-ifld-parse-decode): New proc.
5544 (-multi-ifield-parse): Set encode/decode to #f.
5545 (ifld:decode-mode): New proc.
5546 * utils.scm (nub): Rewrite.
5547 * operand.scm (op-nub): Rewrite.
5548 * sim.scm (<ifield>, gen-type): Rewrite.
5549 (-gen-ifld-argbuf-defn): New proc.
5550 (gen-ifld-extract,gen-ifld-trace-extract): New procs.
5551 (<sim-hardware>): Forward gen-trace-extract onto `type'.
5552 Ditto for needed-iflds. gen-argbuf-defn renamed from gen-argbuf-elm.
5553 (<hardware-base>): New method needed-iflds. gen-argbuf-defn
5554 renamed from gen-argbuf-elm, return "". Rewrite gen-extract.
5555 New method gen-trace-extract.
5556 (<hw-register>): New method needed-iflds. gen-argbuf-defn renamed
5557 from gen-argbuf-elm, return "" if not caching register address.
5558 Rewrite gen-extract. New method gen-trace-extract.
5559 (<hw-address>): New methods needed-iflds, gen-argbuf-defn,
5560 gen-extract, gen-trace-extract, cxmake-get.
5561 (<hw-iaddress>): New method cxmake-get.
5562 (op-needed-iflds): New proc.
5563 (<operand>): Delete methods gen-argbuf-elm, gen-extract.
5564 (-gen-op-argbuf-defn): New proc.
5565 (gen-op-extract): Renamed from op:extract.
5566 (gen-op-trace-extract): Renamed from op:trace-extract.
5567 (fmt-extractable-operands): Renamed from fmt-semantic-operands
5569 (gen-argbuf-elm): Rewrite.
5570 * sim-decode.scm (-gen-record-args): Update.
5572 * sim.scm (c-cpu-macro): Renamed from cpu-deref. All uses changed.
5574 * pmacros.scm (-pmacro-expand): Handle procedural macros in
5575 argument position. Flag symbolic macros in function position as
5577 (define-pmacro): Handle quoting in definition of symbolic macros.
5578 (pmacro-trace): Call -pmacro-expand, not -pmacro-ref.
5580 Tue Dec 8 13:06:44 1998 Dave Brolley <brolley@cygnus.com>
5582 * fr30.opc (parse_register_list): Account for reverse masks
5584 (print_register_list): Ditto.
5585 (parse_low_register_list_ld): New function.
5586 (parse_hi_register_list_ld): New function.
5587 (parse_low_register_list_st): New function.
5588 (parse_hi_register_list_st): New function.
5589 (print_hi_register_list_ld): New function.
5590 (print_hi_register_list_st): New function.
5591 (print_low_register_list_ld): New function.
5592 (print_low_register_list_st): New function.
5593 * fr30.cpu (ldr15dr): Implement workaround.
5594 (ldm0,ldm1,stm0,stm1): Implemented.
5596 1998-12-08 Doug Evans <devans@casey.cygnus.com>
5598 * configure.in: Rename --with-hobbit to --with-cgen-hobbit.
5599 * configure: Regenerate.
5600 * Makefile.am (WITH_HOBBIT): Update.
5601 (cgen-hob.c): Remove Makefile dependency.
5602 (cgen.o): Depend on cgen-gh.h, config.h.
5603 * Makefile.in: Regenerate.
5604 * aclocal.m4: Regenerate.
5606 1998-12-07 James E Wilson <wilson@wilson-pc.cygnus.com>
5608 * i960.cpu, i960.opc: New files.
5610 Mon Dec 7 14:30:24 1998 Dave Brolley <brolley@cygnus.com>
5612 * fr30.opc (parse_register_number): New function.
5613 (parse_register_list): New function.
5614 (parse_low_register_list): Use parse_register_list.
5615 (parse_hi_register_list): Use parse_register_list.
5616 * fr30.cpu (sth): Fix assembler syntax. Implement more
5619 Fri Dec 4 16:07:13 1998 Doug Evans <devans@canuck.cygnus.com>
5621 * sim-cpu.scm (cgen-sem-switch.c): Update definition of TRACE_RESULT.
5622 * sim-decode.scm (-gen-record-args): Update call to TRACE_EXTRACT.
5623 * sim.scm (-op-gen-set-trace): Update call to TRACE_RESULT.
5624 (-op-gen-set-trace-parallel): Ditto.
5625 (gen-argbuf-type): New ARGBUF members trace_p,profile_p;
5627 * fr30.cpu (call,calld): Fix setting of pc.
5628 (f-op5): Fix start bit number.
5630 Fri Dec 4 17:06:28 1998 Dave Brolley <brolley@cygnus.com>
5632 * fr30.cpu (st): Fix operand ordering. Implement more
5635 Thu Dec 3 23:59:40 1998 Doug Evans <devans@canuck.cygnus.com>
5637 * ifield.scm (ifld:mode,ifld:hw-type): New procs.
5638 * iformat.scm (fmt-opcode-operands): Move to opcodes.scm.
5639 (fmt-semantic-operands): Move to sim.scm.
5640 * opcodes.scm (fmt-opcode-operands): Moved here from iformat.scm.
5641 * operand.scm (<hw-index>): New member `name'. All builders updated.
5642 (<hw-index>): New method get-name.
5643 (op-profilable?): Moved to sim.scm.
5645 * sim.scm (fmt-semantic-operands): Moved here from iformat.scm.
5646 (op-profilable?): Moved here from operand.scm.
5647 (gen-extract-type): Delete.
5648 (c-argfld-macro): Renamed from c-ifield-macro. All uses updated.
5649 (-gen-argfld-ref): New proc.
5650 (-gen-ifld-argfld-name): New proc.
5651 (gen-ifld-argfld-ref): Renamed from -gen-ifld-ref. All uses updated.
5652 (-gen-ifld-decoded-val): Renamed from -gen-ifld-raw-val.
5653 (-gen-hw-index-argfld-name,-gen-hw-index-argfld-ref): New procs.
5654 (<hardware-base>): Delete method gen-extract-type. New method
5656 (<hw-register): Ditto. Update method gen-extract.
5657 (<operand>, method gen-argbuf-elm): Rewrite.
5658 * rtl.scm (semantic-in-out-operands): Handle (ifield f-name).
5659 (s-cmpop): Fix handling of eq,ne for unsigned modes.
5660 * rtx-funcs.scm (eq,ne,lt,le,gt,ge,ltu,leu,gtu,geu): Update.
5662 * sim-decode.scm (-gen-record-args): Tweak.
5664 * sim.scm (gen-argbuf-elm): Handle case of all constant opcode fields.
5666 Thu Dec 3 14:23:27 1998 Dave Brolley <brolley@cygnus.com>
5668 * doc/porting: Fix typo: gas->sim.
5669 * fr30.opc (print_m4): New function.
5670 * fr30.cpu: Implemented many insns.
5672 Thu Dec 3 00:03:16 1998 Doug Evans <devans@canuck.cygnus.com>
5674 * rtl.scm (build-reg-operand!): Remove redundant setting of hw-name.
5676 * fr30.cpu (f-rel9): Delete RELOC attribute.
5677 (f-rel12): Add PCREL-ADDR attribute.
5678 (label9): Make an h-iaddr, not h-uint. Delete asm print spec.
5679 (label12): Delete PCREL-ADDR attribute. Make an h-iaddr, not h-sint.
5680 * fr30.opc (print_label9): Delete.
5682 * iformat.scm (ifmt-analyze): Check attributes derived from semantic
5683 code for CTI indicators.
5684 * insn.scm (insn-cti?): Simplify.
5685 * utils-cgen.scm (atlist:cti?): New proc.
5687 1998-11-30 Doug Evans <devans@casey.cygnus.com>
5689 * fr30.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
5690 (f-i20-4,f-i20-16,f-i20): New fields.
5696 * fr30.opc (CGEN_DIS_HASH_SIZE,CGEN_DIS_HASH): Define in opc.h.
5697 * m32r.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
5698 * mach.scm (arch-data): Ditto.
5699 (current-arch-default-insn-word-bitsize): Renamed from
5700 current-arch-default-insn-bitsize [ya, that's a pretty long name].
5701 (-arch-read): Update.
5703 * hardware.scm (hw:attr-list): Move here ...
5704 * opcodes.scm: ... from here.
5706 * ifield.scm (fld:bitrange): Delete.
5707 (fld:word-offset,fld:word-length): New procs.
5708 (ifield?): Use class-instance.
5709 (<ifield>, method field-start): Rewrite.
5710 (ifld:enum): New proc.
5711 (<ifield>, methods field-mask,field-value): Rewrite.
5712 (-ifield-parse): Rewrite.
5713 (<multi-ifield> support): Rewrite.
5714 (ifld-beyond-base?): Rewrite.
5715 (ifld:std-attrs): New variable.
5716 (ifld:attr-list): New proc.
5717 * iformat.scm (-compute-insn-mask): Rewrite.
5718 * insn.scm (-parse-insn-format): New arg errtxt, all callers updated.
5720 (-parse-insn-format-symbol,-parse-insn-format-list): New procs.
5721 * opcodes.scm (<hardware>): No longer forward gen-insert,gen-extract
5723 (<operand>): Ditto. Forward onto index instead.
5724 (gen-ifld-decls,gen-ifld-defns): New procs.
5725 (ifld:insert,ifld:extract): New procs.
5726 (<ifield>): New methods gen-insert, gen-extract.
5727 (<multi-ifield>): Ditto.
5728 (<hw-index>): Forward gen-insert,gen-extract onto value.
5729 (<hw-asm>): Delete insert/extract support.
5730 (<hw-register,hw-memory,hw-immediate>): Ditto.
5731 (gen-hash-defines): Use string-list.
5732 Define CGEN_MAX_IFMT_OPERANDS.
5733 (gen-switch): Use string-list,string-list-map.
5734 (gen-fget-switch,gen-fset-switch): Use string-list.
5735 (gen-parse-switch,gen-insert-switch): Ditto.
5736 (gen-extract-switch,gen-print-switch): Ditto.
5737 (gen-insert-switch,gen-extract-switch): New local `total_length'.
5738 (gen-ifmt-table-1,gen-ifmt-table): New procs.
5739 (gen-ifmt-entry): Renamed from gen-iformat-entry, rewrite.
5740 (gen-ivalue-entry): New proc.
5741 (gen-insn-table-entry): Use string-list. Update iformat,ivalue
5742 computation. Use 0 for operand ref table if ALIAS insn.
5743 (gen-minsn-table-entry): Use string-list.
5744 (gen-macro-insn-table): Temporarily emit format tables for ALIAS insns.
5745 (gen-opcode-open): Record address of ifield table.
5746 (cgen-opc.h): Call gen-ifld-decls.
5747 (cgen-opc.in): Call gen-ifld-defns, gen-ifmt-table.
5748 * types.scm (<bitrange>): New members word-offset,word-length.
5749 Delete member total-length. Delete methods start,mask,value.
5750 (bitrange:word-offset,bitrange:word-length): New procs.
5751 * sim-cpu.scm (gen-define-fields): Simplify.
5752 (gen-extract-fields): Simplify.
5753 * sim.scm (<ifield>, gen-ifld-extract): Rewrite.
5754 (<ifield>): New methods gen-ifld-extract-decl.
5755 Delete method gen-ifld-extract-beyond.
5756 (<multi-ifield>): New methods gen-ifld-extract-decl.
5757 (<multi-ifield>, method gen-ifld-extract): Implement.
5758 (-gen-ifld-extract-base,-gen-ifld-extract-beyond): New procs.
5759 (gen-ifld-exttact,gen-ifld-extract-beyond): Delete.
5761 * rtl.scm (-rtx-traverse-no-mode): Process operands.
5762 (-rtx-traverse-syntax-no-mode): New proc.
5763 (semantic-in-out-operands): Watch for `delay' and add DELAY-SLOT attr.
5764 (s-ifield): New proc.
5765 (s-shop): Don't prepend `unsigned' for unsigned modes.
5766 * rtx-funcs.scm (ifield): New rtx function.
5767 (ref,symbol): Use standard -rtx-traverse-syntax-no-mode.
5768 (delay): New rtx function.
5769 * insn.scm (insn:std-attrs): Add DELAY-SLOT.
5771 * cos.scm (-elm-make-method-getter): Fix typo.
5773 * utils.scm (backslash): Handle lists of strings.
5775 Thu Nov 26 11:47:29 1998 Dave Brolley <brolley@cygnus.com>
5777 * fr30.cpu (f-rel9): Correct for pc+2.
5778 (label9): Use print_label9.
5779 * fr30.opc (print_label9): New function.
5781 Tue Nov 24 11:19:35 1998 Dave Brolley <brolley@cygnus.com>
5783 * fr30.cpu: Change $r13,$r14,$r15 to uppercase.
5784 * fr30.opc (parse_low_register_list): Renamed.
5785 (parse_hi_register_list): Renamed.
5786 (print_hi_register_list): Renamed.
5787 (print_low_register_list): Renamed.
5789 Mon Nov 23 18:26:36 1998 Dave Brolley <brolley@cygnus.com>
5791 * fr30.cpu (f-rel9): Now a pc relative offset.
5793 1998-11-23 Doug Evans <devans@casey.cygnus.com>
5795 * opcodes.scm (op-asm): Move to here, from operands.scm.
5796 (<op-asm>, method parse!): Validate arguments.
5797 (<operand>, method gen-function-name): Fix thinko.
5798 * operand.scm (<operand>, method make!): Don't set op-asm here.
5799 * utils.scm (list-elements-ok?): New proc.
5801 * opcodes.scm: Clean up pass.
5803 1998-11-20 Doug Evans <devans@tobor.to.cygnus.com>
5805 * fr30.cpu (int): Defer saving of ps,pc and setting ibit,sbit to
5806 the fr30_int function.
5807 (h-cr): Remove PROFILE,CACHE-ADDR attributes.
5808 (h-dr): Add FUN-ACCESS attribute.
5810 1998-11-20 James E Wilson <wilson@wilson-pc.cygnus.com>
5812 * sim-model.scm (-gen-mach-defns): Use gen-sym instead of obj:name
5813 for C symbol for models array.
5815 Thu Nov 19 15:57:45 1998 Dave Brolley <brolley@cygnus.com>
5817 * fr30.opc (parse_reglist_low): New function.
5818 (parse_reglist_hi): New function.
5819 (print_reglist_low): New function.
5820 (print_reglist_hi): New function.
5821 * fr30.cpu: Finish remaining insn stubs.
5823 1998-11-19 Doug Evans <devans@tobor.to.cygnus.com>
5825 * sim.scm (-gen-extract-word): Handle fields shorter than entire word.
5827 * fr30.cpu (ldi32m): Don't use for disassembly.
5829 Wed Nov 18 21:34:41 1998 Dave Brolley <brolley@cygnus.com>
5831 * fr30.cpu (int): Implement it.
5833 1998-11-18 Doug Evans <devans@casey.cygnus.com>
5835 * rtx-funcs.scm (nop): Fix C code.
5837 * rtl.scm (semantic-in-out-operands): Fix setting of sem-attrs.
5839 * fr30.cpu (f-i32): New ifield.
5842 (ldi32m): New macro insn.
5843 (inte): Provide simple version for now.
5845 * sim-arch.scm: New file.
5846 * sim.scm: Move architecture support generation to sim-arch.scm.
5847 * cgen-sim.scm: Load sim-arch.scm.
5850 * hardware.scm (pc?) New proc.
5851 (class <hardware-base>): Rewrite method 'pc?.
5852 (class <hardware>): Forward 'pc? to the hardware type.
5853 (class <hw-pc>): New method 'pc?.
5855 Add support for variable length ISAs.
5856 * ifield.scm (ifld-beyond-base?): New proc.
5857 * m32r.cpu: Remove integral-insn? spec.
5858 * mach.scm (arch:derived,arch:set-derived!): New procs.
5859 (arch:app-data,arch:set-app-data!): New procs.
5860 (class <arch>): New members derived, app-data.
5861 (class <cpu>): Delete member integral-insn?.
5862 (cpu:integral-insn?): Delete.
5863 (-cpu-parse): Delete arg integral-insn?. All callers updated.
5864 (-cpu-read): Delete integral-insn? support.
5865 (state:decode-assist): Delete.
5866 (state:int-insn?): Delete.
5867 (<derived-arch-data>): New class.
5868 (-adata-set-derived!): New proc.
5869 (mach-finish!): Call it.
5870 * opcodes.scm (<hw-asm>, method gen-extract): Pass pc to C handler.
5871 (gen-operand-instance): Add COND_REF support.
5872 (gen-operand-instance-table): Ditto.
5873 (gen-hash-defines): Update.
5874 (gen-extract-switch): Update type of `insn_value' arg.
5875 (gen-opcode-open): Update type of `value' arg of dis_hash_insn.
5876 * rtl.scm (-rtx-ref-type): Renamed from -rtx-set?. All callers
5878 (semantic-in-out-operands): Compute UNCOND-CTI,COND-CTI from rtl.
5879 * sim-cpu.scm (gen-define-fields): Create vars to hold insn value
5880 beyond the base insn (for large insns).
5881 (-gen-extract-beyond-var-list): New proc.
5882 (gen-extract-fields): Handle large insns.
5883 (-gen-write-case): Update sem_arg computation.
5884 Update initial vpc computation.
5885 (gen-semantic-fn): Ditto. Update type of `insn'.
5886 (-gen-sem-case): Update sem_arg computation.
5887 Update initial vpc computation.
5888 * sim.scm (<ifield>, gen-ifld-extract): Renamed from `extract'.
5889 (-gen-extract-word): New proc.
5890 (<ifield>): New method gen-ifld-extract-beyond.
5891 (gen-ifld-extract-beyond): New proc.
5892 * types.scm (bitrange-overlap?): New proc.
5894 * utils.scm (bits->bytes): New proc.
5895 (bytes->bits): New proc.
5897 Move extraction support into decoder.
5898 * sim-cpu.scm (-gen-record-args,-gen-record-profile-args,
5899 -gen-extractor,-gen-all-extractors,cgen-extract.c): Move extraction
5900 support to sim-decode.scm.
5901 * sim-decode.scm (-gen-decode-insn-table): Change decoder data to
5902 be array of IDESC,FMT entries. Make the array const.
5903 (-gen-gcc-label-table): Make array const.
5904 (-gen-decode-switch): Branch to extraction code after insn has been
5906 (-gen-decode-insn-globals): Delete extract handler from
5908 (gen-decode-fn): Add extraction support.
5909 (-gen-sem-fn-decls): Delete extraction fn decls.
5910 (-gen-idesc-decls): Update @cpu@_decode decl.
5911 (-gen-idesc-init-fn): Delete extraction support.
5912 (-gen-extract-decls): New proc.
5914 * sim-cpu.scm (cgen-sem-switch.c): Update switch test.
5915 (sim-finish!): Surround pbb only code with #if WITH_SCACHE_PBB.
5917 * sim-decode.scm (build-decode-table-entry): New arg invalid insn.
5918 All callers updated.
5919 (table-entry:make): Record insn value as insn object, not name.
5922 * hobbit.scm (path_basename): Renamed from `basename' to avoid
5923 collision with C function.
5924 (path_dirname): Similarily.
5925 * hobbit.c,hobbit.h: Rebuild.
5927 Wed Nov 18 11:26:17 1998 Dave Brolley <brolley@cygnus.com>
5929 * fr30.cpu (dir2r15-predec-stub): Reference to R15 must be indirect.
5931 Mon Nov 16 19:19:50 1998 Dave Brolley <brolley@cygnus.com>
5933 * fr30.cpu: Implement more instruction stubs.
5935 Thu Nov 12 19:20:28 1998 Dave Brolley <brolley@cygnus.com>
5937 * fr30.cpu: Implement more instruction stubs.
5939 Tue Nov 10 10:53:55 1998 Doug Evans <devans@canuck.cygnus.com>
5941 * rtl.scm (-rtx-expr-mode-name): Handle sequence locals.
5943 * rtx-funcs.scm (zflag:,zflag,nflag:,nflag): New rtx fns.
5945 * operand.scm (<pc>, method make!): FAKE renamed to SEM-ONLY.
5946 (op:std-attrs): Ditto.
5947 * opcodes.scm (gen-operand-instance): Ditto.
5948 (gen-switch): Ditto.
5949 * m32r.cpu (condbit,accum): Update.
5950 * fr30.cpu (nbit,vbit,zbit,cbit): Update.
5952 Mon Nov 9 14:30:51 1998 Doug Evans <devans@seba.cygnus.com>
5954 * enum.scm (-enum-read): Fix typo.
5956 * iformat.scm (-ifmt-search-key): Simplify a little.
5958 Mon Nov 9 12:07:56 1998 Dave Brolley <brolley@cygnus.com>
5960 * doc/porting: semantics.c -> sem.c.
5961 * Makefile.in: Regenerate.
5962 * fr30.cpu (add): Change ADD to add. Add more registers and set
5963 status bits on 'add' instruction.
5965 Fri Nov 6 18:15:05 1998 James E Wilson <wilson@wilson-pc.cygnus.com>
5967 * sim.scm (-gen-arch-model-decls): Default MAX_UNITS to 1 instead
5970 Fri Nov 6 17:43:16 1998 Doug Evans <devans@seba.cygnus.com>
5972 * minsn.scm (minsn:enum): Update, call current-arch-name.
5974 * pmacros.scm (-pmacro-expand): Make `cep' a variable.
5976 * Makefile.am (CGEN_HOB_INPUT_FILES): Add pmacros.scm,enum.scm,
5977 mach.scm,model.scm,types.scm,ifield.scm,minsn.scm.
5978 (ARCH,CGEN,CGENFLAGS): New variables.
5979 (gas-test,sim-test): New rules.
5980 * Makefile.in: Rebuild.
5981 * configure.in (arch): Define.
5982 * configure: Rebuild.
5984 * cgen-hob.scm (*UNSPECIFIED*): Renamed from UNSPECIFIED.
5985 * All .scm files: Ditto.
5987 * dev.scm: Fix gas-test call to cpu-load.
5988 * gas-test.scm: Clean up pass to remove bit-rot.
5989 * sim-test.scm: Ditto.
5991 * enum.scm (read-enum): Fix typo in `vals' handling.
5993 * hardware.scm (-parse-hw-type): Fix typo.
5994 (parse-hardware): Rename `asm' to `aasm' to avoid GCC reserved word.
5995 (def-hardware,define-normal-hardware): Ditto.
5997 * hobbit.scm (*case-sensitive-flag*): New configuration variable.
5998 (display-var): Use it.
5999 * hobbit.c: Rebuild.
6000 * hobbit.h: Rebuild.
6002 * ifield.scm (-ifield-read): Rename local `length' to `length-' to
6003 avoid hobbit problem.
6004 * mach.scm (-cpu-read): Rename local `parallel-insns' to
6005 `parallel-insns-' to avoid hobbit problem.
6007 Fri Nov 6 17:19:12 1998 Doug Evans <devans@canuck.cygnus.com>
6009 * m32r.opc (parse_hi16): Fix call to cgen_parse_address.
6010 (parse_slo16,parse_ulo16): Ditto.
6011 * opcodes.scm (<hw-address>, method gen-parse): Ditto.
6013 Thu Nov 5 13:04:53 1998 Doug Evans <devans@canuck.cygnus.com>
6015 * Makefile.am (GUILELDFLAGS,GUILELDADD): New variables.
6016 (cgen_LDFLAGS,cgen_LDADD,hob.x): Use them.
6017 * Makefile.in: Rebuild.
6018 * insn.scm (define-normal-insn): Expand pmacros.
6019 * mode.scm (<mode>): New member `host?'. All uses updated.
6020 (mode:host?): New proc.
6021 * rtl.scm (define-rtx-node): Make a syntax proc, not a macro.
6022 (define-rtx-syntax-node,define-rtx-macro-node): Ditto.
6023 (define-rtx-dual-mode): Ditto.
6024 (s-index-of): New proc.
6025 (s-unop): Use plain C for host mode operations.
6026 (s-binop,s-shop,s-boolifop,s-cmpop): Ditto.
6027 * rtx-funcs.scm (index-of): New rtx function.
6028 * sim.scm (<hw-index>): New method cxmake-get.
6030 Wed Nov 4 23:58:08 1998 Doug Evans <devans@seba.cygnus.com>
6032 * sim-cpu.scm (-gen-engine-decls): Delete.
6034 Wed Nov 4 18:40:47 1998 Dave Brolley <brolley@cygnus.com>
6036 * doc/rtl (Example): Correct Typo.
6037 * doc/porting: Add 'make dep' step to opcodes port instructions.
6038 * fr30.opc: New file.
6039 * fr30.cpu: New file.
6041 Wed Oct 28 13:36:15 1998 Doug Evans <devans@canuck.cygnus.com>
6043 * configure.in: Handle guile $exec_prefix = $prefix/foo.
6044 * Makefile.am (GUILEINCDIR): New variable.
6046 * configure: Regenerate.
6047 * Makefile.in: Ditto.
6048 * aclocal.m4: Ditto.
6050 Mon Oct 19 13:19:34 1998 Doug Evans <devans@seba.cygnus.com>
6052 * sim-cpu.scm (cgen-extract.c): Delete #include cpu-sim.h
6053 (cgen-semantics.c): Ditto.
6054 * sim-decode.scm (cgen-decode.c): Delete #include cpu-sim.h,cpu-opc.h.
6055 * sim-model.scm (cgen-model.c): Ditto.
6056 * sim.scm (cgen-arch.h): Delete #include @arch@-opc.h.
6057 (cgen-arch.c): Delete #include cpu-sim.h,cpu-opc.h.
6059 * opcodes.scm (read-cpu.opc): Handle empty file.
6061 * cos.scm (-elm-make-method-setter): Fix typo.
6063 * cpu.scm (-init-parse-cpu!): Call types-init!.
6064 (-finish-parse-cpu!): Call types-finish!.
6065 * ifield.scm (<ifield>): Delete members start,length.
6066 New member bitrange.
6067 (<ifield>, methods field-start,field-length): Update.
6068 (fld:start): New arg insn-len. All callers updated.
6069 (<ifield>, methods field-mask,field-value): Update.
6070 (-ifield-parse): Update.
6071 (ifield-init!): Update.
6072 * iformat.scm (compute-insn-length): Simplify.
6073 (compute-insn-mask): Update.
6074 * insn.scm (insn:value): Update.
6075 * mach.scm (<arch-data>): New members default-insn-bitsize,insn-lsb0?.
6076 (current-arch-default-insn-bitsize): New proc.
6077 (current-arch-insn-lsb0?): New proc.
6078 (-arch-parse,-arch-read): Update.
6079 (<cpu>): New member file-transform.
6080 (-cpu-parse,-cpu-read): Update.
6081 * opcodes.scm (<hw-asm>, method gen-extract): Pass ex_info to handler.
6082 (gen-hash-defines): Define CGEN_INSN_LSB0_P.
6083 (CGEN_INT_INSN_P): Renamed from CGEN_INT_INSN.
6084 (gen-insert-switch): Update args of @arch@_cgen_insert_operand.
6085 (gen-extract-switch): Update args of @arch@_cgen_extract_operand.
6086 (gen-opcode-open): Set CGEN_OPCODE_INSN_ENDIAN.
6087 * operand.scm (op:start): Update call to field-start method.
6088 * sim-decode.scm (opcode-slots): New arg lsb0?.
6089 (fill-slot!,build-slots): Ditto.
6090 (build-decode-table-entry,build-decode-table-guts): Ditto.
6091 (gen-decoder-table,gen-decoder-switch,gen-decoder): Ditto.
6092 (gen-decode-fn): Ditto.
6093 (cgen-decode.c): Update call to gen-decode-fn.
6094 * sim.scm (gen-argbuf-type): Move `semantic' to cpu specific part.
6095 (-gen-cpu-header,-gen-cpuall-includes): New procs.
6096 (cgen-cpuall.h): Call -gen-cpuall-includes.
6097 * types.scm (<bitrange>): New class.
6098 (types-init!,types-finish!): New procs.
6099 * utils-cgen.scm (parse-number): New proc.
6100 (parse-boolean): New proc.
6101 * utils.scm (word-value): Renamed from shift-bits, rewrite.
6102 (word-mask): Rewrite.
6103 * m32r.cpu (define-arch): New fields default-insn-bitsize,insn-lsb0?.
6104 (m32rxf): New field `file-transform'.
6105 * m32r.opc (my_print_insn): print_int_insn -> print_insn.
6107 * hobbit.h: Fix include file name.
6109 Fri Oct 9 16:58:10 1998 Doug Evans <devans@seba.cygnus.com>
6111 * slib: New directory of slib files used by cgen/hobbit.
6112 * hobbit.scm: New file.
6113 * hobbit.c: New file.
6114 * hobbit.h: New file.
6115 * hobscmif.h: New file.
6116 * hob-main.c: New file.
6117 * hobslib.scm: New file.
6119 * Makefile.am: Add support for compiling hobbit, and using compiled
6120 version of hobbit to compile cgen.
6121 * Makefile.in: Regenerate.
6122 * configure.in: Support --with-hobbit.
6123 * configure: Regenerate.
6124 * acconfig.h (WITH_HOBBIT): Add.
6125 * config.in: Regenerate.
6127 * rtl.scm: New file, was cdl-c.scm.
6128 Definition of rtx funcs moved to rtx-funcs.scm.
6129 (semantic-in-out-operands): Rewrite to compute object form of
6131 * rtx-funcs.scm: New file.
6133 * cgen-gh.c: #include "config.h".
6134 (gh_cadddr,gh_cddddr): New fns.
6135 (cgh_vector_to_list): New fn.
6136 (cgh_map1,cgh_map2,cgh_map1_fn2): Rewrite.
6137 (cgh_init): Prefix qsort procs with "cgh-".
6138 * cgen-gh.h (gh_cadddr,gh_cddddr,cgh_vector_to_list): Declare.
6139 * cgen.c: #include "config.h".
6141 * attr.scm (bitset-attr?): New proc.
6142 (<bitset-attribute>, method parse-value): Value syntax changed from
6143 (val1 val2 ...) to val1,val2,....
6144 (<bitset-attribute>): New method gen-value.
6145 (<integer-attribute>): New method gen-value.
6146 (<enum-attribute>): New method gen-value.
6147 * cpu.scm: Disable debugging evaluator if (not (defined? 'DEBUG-EVAL)).
6148 (<reader>): New class.
6149 (CURRENT-ARCH,CURRENT-READER): New globals.
6150 (keep-mach?): Move here from mach.scm.
6151 * mach.scm (arch,arch-comment,arch-default-mach): Delete.
6152 (<arch>): New class.
6153 (<arch-data>): New class.
6154 (<cpu>): Make subclass of <ident>.
6155 (*ENDIAN* variables): Delete.
6156 (process-state-vars): Delete.
6157 (mach-finish!): Add `base' value to MACH attribute.
6158 * hardware.scm (<hardware>): Make subclass of <ident>.
6159 (hw:std-attrs): New global.
6160 (hw-profilable?): New proc.
6161 * ifield.scm (<ifield>): Make subclass of <ident>.
6162 (sort-ifield-list): Move here from iformat.scm.
6163 * iformat.scm (<iformat>): Renamed from <insn-format>.
6164 Make subclass of <ident>.
6165 (-ifmt-search-key): Include cti? in categorization of formats.
6166 (ifmt-analyze): Compile semantics (turn to object form).
6167 * insn.scm (<insn>): Make subclass of <ident>.
6168 New member compiled-semantics.
6169 (insn:std-attrs): Add SKIP-CTI, VIRTUAL.
6170 * mode.scm (<mode>): Make subclass of <ident>.
6172 * model.scm (<unit>): Make subclass of <ident>.
6173 New members inputs,outputs.
6174 (<model>): Make subclass of <ident>. New member state.
6175 (-unit-parse): Parse inputs,outputs.
6176 (<iunit>): New class.
6177 (-insn-timing-parse-model): New proc.
6178 (parse-insn-timing): Function unit spec rewritten.
6179 * operand.scm (<operand>): Make subclass of <ident>.
6180 New members sem-name,num,cond? New method gen-pretty-name.
6181 (hw-index-scalar): New global.
6182 (op-nub-hw): Move here from rtl.scm.
6183 (op:lookup-sem-name,op-profilable?): New procs.
6184 * pmacros.scm: Rewrite to pass through hobbit.
6185 * utils-cgen.scm (gen-attr-defn): Simplify using new gen-value method.
6186 * utils.scm (logit): Make a macro.
6187 (bit-set?): Rewrite.
6188 (high-part): Rewrite.
6190 * m32r.cpu (define-arch): Move to top of file.
6191 (cpu family m32rbf): Renamed from m32rb.
6192 (model m32r/d): Function unit spec rewritten.
6193 (all insns): Ditto. Replace UBI with BI.
6195 * opcodes.scm (gen-attr-table-decls): Declare
6196 @arch@_cgen_hw_attr_table.
6197 (gen-attr-table-defns): Generate hw attribute table.
6199 * sim-cpu.scm (-gen-engine-decls): New proc.
6200 (-gen-model-decls): New proc.
6201 (gen-parallel-exec-type): Add new member `written' to struct parexec.
6202 (-gen-record-args): Add SEM_BRANCH_INIT_EXTRACT if cti insn.
6203 (-gen-record-profile-args): Simplify.
6204 (-gen-parallel-sem-case): Delete.
6205 (gen-semantic-fn): Emit SEM_BRANCH_{INIT,FINI} if cti insn.
6206 New local `written'. Delete profiling code.
6207 (-gen-sem-case): Ditto.
6208 (-uncond-written-mask,-any-cond-written?): New procs.
6209 (cgen-sem-switch.c): Include duplicates of insns that can be executed
6210 parallelly or serially, and write-back handlers for all parallel insns.
6211 * sim-decode.scm (-gen-decode-insn-globals): Add parallel write-back
6212 support to initialization of struct insn_sem.
6213 (-gen-idesc-decls): Add parallel write-back support to struct idesc.
6214 (-gen-insn-sem-type): Add parallel write-back support to struct
6216 (-gen-idesc-init-fn): Add support for virtual insns.
6217 Add parallel write-back support.
6218 * sim-model.scm (gen-model-profile-fn): Delete
6219 (-gen-model-fn-decls): New proc.
6220 (-gen-model-insn-fn,-gen-model-insn-fns): New procs.
6221 (-gen-model-init-fn): New proc.
6222 (-gen-mach-defns): Initialize insn-name lookup and fast/full engine_fn
6223 members in @mach@_init_cpu.
6224 (cgen-model.c): Generate model handlers for each insn.
6225 * sim.scm (gen-define-field-macro): Cti insns handled differently.
6226 (<hw-pc>): New method gen-write.
6227 (<hw-register>, method gen-write): New arg `mode'.
6228 (<hw-register>): Delete method gen-record-profile!.
6229 New method gen-profile-index-type.
6230 (<hw-memory>, method gen-write): New arg `mode'.
6231 (<hw-address>, method gen-extract): Delete.
6232 (<hw-address>, method gen-write): New arg `mode'.
6233 (<hw-index>, method get-write-index): Rewrite.
6234 (<pc>, method cxmake-get-direct): Delete.
6235 (<pc>): New method cxmake-get. Comment out methods
6236 gen-set-quiet,gen-set-trace.
6237 (<operand>): New methods gen-argbuf-elm,gen-profile-argbuf-elm,
6238 gen-profile-index-type,gen-profile-code.
6239 Delete method gen-pretty-name. Rewrite method gen-write.
6240 Delete method cxmake-get-direct.
6241 (-op-gen-set-trace): Update `written'.
6242 (-op-gen-set-trace-parallel): Ditto.
6243 (-gen-hw-index-raw,-gen-hw-index): Handle strings.
6244 (gen-cpu-insn-enum-decl): Add extra entries for parallel
6245 insns and their write-back handlers.
6246 (insn-op-lookup): New proc.
6247 (<unit>): New method gen-profile-code.
6248 (<iunit>): New method gen-profile-code.
6249 (gen-argbuf-elm): Add profiling elements.
6250 (gen-argbuf-type): Define cti insns separately in their own struct.
6251 Add member `addr_cache' to this struct. Add entries for pbb virtual
6252 insns. Move semantic entries here from struct scache.
6253 Delete everything from struct scache except argbuf.
6254 (<insn>, method gen-profile-locals): Rewrite.
6255 (<insn>, method gen-profile-code): Rewrite.
6256 (sim-finish!): Create virtual pbb insns.
6258 Tue Sep 15 15:22:02 1998 Doug Evans <devans@canuck.cygnus.com>
6260 * m32r.cpu (h-cr): Add bbpc,bbpsw.
6261 (h-sm,h-bsm,h-ie,h-bie,h-bcond,h-bpc): Delete.
6262 (h-psw,h-bpsw,h-bbpsw): Define.
6263 (rte,trap): Handle bbpc,bbpsw.
6264 * opcodes.scm (max-operand-instances): Fix typo.
6265 * sim.scm (<hardware-base>, method 'fun-access?): Don't force virtual
6266 hardware elements to be fun-access.
6267 (-hw-gen-fun-get,-hw-gen-fun-set): Fix handling of scalars.
6269 Wed Sep 9 15:28:55 1998 Doug Evans <devans@canuck.cygnus.com>
6271 * m32r.cpu (trap): Pass `pc' to m32r_trap.
6273 Mon Aug 10 14:29:33 1998 Doug Evans <devans@canuck.cygnus.com>
6275 * opcodes.scm (gen-insn-table-entry): Comment out generation of cdx.
6277 Mon Aug 3 11:51:04 1998 Doug Evans <devans@seba.cygnus.com>
6279 * m32r.cpu (cpu m32rb): Renamed from m32r to distinguish from
6281 (mach m32r): Update.
6283 * mach.scm (mach:supports?): New proc.
6284 * sim-cpu.scm (gen-cpu-reg-access-{decls,defns}): Renamed from
6285 gen-reg-access-{decls,defns}.
6286 * sim.scm (gen-reg-access-{decl,defn}): New procs.
6287 (gen-mach-bfd-name): New proc.
6288 (gen-arch-reg-access-{decls,defns}): New procs.
6289 (cgen-arch.[ch]): Output register access cover fns.
6291 * hardware.scm (hardware-builtin!): Set print handlers for
6293 * m32r.opc (parse_hash,parse_hi16,parse_slo16,parse_ulo16): New arg
6295 (CGEN_PRINT_NORMAL,print_hash): Ditto.
6296 (my_print_insn): Ditto. Delete args buf, buflen.
6297 * opcodes.scm: Pass `od' (opcode-descriptor) to all C handlers.
6298 (-hw-asm-specs): Add `handlers' spec.
6299 (-parse-hw-asm): Lookup class at runtime. If no asm-spec, use
6301 (<hw-asm>): Renamed from <opval>. New elements parse,insert,extract,
6303 (<hw-asm>, gen-insert,gen-extract,gen-print): Use them.
6304 (<hw-asm>, parse!): New method.
6305 (gen-insn-table-entry): Print semantics.
6306 (gen-opcode-open): Renamed from gen-opcode-table.
6308 * utils.scm (string-write): No longer a macro.
6309 (-string-write): Handle procedure args.
6310 * opcodes.scm: Update all calls to string-write.
6311 * sim-cpu.scm: Ditto.
6312 * sim-decode.scm: Ditto.
6313 * sim-model.scm: Ditto.
6316 Fri Jul 31 14:40:38 1998 Doug Evans <devans@seba.cygnus.com>
6318 * opcodes.scm (cgen-ibd.h,gen-extra-ibd.h): New procs.
6319 (-gen-insn-builders,-gen-insn-builder): New procs.
6321 Fri Jul 24 11:38:59 1998 Doug Evans <devans@canuck.cygnus.com>
6323 * opcodes.scm (gen-syntax-entry): Fix bracketing for -Wall.
6324 (gen-opcode-table): Properly terminate comment.
6326 Tue Jul 21 10:51:42 1998 Doug Evans <devans@seba.cygnus.com>
6329 Clean up pass over everything, so starting fresh.