From: SourceForge.net <no...@so...> - 2003-04-19 09:38:11
|
Feature Requests item #603246, was opened at 2002-09-01 21:53 Message generated for change (Settings changed) made by johanknol You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=350599&aid=603246&group_id=599 >Category: None Group: None Status: Open Priority: 5 Submitted By: Wim Lewis (wiml) Assigned to: Nobody/Anonymous (nobody) Summary: Inefficient multiply by a constant Initial Comment: The following C code: xdata at 0x7FC6 char FOO; char fun(unsigned char tmp) { tmp = 2 * (tmp-1); return ((xdata char *)(&FOO))[tmp]; } is compiled inefficiently by the version of SDCC I got from CVS on 1-September-2002. My older copy of SDCC (2.2.1, which I'm trying to upgrade from) generates reasonably efficient code involving a decrement and an add. The new version (2.3.2-devel) generates much more elaborate code using an actual MUL instruction, instead of optimizing the MUL to an ADD. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=350599&aid=603246&group_id=599 |