Optimizing eflags access (I think).

This commit is contained in:
Ben Vanik 2014-08-22 21:58:57 -07:00
parent 540b192b1a
commit 168239b469
1 changed files with 2 additions and 3 deletions

View File

@ -732,8 +732,7 @@ void X64Emitter::nop(size_t length) {
void X64Emitter::LoadEflags() {
#if STORE_EFLAGS
mov(eax, dword[rsp + STASH_OFFSET]);
push(rax);
popf();
btr(eax, 0);
#else
// EFLAGS already present.
#endif // STORE_EFLAGS
@ -742,7 +741,7 @@ void X64Emitter::LoadEflags() {
void X64Emitter::StoreEflags() {
#if STORE_EFLAGS
pushf();
pop(qword[rsp + STASH_OFFSET]);
pop(dword[rsp + STASH_OFFSET]);
#else
// EFLAGS should have CA set?
// (so long as we don't fuck with it)