mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:27:44 +00:00
Everywhere: Make the codebase more architecture aware
This commit is contained in:
parent
6c4b5775e1
commit
97cc33ca47
22 changed files with 108 additions and 36 deletions
|
@ -346,8 +346,10 @@ FlatPtr DebugSession::single_step()
|
|||
constexpr u32 TRAP_FLAG = 0x100;
|
||||
#if ARCH(I386)
|
||||
regs.eflags |= TRAP_FLAG;
|
||||
#else
|
||||
#elif ARCH(X86_64)
|
||||
regs.rflags |= TRAP_FLAG;
|
||||
#else
|
||||
# error Unknown architecture
|
||||
#endif
|
||||
set_registers(regs);
|
||||
|
||||
|
@ -361,8 +363,10 @@ FlatPtr DebugSession::single_step()
|
|||
regs = get_registers();
|
||||
#if ARCH(I386)
|
||||
regs.eflags &= ~(TRAP_FLAG);
|
||||
#else
|
||||
#elif ARCH(X86_64)
|
||||
regs.rflags &= ~(TRAP_FLAG);
|
||||
#else
|
||||
# error Unknown architecture
|
||||
#endif
|
||||
set_registers(regs);
|
||||
return regs.ip();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue