From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu Subject: Re: [9fans] Alef PPC code generation problem From: forsyth@vitanuova.com MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20020402121506.9816C19995@mail.cse.psu.edu> Date: Tue, 2 Apr 2002 13:11:20 +0100 Topicbox-Message-UUID: 7191f048-eaca-11e9-9e20-41e7f4b1d025 >>What bothers me, in addition to the failed code generation, is the >>fact that the type upgrade (the right word escapes me presently) >>for integer constant 13 is generated as object code. Surely it >>_is_ possible for the compiler to detect the value and its purpose >>earlier and convert it at compile rather than at run time? I am 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. the code generated for the fp conversion by qc looks right to me. the code generated by qal (it turns out) has never been correct, which is consistent with the source code in qal's code.c looking wrong too.