diff --git a/dyninstAPI/src/emit-x86.C b/dyninstAPI/src/emit-x86.C index bf4692b9d9..04aa68a43c 100644 --- a/dyninstAPI/src/emit-x86.C +++ b/dyninstAPI/src/emit-x86.C @@ -2420,11 +2420,7 @@ void EmitterAMD64::emitStackAlign(int offset, codeGen &gen) int saveSlot2 = 8 + AMD64_STACK_ALIGNMENT; bool saveFlags = false; - Register scratch = gen.rs()->getScratchRegister(gen); - // If we cannot allocate a scratch register, use RAX. - // It will be restored at the end anyway - if (scratch == REG_NULL) - scratch = REGNUM_RAX; + Register scratch = REGNUM_RAX; if (gen.rs()->checkVolatileRegisters(gen, registerSlot::live)) { saveFlags = true; // We need to save the flags register