mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:47:44 +00:00
UserspaceEmulator+LibX86: Turn on -O3 optimization for emulation code
Since this code is performance-sensitive, let's have the compiler do whatever it can to help us with the most important files. This yields a ~8% speedup.
This commit is contained in:
parent
8656835935
commit
a27473cbc2
3 changed files with 14 additions and 1 deletions
|
@ -38,6 +38,10 @@
|
|||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
# pragma GCC optimize("O3")
|
||||
#endif
|
||||
|
||||
//#define DEBUG_SPAM
|
||||
|
||||
namespace UserspaceEmulator {
|
||||
|
@ -171,6 +175,7 @@ void Emulator::dump_backtrace()
|
|||
if (!ret_ptr)
|
||||
return;
|
||||
symbol = m_elf->symbolicate(ret_ptr, &offset);
|
||||
if (!symbol.is_null())
|
||||
printf("> %#08x %s +%#x\n", ret_ptr, symbol.characters(), offset);
|
||||
|
||||
frame_ptr = m_mmu.read32({ 0x20, frame_ptr });
|
||||
|
|
|
@ -30,6 +30,10 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
# pragma GCC optimize("O3")
|
||||
#endif
|
||||
|
||||
//#define MEMORY_DEBUG
|
||||
|
||||
namespace UserspaceEmulator {
|
||||
|
|
|
@ -29,6 +29,10 @@
|
|||
#include <LibX86/Interpreter.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
# pragma GCC optimize("O3")
|
||||
#endif
|
||||
|
||||
namespace X86 {
|
||||
|
||||
enum IsLockPrefixAllowed {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue