[sdiy] help...no make8() function in Arduino...converting PIC to AVR
Ove Ridé
nitro2k01 at gmail.com
Wed Apr 11 21:58:10 CEST 2012
On 11 April 2012 21:44, Ingo Debus <igg.debus at t-online.de> wrote:
> As someone else said here, it's probably not a good idea trying to help the compiler to make good code...
Uhm, the only reason these things were functions or macros in the
first place was to help the PIC compiler do its tricks. The proper
solution is to replace all references to _mul with a multiplication
sign. The lazy way is to create a macro so you don't have to edit the
code in a million places. Creating a function that just says "return
x*y;" because you want to avoid "helping the compiler" is an argument
that doesn't make sense.
--
/Ove
Blog: <http://blog.gg8.se/>
"Here is Evergreen City. Evergreen is the color of green forever."
More information about the Synth-diy
mailing list