Optimizing eflags access (I think).
This commit is contained in:
parent
540b192b1a
commit
168239b469
|
@ -732,8 +732,7 @@ void X64Emitter::nop(size_t length) {
|
||||||
void X64Emitter::LoadEflags() {
|
void X64Emitter::LoadEflags() {
|
||||||
#if STORE_EFLAGS
|
#if STORE_EFLAGS
|
||||||
mov(eax, dword[rsp + STASH_OFFSET]);
|
mov(eax, dword[rsp + STASH_OFFSET]);
|
||||||
push(rax);
|
btr(eax, 0);
|
||||||
popf();
|
|
||||||
#else
|
#else
|
||||||
// EFLAGS already present.
|
// EFLAGS already present.
|
||||||
#endif // STORE_EFLAGS
|
#endif // STORE_EFLAGS
|
||||||
|
@ -742,7 +741,7 @@ void X64Emitter::LoadEflags() {
|
||||||
void X64Emitter::StoreEflags() {
|
void X64Emitter::StoreEflags() {
|
||||||
#if STORE_EFLAGS
|
#if STORE_EFLAGS
|
||||||
pushf();
|
pushf();
|
||||||
pop(qword[rsp + STASH_OFFSET]);
|
pop(dword[rsp + STASH_OFFSET]);
|
||||||
#else
|
#else
|
||||||
// EFLAGS should have CA set?
|
// EFLAGS should have CA set?
|
||||||
// (so long as we don't fuck with it)
|
// (so long as we don't fuck with it)
|
||||||
|
|
Loading…
Reference in New Issue