]> sourceware.org Git - cgen.git/commitdiff
2001-11-14 Dave Brolley <brolley@redhat.com>
authorDave Brolley <brolley@sourceware.org>
Wed, 14 Nov 2001 19:46:43 +0000 (19:46 +0000)
committerDave Brolley <brolley@sourceware.org>
Wed, 14 Nov 2001 19:46:43 +0000 (19:46 +0000)
* utils-gen.scm (-gen-extract-word): Correct computation of the length
of the field being extracted.

ChangeLog
utils-gen.scm

index 2dddcad7007428c2ffbec65c659845160e495c16..6aa1bd7028ccfac8eaf0a307d7a4202bff0f57e4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-11-14  Dave Brolley  <brolley@redhat.com>
+
+       * utils-gen.scm (-gen-extract-word): Correct computation of the length
+       of the field being extracted.
+
 2001-10-29  Johan Rydberg  <johan@rydberg.com> 
 
        * doc/rtl.texi (Expressions): Document the (error ..), (sqrt ..),
index 80c528120d4c79ebf734237be1ade68ca5935280..8f1ea776fb625cb4f77bda272edd0738b1787ca7 100644 (file)
                           unsigned? lsb0?)
   ; ??? lsb0?
   (let ((word-end (+ word-start word-length))
-       (end (+ start length)))
+       (end (+ start length))
+       (base (if (< start word-start) word-start start)))
     (string-append "("
                   "EXTRACT_"
                   (if (current-arch-insn-lsb0?) "LSB0" "MSB0")
                                       (- start word-start)))
                   ", "
                   (number->string (if (< end word-end)
-                                      (- word-end end)
-                                      word-length))
+                                      (- end base)
+                                      (- word-end base)))
                   ") << "
                   (number->string (if (> end word-end)
                                       (- end word-end)
This page took 0.048683 seconds and 5 git commands to generate.