+2002-10-08 Doug Evans <dje@transmeta.com>
+ Hans-Peter Nilsson <hp@axis.com>
+
+ * types.scm (bitrange-overlap?): Handle lsb0?.
+
2002-09-07 Frank Ch. Eigler <fche@redhat.com>
From Robert Cragie <rcc@jennic.com>:
; Return a boolean indicating if two bitranges overlap.
(define (bitrange-overlap? start1 length1 start2 length2 lsb0?)
- ; ??? lsb0?
- (let ((end1 (+ start1 length1))
- (end2 (+ start2 length2)))
- (not (or (<= end1 start2)
- (>= start1 end2))))
+ (if lsb0?
+ (let ((end1 (- start1 length1))
+ (end2 (- start2 length2)))
+ (and (< end1 start2)
+ (> start1 end2)))
+ (let ((end1 (+ start1 length1))
+ (end2 (+ start2 length2)))
+ (and (> end1 start2)
+ (< start1 end2))))
)
; Return a boolean indicating if BITPOS is beyond bitrange START,LEN.