From 30cf264aa621cb668fc8ef4f9171216c896f3204 Mon Sep 17 00:00:00 2001 From: Aaron Culliney Date: Sat, 7 Jun 2014 13:40:18 -0700 Subject: [PATCH] Refactoring: shifting to avoid stack hit --- src/x86/cpu.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/x86/cpu.S b/src/x86/cpu.S index 68ef0d29..732d2c36 100644 --- a/src/x86/cpu.S +++ b/src/x86/cpu.S @@ -82,7 +82,7 @@ #define BranchXCycles \ incb DebugCycleCount; /* +1 branch taken */ \ - pushl %ebx; \ + shll $16, %ebx; \ movw PC_Reg, %bx; \ cbw; \ addw %bx, %ax; \ @@ -90,7 +90,7 @@ cmpb %ah, %bh; \ je 9f; \ incb DebugCycleCount; /* +1 branch new page */ \ -9: popl %ebx; +9: shrl $16, %ebx; #define FlagC lahf; \ andb $C_Flag, %ah; \