Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It is not clear which assembly goes wrong as both are marked as 'declare the array <code>m[5]</code> as <code>double m[5]</code>' and unfortunately I don't have the hardware nor the cross-compiler to reproduce your problem.</p> <p>Remarkably the loops in both assembly codes are very similar. The only difference being that <code>v</code> is located in <code>d16</code> in the first and in <code>d8</code> in the second. The <code>v</code> that is passed to the <code>printf</code> is located in <code>(r5,r6)</code> in both loops and correctly copied to <code>(r2,r3)</code> before calling <code>printf</code>. For variadic functions the floating point registers shall not be used to pass parameters, contrary to non-variadic functions. Thus both loops look correct.</p> <p>The only explanation I can think of is a mismatch in the ABI used for the compiled code and the ABI of the library containing <code>printf</code>. Especially considering that the compiled code comes from a cross compiler and I'm assuming the <code>printf</code> comes from a dynamic library on the system. As the <code>printf</code> is called conforming to the EABI for ARM, I think the bug is in the <code>printf</code> of the library.</p> <p>If your cross compiler allows static linking, you may try that as you will be using a library that corresponds with the compiler. Of course the application becomes bigger, but it could at least confirm suspicion on the implementation of the <code>printf</code>. You may want to check if the library is compiled with an EABI complying compiler. If you can step through the <code>printf</code> on a debugger on the iPad, then you should be able to determine where the <code>printf</code> is taking its floating point parameter from. It should take it from <code>(r2,r3)</code>.</p> <p>Unfortunately I can not give a conclusive answer, but I hope my pointers for further investigation are helpful.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload