diff options
author | Flavio Cruz <flaviocruz@gmail.com> | 2023-02-15 00:40:55 -0500 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-02-15 17:52:30 +0100 |
commit | b9890fe507efc65bdffc9f5ae984a6cb6ac2487f (patch) | |
tree | 4cc668cc6addfe3a63e2006baa84364d3994448d /i386 | |
parent | c1da11e520e6454c7798dc0fbd715d8dce87ee27 (diff) | |
download | gnumach-b9890fe507efc65bdffc9f5ae984a6cb6ac2487f.tar.gz gnumach-b9890fe507efc65bdffc9f5ae984a6cb6ac2487f.tar.bz2 gnumach-b9890fe507efc65bdffc9f5ae984a6cb6ac2487f.zip |
Rename efl to rfl for x86_64 in struct i386_thread_state
Message-Id: <Y+xwZ63X1PHDJwTX@jupiter.tail36e24.ts.net>
Diffstat (limited to 'i386')
-rw-r--r-- | i386/i386/pcb.c | 13 | ||||
-rw-r--r-- | i386/include/mach/i386/thread_status.h | 2 |
2 files changed, 9 insertions, 6 deletions
diff --git a/i386/i386/pcb.c b/i386/i386/pcb.c index de30197e..9210656b 100644 --- a/i386/i386/pcb.c +++ b/i386/i386/pcb.c @@ -518,6 +518,8 @@ kern_return_t thread_setstatus( saved_state->ecx = state->rcx; saved_state->eax = state->rax; saved_state->eip = state->rip; + saved_state->efl = (state->rfl & ~EFL_USER_CLEAR) + | EFL_USER_SET; #else saved_state->edi = state->edi; saved_state->esi = state->esi; @@ -528,14 +530,14 @@ kern_return_t thread_setstatus( saved_state->ecx = state->ecx; saved_state->eax = state->eax; saved_state->eip = state->eip; -#endif /* __x86_64__ && !USER32 */ saved_state->efl = (state->efl & ~EFL_USER_CLEAR) | EFL_USER_SET; +#endif /* __x86_64__ && !USER32 */ /* * Segment registers. Set differently in V8086 mode. */ - if (state->efl & EFL_VM) { + if (saved_state->efl & EFL_VM) { /* * Set V8086 mode segment registers. */ @@ -559,7 +561,7 @@ kern_return_t thread_setstatus( * Hardware assist on. */ thread->pcb->ims.v86s.flags = - state->efl & (EFL_TF | EFL_IF); + saved_state->efl & (EFL_TF | EFL_IF); } } else if (flavor == i386_THREAD_STATE) { @@ -734,6 +736,7 @@ kern_return_t thread_getstatus( state->rax = saved_state->eax; state->rip = saved_state->eip; state->ursp = saved_state->uesp; + state->rfl = saved_state->efl; state->rsp = 0; /* unused */ #else state->edi = saved_state->edi; @@ -745,9 +748,9 @@ kern_return_t thread_getstatus( state->eax = saved_state->eax; state->eip = saved_state->eip; state->uesp = saved_state->uesp; + state->efl = saved_state->efl; state->esp = 0; /* unused */ #endif /* __x86_64__ && !USER32 */ - state->efl = saved_state->efl; state->cs = saved_state->cs; state->ss = saved_state->ss; @@ -767,7 +770,7 @@ kern_return_t thread_getstatus( if ((thread->pcb->ims.v86s.flags & (EFL_IF|V86_IF_PENDING)) == 0) - state->efl &= ~EFL_IF; + saved_state->efl &= ~EFL_IF; } } else { diff --git a/i386/include/mach/i386/thread_status.h b/i386/include/mach/i386/thread_status.h index 2d05947e..3de22ff3 100644 --- a/i386/include/mach/i386/thread_status.h +++ b/i386/include/mach/i386/thread_status.h @@ -100,7 +100,7 @@ struct i386_thread_state { unsigned int cs; #if defined(__x86_64__) && !defined(USER32) - uint64_t efl; + uint64_t rfl; uint64_t ursp; #else unsigned int efl; |