How to store floating point numbers from FPU to memory?

335 views Asked by At

I want to create a program that prints out the cosine of a number using printf. However, for that I need to move the result of fcos to %xmm0. I tried to use memory as an intermediate step, but I get an "operand type mismatch for `fstp'" error.

.data
    result: .double 1.56098098

[...]

    fldl result
    fcos
    fstp $result
0

There are 0 answers