[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Global variables and ISRs ???
From: |
ericw |
Subject: |
Re: [avr-gcc-list] Global variables and ISRs ??? |
Date: |
Wed, 7 Sep 2005 10:05:39 -0600 |
User-agent: |
Internet Messaging Program (IMP) 3.2.3 |
Quoting Galen Seitz <address@hidden>:
> Because I wanted more control over multiplies, I've started creating
> routines like these:
>
>
> extern inline uint16_t
> mult_u16_u8u8(uint8_t a, uint8_t b)
> {
> uint16_t product;
> asm (
> "mul %1, %2" "\n\t"
> "movw %0, r0" "\n\t"
> "clr r1" "\n\t"
> : "=w" (product)
> : "r" (a), "r" (b)
> );
> return product;
> }
>
>
> extern inline uint16_t
> mult_u8h_u8u8(uint8_t a, uint8_t b)
> {
> uint8_t product_high;
> asm (
> "mul %1, %2" "\n\t"
> "mov %0, r1" "\n\t"
> "clr r1" "\n\t"
> : "=w" (product_high)
> : "r" (a), "r" (b)
> );
> return product_high;
> }
>
>
>
> I have a few others if people are interested.
>
Interesting. Would you be willing to submit a patch to the avr-libc Patch
Tracker?
Thanks
Eric
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
- Re: [avr-gcc-list] Global variables and ISRs ???, (continued)
- Re: [avr-gcc-list] Global variables and ISRs ???, Vincent Trouilliez, 2005/09/07
- Re: [avr-gcc-list] Global variables and ISRs ???, David Brown, 2005/09/07
- Re: [avr-gcc-list] Global variables and ISRs ???, Joerg Wunsch, 2005/09/07
- Re: [avr-gcc-list] Global variables and ISRs ???, Vincent Trouilliez, 2005/09/07
- Re: [avr-gcc-list] Global variables and ISRs ???, Joerg Wunsch, 2005/09/07
- Re: [avr-gcc-list] Global variables and ISRs ???, Vincent Trouilliez, 2005/09/07
- Re: [avr-gcc-list] Global variables and ISRs ???, David Brown, 2005/09/08
- Re: [avr-gcc-list] Global variables and ISRs ???, David Brown, 2005/09/08
- Re: [avr-gcc-list] Global variables and ISRs ???, E. Weddington, 2005/09/08
- Re: [avr-gcc-list] Global variables and ISRs ???, Galen Seitz, 2005/09/07
- Re: [avr-gcc-list] Global variables and ISRs ???,
ericw <=
- Re: [avr-gcc-list] Global variables and ISRs ???, Joerg Wunsch, 2005/09/07
- Re: [avr-gcc-list] Global variables and ISRs ???, Vincent Trouilliez, 2005/09/07
- Re: [avr-gcc-list] Global variables and ISRs ???, Joerg Wunsch, 2005/09/07
- Re: [avr-gcc-list] Global variables and ISRs ???, Vincent Trouilliez, 2005/09/07
- Re: [avr-gcc-list] Global variables and ISRs ???, David Brown, 2005/09/07
- Re: [avr-gcc-list] Global variables and ISRs ???, Vincent Trouilliez, 2005/09/07
Re: [avr-gcc-list] Global variables and ISRs ???, Vincent Trouilliez, 2005/09/07