server: Avoid unaligned access when printing x86 floating point registers.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2016-07-22 11:49:37 +09:00
parent a02c7ce751
commit 0b933f1f48
1 changed files with 5 additions and 1 deletions

View File

@ -567,7 +567,11 @@ static void dump_varargs_context( const char *prefix, data_size_t size )
fprintf( stderr, ",fp.data_off=%08x,fp.data_sel=%08x,fp.cr0npx=%08x", fprintf( stderr, ",fp.data_off=%08x,fp.data_sel=%08x,fp.cr0npx=%08x",
ctx.fp.i386_regs.data_off, ctx.fp.i386_regs.data_sel, ctx.fp.i386_regs.cr0npx ); ctx.fp.i386_regs.data_off, ctx.fp.i386_regs.data_sel, ctx.fp.i386_regs.cr0npx );
for (i = 0; i < 8; i++) for (i = 0; i < 8; i++)
fprintf( stderr, ",fp.reg%u=%Lg", i, *(long double *)&ctx.fp.i386_regs.regs[10*i] ); {
long double reg = 0;
memcpy( &reg, &ctx.fp.i386_regs.regs[10 * i], 10 );
fprintf( stderr, ",fp.reg%u=%Lg", i, reg );
}
} }
if (ctx.flags & SERVER_CTX_EXTENDED_REGISTERS) if (ctx.flags & SERVER_CTX_EXTENDED_REGISTERS)
{ {