From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17162 invoked by alias); 8 Oct 2002 00:00:28 -0000 Mailing-List: contact cgen-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cgen-owner@sources.redhat.com Received: (qmail 17155 invoked from network); 8 Oct 2002 00:00:26 -0000 Received: from unknown (HELO krynn.axis.se) (193.13.178.10) by sources.redhat.com with SMTP; 8 Oct 2002 00:00:26 -0000 Received: from ignucius.axis.se (ignucius.axis.se [10.13.1.18]) by krynn.axis.se (8.12.3/8.12.3/Debian -4) with ESMTP id g9800O71025566; Tue, 8 Oct 2002 02:00:24 +0200 Received: (from hp@localhost) by ignucius.axis.se (8.9.3/8.9.3/Debian 8.9.3-21) id CAA24243; Tue, 8 Oct 2002 02:00:24 +0200 Date: Mon, 07 Oct 2002 17:00:00 -0000 Message-Id: <200210080000.CAA24243@ignucius.axis.se> From: Hans-Peter Nilsson To: cgen@sources.redhat.com Subject: bitrange-overlap: Handle lsb0 X-SW-Source: 2002-q4/txt/msg00007.txt.bz2 (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 , 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 Hans-Peter Nilsson * 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