Thomas D. Dean schrieb:

> I have code producing strange results.


Hi. Your code looks strange, too ;-)

>         distance = =895*distance;

[...]

> 895*distance generates a call to __mulsi3, multiplying r25:22 by r21:18
> and returning the result in r25:22.
>
> However, I cannot find where r21:18 are set in the code.  Looking at the
> output of avr-gcc -S, I cannot find any of r18:21.


It was easier to track what's going on if a compileable source was available. You can generate the preprocessed source with -E or -save-temps (will generate %.i and %.s).

To track things the compiler output with -dp -fverbose-asm is more helpful than binutils' dumps.

Georg-Johann




_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to