From fe52f1eeacc1c29886c25902635b4aa6194bdf54 Mon Sep 17 00:00:00 2001 From: Scott Ehlert Date: Sat, 31 May 2014 03:09:17 -0500 Subject: [PATCH] Don't bother saving and restoring eax in hamsandwich trampolines. --- dlls/hamsandwich/Trampolines.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/dlls/hamsandwich/Trampolines.h b/dlls/hamsandwich/Trampolines.h index bca62dc4..ee97a6b3 100644 --- a/dlls/hamsandwich/Trampolines.h +++ b/dlls/hamsandwich/Trampolines.h @@ -78,7 +78,6 @@ namespace Trampolines const unsigned char codeVoidPrologue[] = { 0x55, // push ebp 0x89, 0xE5, // mov ebp, esp - 0x50, // push eax }; /** @@ -184,17 +183,15 @@ namespace Trampolines * Epilogue of a void return function */ const unsigned char codeVoidEpilogue[] = { - 0x58, // pop eax 0x5D, // pop ebp 0xC3 // ret }; const unsigned char codeVoidEpilogueN[] = { - 0x58, // pop eax 0x5D, // pop ebp 0xC2, 0xCD, 0xAB // retn 0xABCD }; - const int codeVoidEpilogueNReplace = 3; + const int codeVoidEpilogueNReplace = 2;