dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: Re: Segfault with Faster MDCT patch and -fPIC

Re: Segfault with Faster MDCT patch and -fPIC

From: Slawomir Testowy <>
Date: Tue, 12 Oct 2010 09:31:55 +0200

2010/10/12 Dave Hooper <>:
> Would anybody be so kind as to test this patch please:
> FS#11666
> Confirmed continued working on ipod video target build.  Not confirmed sim
> build (yet, doing that now).  Not confirmed that it fixes the PIC problems,
> as don't currently have a way of building anything needing PIC, but given
> the set of changes I would be relatively surprised if it doesn't resolve the
> main problem(s).


nice work :).

I will test it in the moment. Meanwhile, I had one fuzz while patching
tremor (as I stated, I use mainline tremor with fasterMDCT patch):

@@ -279,12 +397,11 @@
         // Finally save out z[4].re, z[4].im, z[0].re and z[0].im
         // ...
-static inline void fft8( FFTComplex * z )
+static inline void fft8(FFTComplex * z)
- fft4(z);
+ FFTComplex* m4 = fft4(z);
         FFTSample temp;
- fixed32 * m4 = (fixed32 *)(&(z[4].re));

         asm volatile(
             /* read in z[4].re thru z[7].im */

but there is

        FFTSample temp;
        fixed32 * m4 = (fixed32 *)(&(z[4].re));

        asm volatile(
            "add %[z_ptr], %[z_ptr], #16\n\t" /* point to &z[2].re */
            /* read in z[4].re thru z[7].im */
            "ldmia %[z4_ptr]!, {r1,r2,r3,r4,r5,r6,r7,r8}\n\t"
            /* (now points one word past &z[7].im) */
            "add r1,r1,r3\n\t"
            "sub r3,r1,r3,lsl #1\n\t"
            "add r2,r2,r4\n\t"
            "sub r4,r2,r4,lsl #1\n\t"

What happened to "add %[z_ptr]" line?

Slawomir Testowy
Received on 2010-10-12

Page was last modified "Jan 10 2012" The Rockbox Crew