Zachary Amsden wrote: > The calls in general, I think should be C-like in their properties - > having EAX, EDX, ECX for local use, and clobbering flags and memory > implicitly by nature of being a (non-pure) function call. Yes, that's the plan. We'll declare all the pv_ops functions as "fastcall" to mean regparm(3), so they'll all be expected to use/clobber eax, edx and ecx. For critical operations which are likely to be always inlined in a real implementation, we can define the operation as only clobbering a subset of those registers, leaving the burden of saving/restoring the other registers to the less optimal sequences which do actually make calls. Andi, is there some way we can get the CFI stuff right for those pushes/pops? > I would highly recommend using ECX or EDX. The choice of ESI being > unused is really arbitrary, and it makes it incredibly difficult to > try to express passing a VCPU data reference in ESI (that is what it > is used for, right?) to a C function. In several places, entry.S > calls out to C code and expects EAX, EDX, and ECX to come back > clobbered, so there are wide windows there in which the registers are > not live, whereas the code could quite reasonably expect ESI to be > preserved across those boundaries. I think you're right; it shouldn't be too hard to do a bit of register renaming in entry.S to make things work out nicely. J