I have looked at this question already, but neither of the two solutions work for me, for the following reasons.
- I am trying to prevent c++ code from touching registers, not assembly, so the clobber list will not work.
- I would like to do this locally, not globally, so global explicit register variables are too heavy-handed.
Is it possible to wrap a set of c++ statements in some way to tell the compiler to not use certain registers?