Skip to content

The input value is not properly read by the inline asm code #2

@GoogleCodeExporter

Description

@GoogleCodeExporter
What steps will reproduce the problem?
1. call sinf_neon(PI/2) and cosf_neon(0)

What is the expected output? What do you see instead?
I am testing sin(PI/2) and cos(0) and I expect to see 1 as result for both. By 
default I see 0, but if I change the code to properly load the function 
parameter it works.

What version of the product are you using? On what operating system?
I am using this code on iPad/iPhone 3GS so Cortex-A8 (iOS 4.2 Beta 2 SDK, 
LLVM-GCC or GCC 4.2).


(example with the sinf_neon() function) I need to add this code before the hfp 
variant of the function is called or at the top of the hfp variant for the 
sinf_neon() function to produce the correct result:

    asm volatile ("vdup.f32 d0, %[xInput]   \n\t"
                  :
                  :[xInput] "r" (x)
                  :
                  );

because the default
    asm volatile ("vdup.f32 d0, r0");

is not able to load the input value correctly.


Original issue reported on code.google.com by Pana...@gmail.com on 13 Oct 2010 at 9:47

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions