Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
b8ae3f07
Commit
b8ae3f07
authored
Aug 27, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Fix handling of the duplicate MxCsr entry in the x86_64 context.
parent
0223f71d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
10 deletions
+8
-10
signal_x86_64.c
dlls/ntdll/signal_x86_64.c
+3
-4
server_protocol.h
include/wine/server_protocol.h
+2
-2
protocol.def
server/protocol.def
+1
-1
trace.c
server/trace.c
+2
-3
No files found.
dlls/ntdll/signal_x86_64.c
View file @
b8ae3f07
...
...
@@ -1019,11 +1019,11 @@ static void save_context( CONTEXT *context, const ucontext_t *sigcontext )
#else
__asm__
(
"movw %%ss,%0"
:
"=m"
(
context
->
SegSs
));
#endif
context
->
MxCsr
=
0
;
/* FIXME */
if
(
FPU_sig
(
sigcontext
))
{
context
->
ContextFlags
|=
CONTEXT_FLOATING_POINT
;
context
->
u
.
FltSave
=
*
FPU_sig
(
sigcontext
);
context
->
MxCsr
=
context
->
u
.
FltSave
.
MxCsr
;
}
}
...
...
@@ -1107,7 +1107,6 @@ void copy_context( CONTEXT *to, const CONTEXT *from, DWORD flags )
to
->
SegCs
=
from
->
SegCs
;
to
->
SegSs
=
from
->
SegSs
;
to
->
EFlags
=
from
->
EFlags
;
to
->
MxCsr
=
from
->
MxCsr
;
}
if
(
flags
&
CONTEXT_INTEGER
)
{
...
...
@@ -1135,6 +1134,7 @@ void copy_context( CONTEXT *to, const CONTEXT *from, DWORD flags )
}
if
(
flags
&
CONTEXT_FLOATING_POINT
)
{
to
->
MxCsr
=
from
->
MxCsr
;
to
->
u
.
FltSave
=
from
->
u
.
FltSave
;
}
if
(
flags
&
CONTEXT_DEBUG_REGISTERS
)
...
...
@@ -1170,7 +1170,6 @@ NTSTATUS context_to_server( context_t *to, const CONTEXT *from )
to
->
ctl
.
x86_64_regs
.
cs
=
from
->
SegCs
;
to
->
ctl
.
x86_64_regs
.
ss
=
from
->
SegSs
;
to
->
ctl
.
x86_64_regs
.
flags
=
from
->
EFlags
;
to
->
ctl
.
x86_64_regs
.
mxcsr
=
from
->
MxCsr
;
}
if
(
flags
&
CONTEXT_INTEGER
)
{
...
...
@@ -1236,7 +1235,6 @@ NTSTATUS context_from_server( CONTEXT *to, const context_t *from )
to
->
SegCs
=
from
->
ctl
.
x86_64_regs
.
cs
;
to
->
SegSs
=
from
->
ctl
.
x86_64_regs
.
ss
;
to
->
EFlags
=
from
->
ctl
.
x86_64_regs
.
flags
;
to
->
MxCsr
=
from
->
ctl
.
x86_64_regs
.
mxcsr
;
}
if
(
from
->
flags
&
SERVER_CTX_INTEGER
)
...
...
@@ -1269,6 +1267,7 @@ NTSTATUS context_from_server( CONTEXT *to, const context_t *from )
{
to
->
ContextFlags
|=
CONTEXT_FLOATING_POINT
;
memcpy
(
&
to
->
u
.
FltSave
,
from
->
fp
.
x86_64_regs
.
fpregs
,
sizeof
(
from
->
fp
.
x86_64_regs
.
fpregs
)
);
to
->
MxCsr
=
to
->
u
.
FltSave
.
MxCsr
;
}
if
(
from
->
flags
&
SERVER_CTX_DEBUG_REGISTERS
)
{
...
...
include/wine/server_protocol.h
View file @
b8ae3f07
...
...
@@ -143,7 +143,7 @@ typedef struct
{
struct
{
unsigned
int
eip
,
ebp
,
esp
,
eflags
,
cs
,
ss
;
}
i386_regs
;
struct
{
unsigned
__int64
rip
,
rbp
,
rsp
;
unsigned
int
cs
,
ss
,
flags
,
mxcsr
;
}
x86_64_regs
;
unsigned
int
cs
,
ss
,
flags
;
}
x86_64_regs
;
struct
{
unsigned
__int64
fir
;
unsigned
int
psr
;
}
alpha_regs
;
struct
{
unsigned
int
iar
,
msr
,
ctr
,
lr
,
dar
,
dsisr
,
trap
;
}
powerpc_regs
;
...
...
@@ -5347,6 +5347,6 @@ union generic_reply
struct
set_window_layered_info_reply
set_window_layered_info_reply
;
};
#define SERVER_PROTOCOL_VERSION 3
89
#define SERVER_PROTOCOL_VERSION 3
90
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/protocol.def
View file @
b8ae3f07
...
...
@@ -159,7 +159,7 @@ typedef struct
{
struct { unsigned int eip, ebp, esp, eflags, cs, ss; } i386_regs;
struct { unsigned __int64 rip, rbp, rsp;
unsigned int cs, ss, flags
, mxcsr
; } x86_64_regs;
unsigned int cs, ss, flags; } x86_64_regs;
struct { unsigned __int64 fir;
unsigned int psr; } alpha_regs;
struct { unsigned int iar, msr, ctr, lr, dar, dsisr, trap; } powerpc_regs;
...
...
server/trace.c
View file @
b8ae3f07
...
...
@@ -457,9 +457,8 @@ static void dump_varargs_context( const char *prefix, data_size_t size )
dump_uint64
(
",rip="
,
&
ctx
.
ctl
.
x86_64_regs
.
rip
);
dump_uint64
(
",rbp="
,
&
ctx
.
ctl
.
x86_64_regs
.
rbp
);
dump_uint64
(
",rsp="
,
&
ctx
.
ctl
.
x86_64_regs
.
rsp
);
fprintf
(
stderr
,
",cs=%04x,ss=%04x,flags=%08x,mxcsr=%08x"
,
ctx
.
ctl
.
x86_64_regs
.
cs
,
ctx
.
ctl
.
x86_64_regs
.
ss
,
ctx
.
ctl
.
x86_64_regs
.
flags
,
ctx
.
ctl
.
x86_64_regs
.
mxcsr
);
fprintf
(
stderr
,
",cs=%04x,ss=%04x,flags=%08x"
,
ctx
.
ctl
.
x86_64_regs
.
cs
,
ctx
.
ctl
.
x86_64_regs
.
ss
,
ctx
.
ctl
.
x86_64_regs
.
flags
);
}
if
(
ctx
.
flags
&
SERVER_CTX_INTEGER
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment