Shoddy Compilers

Last Friday I got an email saying that the old compiler we use at work is actually generating the test/branch code in this snippet:

do {
 /* foo */
} while (0);

I signed, recited the habitual "crappy IAR" line, and blamed someone not turning on the optimiser.

Until now. I tried with the new "improved optimiser" compiler they sent us, which is supposed to be a lot better. The compiler isn't as brain-dead as the older one, which is nice. However, this new optimiser still sucks:

main:
?0012:
        LDI     R16,LOW(?0013)
        LDI     R17,HIGH(?0013)
        LDI     R18,(?0013 >> 16)
        CALL    puts
        LDI     R16,LOW(0)
        TST     R16
        BRNE    ?0012
        RET

Oh wonderful. This is with full size optimisations, and the result is the same with full speed optimisations. Curse the proprietary world and their shoddy compilers!

15:47 Tuesday, 16 Dec 2003 [#] [computers] (0 comments)


Name:


E-mail:


URL:


Add 5 and 3 (required):


Comment: