Hi again,

Russell King - ARM Linux wrote:

> On Fri, Mar 01, 2002 at 10:24:08AM +0100, jeroen dobbelaere wrote:
[..]



> So its not a kernel problem.

yes and no :

- I succeeded in getting back the problem, and the crash is a valid one :

the SIGFPE is created because of an integer 'a % b' with b == 0 (aka division by 0)
The reason for this is confusing :

I suspect a compiler problem (gcc-3.0.4), although it reminds me to another
problem I've seen before :

   two almost identical sequences of floating point instructions.
   As far as I know the arm floating point instructions, produced code is correct.
   But when executing, somehow the content of a floating point register is
   transformed into 0

   Working on an xscale without hard floating point doesn't make debugging this easier 
:(
   (how can you see the content of those virtual floating point registers in gdb ??)


Anyway, I instrumented the code where a float value is passed, to printf the content
of the value.

and now funny things happen : with NWFPE, I get an 'illegal instruction' on :
0x41079dcc : mvfd f0, f4


0x41079dbc 
<_ZN24BasicTableLayoutStrategy26ComputeNonPctColspanWidthsERK17nsHTMLReflowStateifPi+824>:
   
     ldr        r3, [pc, #240]  ; 0x41079eb4 
<_ZN24BasicTableLayoutStrategy26ComputeNonPctColspanWidthsERK17nsHTMLReflowStateifPi+1072>
0x41079dc0 
<_ZN24BasicTableLayoutStrategy26ComputeNonPctColspanWidthsERK17nsHTMLReflowStateifPi+828>:
   ldr     r0, [r10, r3]
0x41079dc4 
<_ZN24BasicTableLayoutStrategy26ComputeNonPctColspanWidthsERK17nsHTMLReflowStateifPi+832>:
   mov     r1, #616        ; 0x268
0x41079dc8 
<_ZN24BasicTableLayoutStrategy26ComputeNonPctColspanWidthsERK17nsHTMLReflowStateifPi+836>:
   add     r1, r1, #2      ; 0x2
0x41079dcc 
<_ZN24BasicTableLayoutStrategy26ComputeNonPctColspanWidthsERK17nsHTMLReflowStateifPi+840>:
   mvfd    f0, f4
0x41079dd0 
<_ZN24BasicTableLayoutStrategy26ComputeNonPctColspanWidthsERK17nsHTMLReflowStateifPi+844>:
   stfd    f0, [sp, -#8]!
0x41079dd4 
<_ZN24BasicTableLayoutStrategy26ComputeNonPctColspanWidthsERK17nsHTMLReflowStateifPi+848>:
   ldmia   sp!, {r2, r3}
0x41079dd8 
<_ZN24BasicTableLayoutStrategy26ComputeNonPctColspanWidthsERK17nsHTMLReflowStateifPi+852>:
   bl      0x40fcec2c <_init+3540>


with the acorn fpe, I don't get this, but suddenly the content of the variable passed 
changes into 0
(which is the same as was seen before with NWFPE)

Looking at the produced assembler code, I must conclude that somehow,
the content of the virtual register f4 changes into 0.0 (!)

At one place, the content of f4 is '19.0', at another, without accessing f4 in 
between, it becomes '0.0'

This is on a 2.4.16-rmk1-xng1 kernel
(xng1 : with iop310 patches + patches to circumvent the xscale caching bug and the 
xscale 'write to protected page' bug.)


[..]



Greetings,
--
Jeroen Dobbelaere
Embedded Software Engineer

ACUNIA Embedded Solutions
http://www.acunia.com



_______________________________________________
http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
http://www.arm.linux.org.uk/armlinux/mailinglists.php
Please visit the above addresses for information on this list.

Reply via email to