]> sourceware.org Git - cgen.git/commitdiff
* cgen asm/disasm
authorFrank Ch. Eigler <fche@redhat.com>
Mon, 7 May 2001 17:55:20 +0000 (17:55 +0000)
committerFrank Ch. Eigler <fche@redhat.com>
Mon, 7 May 2001 17:55:20 +0000 (17:55 +0000)
[opcodes/ChangeLog]
2001-05-07  Frank Ch. Eigler  <fche@redhat.com>

        * cgen-dis.in (default_print_insn): Tolerate min<base instructions
        even at end of a section.
        * cgen-ibld.in (extract_normal): Tolerate min!=base!=max instructions
        by ignoring precariously-unpacked insn_value in favor of raw buffer.

[cgen/ChangeLog]
2001-05-07  Frank Ch. Eigler  <fche@redhat.com>

        * iformat.scm (compute-insn-base-mask-length): Rewrite to tolerate
        various-base-length instruction sets.

ChangeLog
iformat.scm

index 16f2d5b7bbe42524e0655db43e766a467d5bbffc..13a02223da7241cb0df7e692525dbf8e2f4a6faf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-05-07  Frank Ch. Eigler  <fche@redhat.com>
+
+       * iformat.scm (compute-insn-base-mask-length): Rewrite to tolerate
+       various-base-length instruction sets.
+
 2001-04-02  Ben Elliston  <bje@redhat.com>
 
        * sid-cpu.scm (-last-insn): New function.
index 5ddef2536d0bc0d3e2bf8a0574a2a7fb8bb777ed..9a54d56c4b28c62de257c1d78144f01520affcf0 100644 (file)
 )
 
 ; Given FLD-LIST, compute the base length in bits.
-; Computing the min of state-base-insn-bitsize and the total-length
-; is for [V]LIW instruction sets.
+;
+; For variable length instruction sets, or with cpus with multiple
+; instruction sets, compute the base appropriate for this set of
+; ifields.  Check that ifields are not shared among isas with
+; inconsistent base insn lengths.
 
 (define (compute-insn-base-mask-length fld-list)
-  (min (state-base-insn-bitsize) (compute-insn-length fld-list))
+  (let* ((isa-base-bitsizes
+         (remove-duplicates
+          (map isa-base-insn-bitsize
+               (map current-isa-lookup
+                    (collect (lambda (ifld) 
+                               (bitset-attr->list (atlist-attr-value (obj-atlist ifld) 'ISA #f)))
+                             fld-list))))))
+    (if (= 1 (length isa-base-bitsizes))
+       (min (car isa-base-bitsizes) (compute-insn-length fld-list))
+       (error "ifields have inconsistent isa/base-insn-size values:" isa-base-bitsizes)))
 )
 
 ; Given FLD-LIST, compute the bitmask of constant values in the base part
This page took 0.029936 seconds and 5 git commands to generate.