Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22148

Saving XMM registers to variables

$
0
0

Is there a C function call (I'm using gcc) that will save an XMM register to a specified __m128 variable? I'd like to avoid direct assembly if possible.

The use case here is I'm writing an exception handler routine to print out information about signals received; in this case, I'm receiving a floating point invalid operation in a highly optimized program, so knowing exactly where the exception happens is difficult. And since a FPE invalid operation can be any one of a number of causes, I want to be able to print out hex values of all the SSE registers to help narrow down the cause. Hence, the need to copy XMM* to C variables, which can then be sent elsewhere for logging.

I'm thinking maybe _mm_storeu_ps() might be the intrinsic I need, but it's unclear to me how it's used (what is the syntax for specifying which XMM register?), and I can't find any examples.


Viewing all articles
Browse latest Browse all 22148

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>