From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lucio De Re To: 9fans@cse.psu.edu Subject: Re: [9fans] Alef PPC code generation problem Message-ID: <20020402144249.H6290@cackle.proxima.alt.za> References: <20020402121506.9816C19995@mail.cse.psu.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <20020402121506.9816C19995@mail.cse.psu.edu>; from forsyth@vitanuova.com on Tue, Apr 02, 2002 at 01:11:20PM +0100 Date: Tue, 2 Apr 2002 14:42:50 +0200 Topicbox-Message-UUID: 719a20ba-eaca-11e9-9e20-41e7f4b1d025 On Tue, Apr 02, 2002 at 01:11:20PM +0100, forsyth@vitanuova.com wrote: > > i'm confused. in the example you sent, > t = 13*i; > neither qal nor qc generates a type upgrade for constant 13; > it generates an integer multiplication of 13 and i (as shifts and adds, but that's almost > beside the point), and then converts the result, which is correct. > For the record, what caused part of my confusion is that I "fixed" the problem I encountered compiling /sys/src/alef/lib/port/sin.l:37 by changing 4*f to 4.0*f. I thought the constant was at fault. It is odd, though: quad = e - 4*f; is the original statement. Hm. "quad" and "4" are the only integer values. I wonder at which stage of code generation the faulty conversion code is applied? It isn't to quad = e - 4.0 * f; (seemingly). ++L