| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent b79bb55 commit 3cadc42
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -32,7 +32,11 @@ HINSTANCE hAppInstance = NULL; | |||
| 32 | 32 | //===============================================================================================// | |
| 33 | 33 | #ifdef _WIN64 | |
| 34 | 34 | #pragma intrinsic( _ReturnAddress ) | |
| 35 | - UINT_PTR eip( VOID ) { return (UINT_PTR)_ReturnAddress(); } | ||
| 35 | + // This function can not be inlined by the compiler or we will not get the address we expect. Ideally | ||
| 36 | + // this code will be compiled with the /O2 and /Ob1 switches. Bonus points if we could take advantage of | ||
| 37 | + // RIP relative addressing in this instance but I dont believe we can do so with the compiler intrinsics | ||
| 38 | + // available (and no inline asm available under x64). | ||
| 39 | + __declspec(noinline) UINT_PTR eip( VOID ) { return (UINT_PTR)_ReturnAddress(); } | ||
| 36 | 40 | #endif | |
| 37 | 41 | //===============================================================================================// | |
| 38 | 42 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments