Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!nike!ucbcad!ucbvax!CORY.BERKELEY.EDU!dillon From: dillon@CORY.BERKELEY.EDU (Matt Dillon) Newsgroups: net.micro.amiga Subject: Re: Re: LATTICE BUG (3.03) -unsigned? short optimization bug Message-ID: <8610111659.AA11477@cory.Berkeley.EDU> Date: Sat, 11-Oct-86 12:59:55 EDT Article-I.D.: cory.8610111659.AA11477 Posted: Sat Oct 11 12:59:55 1986 Date-Received: Sat, 11-Oct-86 21:48:37 EDT Sender: daemon@ucbvax.BERKELEY.EDU Organization: University of California at Berkeley Lines: 17 >Actually, I wonder about this. Shouldn't the expected result be zero? > >The partial sum (y+z) should be done completely in ushort, giving > 0xFFFF + 0x0002 = 0x0001 (retaining only the lower 16 bits) > >so that the quotient (1/16) [done in integer math] should be zero. >I don't see any reason why the code generated for "x=..." and "xx=..." >should differ. > >Am I missing something here? All integral arguments, baring floating expressions, for arithmatic operations are supposed to be extended to INT if they are <= INT. On Lattice, this is 32bits. -Matt