What's the SSE equivalent of fstp?

289 views Asked by At

Correct me if I'm mistaken, but fstp pops the value from the top of the FPU stack such as st0?

i.e. fstp tword [rsp]

If I have values in an SSE register, xmm0, what's the equivalent? I want to print the values stored in the registers.

1

There are 1 answers

5
Ben Voigt On BEST ANSWER

SSE doesn't use a stack, its registers are directly accessible. If you want to display contents of an MMX or SSE register, then the "store" instruction is appropriate. It will copy the values into an array of primitive data types in program memory (although in many cases you can simply cast the SSE variable in high level languages, taking its address may interfere with optimizations, by forcing a register spill to memory. Prefer to use the load and store intrinsics.)

For example, the

MOVUPD

and

MOVUPS

instructions.