OSDN Git Service

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