On Mon, 16 Nov 2009, Michel Bouissou wrote:

> Hi Gordon,
>
>> Saw this posting recently which made me think... Especially as I'm doing a
>> lot of floating pint work which would no-doubt be accellerated by the
>> hardware multiply, however I've just had a look at some of the code in my
>> project... Although it has that warning, it is using the MUL instructions.
>
> Since I posted this message, I've much modified my code and now in the .asm I
> see some "MULLW" as well, so indeed sddc uses the HW multiplier appropriately.
>
> Looks like in my original code there was a constant multiplication by 2, and
> the compiler probably figured out that it was less expensive to perform it
> using registers shifts than MUL*...?

I noticed it using a MUL when I had a multiply by 16, rather than use a 
shift... I guess it knows best though :)

> It was both the "FIXME" comment and absence of MUL* that draw my attention.
> Now I get the MULLW and still the "FIXME".
>
> Still don't know if the FIXME is something I should worry about, but anyway
> program execution apparently behaves as expected.

I've not quite mastered PIC assembler yet, (don't really want to which is 
why I program in C!) but I'm suspecting the FIXME is refering to the 
functions inabiltiy to use the WREG to return a result, but it looks like 
it's in-lined anyway... Ho hum.

> BTW now that I'm using the PIC18 (16-bit) port, I seem to encounter much less
> compiler trouble than I had when previously using the PIC16 (14-bit) port.
>
> My project is now 2000+ lines of C code, and all the errors I fell upon were
> mine, not compiler's ;-)

Er..

   wc -l *.c
   ...
     5510 total

It's doing a mighty fine job on my project. Glad I wasn't put-off by what 
I found online - which seems to be many years old now, saying it's still 
unstable, not suitable, etc., etc., etc. ...

Gordon

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to