OSDN Git Service

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