Question

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top