- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
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?
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Is that sufficient for your purposes?
Dale
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page