Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
GoogleCodeExporter opened this issue Feb 23, 2016 · 0 comments
Open

Comments

@GoogleCodeExporter
Copy link

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 [email protected] on 13 Oct 2010 at 9:47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant