Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

Equivalent to -ffixed-reg?

branan
Beginner
345 Views
I'm keeping a couple of contants in register variables, like so:
register __m128 const asm ("xmm15");

The problem is that the x86-64/em64t/amd64 ABI says that all of the XMM registers are caller-save. I don't expect all the registers will ever be used, so I figure I'm safe, but I want to make sure that the compiler doesn't use that register. With GCC, I can use the -ffixed-xmm15 option. I can't find an equivalent in the ICC docs - is there a way to tell the compiler not to use a register?
0 Kudos
1 Reply
Dale_S_Intel
Employee
345 Views
I'm told that with icc a global declaration like the above is sufficient to prevent the compiler from using that register, at least anywhere that can see that declaration. Of course, it can't guarantee that some external function that doesn't see that declaration will reserve the register.

Is that sufficient for your purposes?

Dale
0 Kudos
Reply