public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
* bitrange-overlap: Handle lsb0
@ 2002-10-07 17:00 Hans-Peter Nilsson
  0 siblings, 0 replies; only message in thread
From: Hans-Peter Nilsson @ 2002-10-07 17:00 UTC (permalink / raw)
  To: cgen

(Question-marks removed to allude subject spam filter that trigs
for some reason -- overseers informed.  If you get this twice
this is the resend you should reply to.)

I just committed Doug Evans suggestion (and approval) in
<URL:http://sources.redhat.com/ml/cgen/2002-q2/msg00031.html>,
though I included myself in the ChangeLog entry so some of the
blame for any failure will fall on me.  I didn't notice I had
missed committing this patch until its absence caused a local
test-case to fail.  Mea culpa.

2002-10-08  Doug Evans  <dje@transmeta.com>
	    Hans-Peter Nilsson  <hp@axis.com>

	* types.scm (bitrange-overlap?): Handle lsb0?.

Index: types.scm
===================================================================
RCS file: /cvs/src/src/cgen/types.scm,v
retrieving revision 1.1.1.1
diff -p -c -r1.1.1.1 types.scm
*** types.scm	28 Jul 2000 04:11:52 -0000	1.1.1.1
--- types.scm	7 Oct 2002 23:28:29 -0000
***************
*** 241,251 ****
  ; 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))))
  )
  
  ; Return a boolean indicating if BITPOS is beyond bitrange START,LEN.
--- 241,255 ----
  ; Return a boolean indicating if two bitranges overlap.
  
  (define (bitrange-overlap? start1 length1 start2 length2 lsb0?)
!   (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.

brgds, H-P

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-10-08  0:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-07 17:00 bitrange-overlap: Handle lsb0 Hans-Peter Nilsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).