I appologize if I'm misunderstanding something about the code that is
being produced, but while auditing some code to try to make some code
smaller I noticed that __udivmodqi4 is being called twice to generate
code for:
 
        unsigned char a, b, c;
        c = some_input_function();
LABEL:
        a = c/10;
        b = c%10;
        ...

***************************************** 
LABEL:
        mov r24,r18
        ldi r22,lo8(10)
        call __udivmodqi4
        mov r19,r24
.LM436:
        mov r24,r18
        call __udivmodqi4

If I'm understanding __udivmodqi4 it produces the results of both of
these with one call.  
My compile command is:
avr-gcc -S -mmcu=atmega128 -Os -fno-delete-null-pointer-checks -Wall
-Wstrict-prototypes -Wa,-ahlms=gekv2c.lst -DETHERNUT2 -D__HARVARD_ARCH__
-gdwarf-2 -IC:/ethernut-4.4.0/nut/include file.c -o file.s

And as the -I tells, this is on Windows.  The GCC version is 3.4.6 .

I do not subscribe to this list, so please CC me on any replies.

Nathan Moore



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

Reply via email to