avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-libc-dev] [bug #40003] Integer type promotion leads to inefficent c


From: Joey Morin
Subject: [avr-libc-dev] [bug #40003] Integer type promotion leads to inefficent code in wdt.h
Date: Wed, 11 Sep 2013 15:23:28 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:20.0) Gecko/20100101 Firefox/20.0

Follow-up Comment #1, bug #40003 (project avr-libc):

Forgot to add an example:

In the case of wdt_enable(WDTO_15MS), the assembled output for targets such as
the ATtiny85:
        ldi     r18, 0x08
        ldi     r24, 0x18
        ldi     r25, 0x00
        in      r0, 0x3f
        cli
        wdr
        out     0x21, r24
        out     0x3f, r0
        out     0x21, r18

With the patch in place:
        ldi     r25, 0x08
        ldi     r24, 0x18
        in      r0, 0x3f
        cli
        wdr
        out     0x21, r24
        out     0x3f, r0
        out     0x21, r25



    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?40003>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]