This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
From: joel@OARcorp.com Date: Wed, 2 Dec 1998 07:58:26 -0600 (CST) On Wed, 2 Dec 1998, Jyrki O Saarinen wrote: > > I agree that this is undesirable behavior on an embedded system and should > > be reported. > > > > So this is a bug in gcc 2.x, not in egcs, right? > > Right, egcs doesn't use 32x32->64 muls for int-int muls. I wonder > why gcc did that.. wastes one register for the upper 32 bits of the > result for nothing. This would be different: > > long long result = (long long)(a * b); > /* a, b are ints */ It also makes it impossible to look at a piece of code and say definitively that it does not use the FPU. I wonder if the only definitive way is to compile code with -msoft-float. If you want to copy a value from one place to another and all int regs are in use, why flush one of them to stack if an fp reg is available? Secondly, some system's memcpy explicitly use fp regs in order to take advantage of special instructions (e.g. VIS on sparc64) ... And if you can't look at a function that just calls memcpy and assume no fp regs are in use, what can you assume? :-) _______________________________________________ New CrossGCC FAQ: http://www.objsw.com/CrossGCC _______________________________________________ To remove yourself from the crossgcc list, send mail to crossgcc-request@cygnus.com with the text 'unsubscribe' (without the quotes) in the body of the message.