[PATCH 2/2] ntdll: Report SegDs to be identical to SegSs in x86_64 exception handlers.

Alexandre Julliard julliard at winehq.org
Fri Mar 26 06:19:38 CDT 2021


Zebediah Figura <z.figura12 at gmail.com> writes:

> @@ -1500,11 +1500,6 @@ static void save_context( struct xcontext *xcontext, const ucontext_t *sigcontex
>      context->SegFs  = FS_sig(sigcontext);
>      context->SegGs  = GS_sig(sigcontext);
>      context->EFlags = EFL_sig(sigcontext);
> -#ifdef DS_sig
> -    context->SegDs  = DS_sig(sigcontext);
> -#else
> -    __asm__("movw %%ds,%0" : "=m" (context->SegDs));
> -#endif
>  #ifdef ES_sig
>      context->SegEs  = ES_sig(sigcontext);
>  #else
> @@ -1515,6 +1510,9 @@ static void save_context( struct xcontext *xcontext, const ucontext_t *sigcontex
>  #else
>      __asm__("movw %%ss,%0" : "=m" (context->SegSs));
>  #endif
> +   /* Legends of Runeterra depends on having SegDs == SegSs in an exception
> +    * handler. */
> +    context->SegDs  = context->SegSs;

Is there a reason you are not fixing %es too while you are at it?

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list