+2000-10-06 Dave Brolley <brolley@redhat.com>
+
+ * utils-gen.scm (-gen-ifld-extract-base): Compute start position as
+ ifld-start + ifld-word-offset.
+ (gen-ifld-extract): Check adata-integral-insn? before checking whether
+ the field is beyond the base number of bits.
+ (gen-define-ifields): Use a base-length of 32 if adata-integral-insn?.
+ (gen-extract-ifields): Ditto.
+ * gas-test.scm (gentest): Generate backslashes before '[' and ']'
+ characters in the regular expression.
+
2000-10-02 Frank Ch. Eigler <fche@redhat.com>
* desc-cpu.scm: (gen-operand-decls): Emit MAX_OPERANDS as a
echo \"#objdump: -dr\" >>${1}.d
echo \"#name: $1\" >>${1}.d
$BUILD/../binutils/objdump -dr a.out | \
- sed -e 's/(/\\\\(/g' -e 's/)/\\\\)/g' -e 's/[+]/\\\\+/g' -e 's/[*]/\\\*/g' | \
+ sed -e 's/(/\\\\(/g' \
+ -e 's/)/\\\\)/g' \
+ -e 's/\\[/\\\\\\[/g' \
+ -e 's/\\]/\\\\\\]/g' \
+ -e 's/[+]/\\\\+/g' \
+ -e 's/[*]/\\\\*/g' | \
sed -e 's/^.*file format.*$/.*: +file format .*/' \
>>${1}.d
rm -f a.out
base-value ", "
(number->string total-length) ", "
; ??? Is passing total-length right here?
- (number->string (ifld-start f total-length)) ", "
+ (number->string (+ (ifld-start f total-length)
+ (ifld-word-offset f))) ", "
(number->string (ifld-length f))
")"))
(decode (ifld-decode f)))
indent
(gen-sym f)
" = "
- (if (ifld-beyond-base? f base-length total-length)
- (-gen-ifld-extract-beyond f base-length total-length var-list)
- (-gen-ifld-extract-base f
- (if (adata-integral-insn? CURRENT-ARCH)
- total-length
- (min base-length total-length))
- base-value))
+ (if (adata-integral-insn? CURRENT-ARCH)
+ (-gen-ifld-extract-base f total-length base-value)
+ (if (ifld-beyond-base? f base-length total-length)
+ (-gen-ifld-extract-beyond f base-length total-length var-list)
+ (-gen-ifld-extract-base f (min base-length total-length)
+ base-value)))
";"
(if macro? " \\\n" "\n")
)
; to each line).
(define (gen-define-ifields ifields total-length indent macro?)
- (let* ((base-length (state-base-insn-bitsize))
+ (let* ((base-length (if (adata-integral-insn? CURRENT-ARCH)
+ 32
+ (state-base-insn-bitsize)))
(chunk-specs (-extract-chunk-specs base-length total-length
(current-arch-default-alignment))))
(string-list
; doing this for now.
(define (gen-extract-ifields ifields total-length indent macro?)
- (let* ((base-length (state-base-insn-bitsize))
+ (let* ((base-length (if (adata-integral-insn? CURRENT-ARCH)
+ 32
+ (state-base-insn-bitsize)))
(chunk-specs (-extract-chunk-specs base-length total-length
(current-arch-default-alignment))))
(string-list