Re: How can I link the kernel with libgcc ?
- From: Denis Vlasenko <vda@xxxxxxxxxxxxx>
- Date: Fri, 10 Mar 2006 12:37:35 +0200
On Friday 10 March 2006 05:47, Carlos Munoz wrote:
Lee Revell wrote:
On Thu, 2006-03-09 at 19:25 -0800, Carlos Munoz wrote:Hi Lee,
I figured out how to get the driver to use floating point operations.
I included source code (from an open source math library) for the
log10 function in the driver. Then I added the following lines to the
file arch/sh/kernel/sh_ksyms.c:
Where is the source code to your driver?
Lee
Be warned. This driver is in the early stages of development. There is
still a lot of work that needs to be done (interrupt, dma, etc, etc).
What? You are using log10 only twice!
if (!(siu_obj_status & ST_OPEN)) {
...
/* = log2(over) */
ydef[22] = (u_int32_t)(log10((double)(over & 0x0000003f)) /
log10(2));
...
}
else {
...
if (coef) {
ydef[16] = 0x03045000 | (over << 26) | (tap - 4);
ydef[17] = (tap * 2 + 1);
/* = log2(over) */
ydef[22] = (u_int32_t)
(log10((double)(over & 0x0000003f)) / log10(2));
}
Don't you think that log10((double)(over & 0x0000003f)) / log10(2)
can have only 64 different values depending on the result of (over & 0x3f)?
Obtain them from precomputed uint32_t log10table[64].
--
vda
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: How can I link the kernel with libgcc ?
- From: Carlos Munoz
- Re: How can I link the kernel with libgcc ?
- From: Bart Hartgers
- Re: How can I link the kernel with libgcc ?
- References:
- How can I link the kernel with libgcc ?
- From: Carlos Munoz
- Re: How can I link the kernel with libgcc ?
- From: Lee Revell
- Re: How can I link the kernel with libgcc ?
- From: Carlos Munoz
- How can I link the kernel with libgcc ?
- Prev by Date: Spam: directly from manufacturer
- Next by Date: Re: KERNEL: assertion (!sk->sk_forward_alloc) failed
- Previous by thread: Re: How can I link the kernel with libgcc ?
- Next by thread: Re: How can I link the kernel with libgcc ?
- Index(es):
Relevant Pages
|