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

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

Re: [avr-libc-dev] [RFC] [bug #9348] asin (acos) & atan problem (64K bou


From: Paul Schlie
Subject: Re: [avr-libc-dev] [RFC] [bug #9348] asin (acos) & atan problem (64K boundary)
Date: Mon, 01 Nov 2004 14:41:30 -0500
User-agent: Microsoft-Entourage/11.1.0.040913

While in process, does it make any sense to review the patch submitted to
improve the performance of tanh, and the one in the back of my mind noting
the potential intentional corruption of one of the registers upon an
exception?

-paul-


> From: "Theodore A. Roth" <address@hidden>
> Date: Mon, 1 Nov 2004 09:16:13 -0800 (PST)
> To: Joerg Wunsch <address@hidden>
> Cc: avr-libc-dev <address@hidden>
> Subject: Re: [avr-libc-dev] [RFC] [bug #9348] asin (acos) & atan problem (64K
> boundary)
> 
> On Thu, 28 Oct 2004, Joerg Wunsch wrote:
> 
>> As Theodore A. Roth wrote:
>> 
>>> It seems to me that moving the tables into a .c file would allow us to
>>> have gcc force the table in the lower 64K. For example, the table_asin
>>> defined as such in asin.S:
>> 
>> ...
>> 
>>> would be moved to table_asin.c like this
>>> 
>>>   #include <avr/pgmspace.h>
>>>   #include <avr/stdint.h>
>>> 
>>>   uint8_t table_asin [] PROGMEM = {
>> 
>> I basically like the idea, and think it'll solve the problem.
>> 
>> Though, I wouldn't opt for a separate C source file, but rather for
>> the appropriate section attributes applied just for the table, so the
>> linker will sort it appropriately even though coming from an assembler
>> source file.
>> 
>> If I'm not mistaken, this should be:
>> 
>> .section        .progmem.data,"a",@progbits
> 
> That was my first thought, but I didn't know that it was possible and
> didn't look into it.
> 
> The fix is actually very trivial. The asin.S and atan.S files were just
> missing PGM_SECTION before the tables.
> 
> I double checked all the other files with lookup tables and they all
> seem to do the right thing and have PGM_SECTION before the tables.
> 
> I've committed the attached patch to both HEAD and 1.0.
> 
> ---
> Ted Roth
> PGP Key ID: 0x18F846E9
> Jabber ID: address@hidden
> _______________________________________________
> AVR-libc-dev mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/avr-libc-dev






reply via email to

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