From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4cb32d1fb3450006606a8527240f4ca1@plan9.bell-labs.com> From: David Presotto To: 9fans@cse.psu.edu Subject: Re: [9fans] remember when C compiler used to produce working code? i don't! In-Reply-To: <029701c3e79d$8af35370$8201a8c0@cc77109e> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-nyhcoxizzfxlljvfbdyrjlhbau" Date: Fri, 30 Jan 2004 22:13:34 -0500 Topicbox-Message-UUID: c86f7d16-eacc-11e9-9e20-41e7f4b1d025 This is a multi-part message in MIME format. --upas-nyhcoxizzfxlljvfbdyrjlhbau Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit You're right, copying the left node for OAS(OP) would be a bummer in cc. We could conceivably do the work in cc but I can't see an easy way to do it. --upas-nyhcoxizzfxlljvfbdyrjlhbau Content-Type: message/rfc822 Content-Disposition: inline Received: from plan9.cs.bell-labs.com ([135.104.9.2]) by plan9; Fri Jan 30 20:58:31 EST 2004 Received: from mail.cse.psu.edu ([130.203.4.6]) by plan9; Fri Jan 30 20:58:28 EST 2004 Received: by mail.cse.psu.edu (CSE Mail Server, from userid 60001) id 3F0CD19DD0; Fri, 30 Jan 2004 20:58:21 -0500 (EST) Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.4.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 983AB19C43; Fri, 30 Jan 2004 20:58:13 -0500 (EST) X-Original-To: 9fans@cse.psu.edu Delivered-To: 9fans@cse.psu.edu Received: by mail.cse.psu.edu (CSE Mail Server, from userid 60001) id 23B8D19AC9; Fri, 30 Jan 2004 20:57:01 -0500 (EST) Received: from wmail.atlantic.net (wmail.atlantic.net [209.208.0.84]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id 25DD119B22 for <9fans@cse.psu.edu>; Fri, 30 Jan 2004 20:56:50 -0500 (EST) Received: (qmail 24496 invoked from network); 31 Jan 2004 01:56:49 -0000 Received: from cpe-203-51-74-128.nsw.bigpond.net.au (HELO cc77109e) (203.51.74.128) by wmail.atlantic.net with SMTP; 31 Jan 2004 01:56:49 -0000 Message-ID: <029701c3e79d$8af35370$8201a8c0@cc77109e> From: "Bruce Ellis" To: <9fans@cse.psu.edu> References: <20f6c2bf812efc23f83f7fc5e8d4634d@plan9.bell-labs.com> <027401c3e796$68040370$8201a8c0@cc77109e> Subject: Re: [9fans] remember when C compiler used to produce working code? i don't! Organization: www.chunder.com MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Sat, 31 Jan 2004 12:51:00 +1100 X-Spam-Status: No, hits=-0.3 required=5.0 tests=PLING_QUERY,QUOTED_EMAIL_TEXT,REFERENCES version=2.55 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) on further inspection (and coffee) i would suggest that the "sametype" test be changed so that in these cases the OCAST is not inserted for asop . the onus would then be on the individual compilers to handle asops of this form, further complicating the asop code at e.g. 8c/cgen.c:434 - what a tedious solution. the reasoning (which may not be right) is that the port code in cc cannot, in general, rewrite the tree; consider: *lp++ *= ratio; 8c/cgen.c uses reglcgen() for the hard lhs. the other compilers have logically similar code to do this, though most have more registers, so it's easier. comments anyone? brucee ----- Original Message ----- From: "Bruce Ellis" To: <9fans@cse.psu.edu> Sent: Saturday, January 31, 2004 11:57 AM Subject: Re: [9fans] remember when C compiler used to produce working code? i don't! > indeed. the expression is being rewritten as > > elasticity *= (long)ratio; > > com.c:196 > > same thing for + and - at line 169. > > brucee > ----- Original Message ----- > From: "David Presotto" > To: <9fans@cse.psu.edu> > Sent: Saturday, January 31, 2004 9:40 AM > Subject: Re: [9fans] remember when C compiler used to produce working code? i don't! > > > > Looks like a problem in cc/com.c in tcomo(). I'm going to be away > > for a week and will take a crack at it when I get back. If someone > > else wants to try in the mean time... > --upas-nyhcoxizzfxlljvfbdyrjlhbau--