Commit 85f1fbdb authored by Alexandre Julliard's avatar Alexandre Julliard

server: Clarify naming of ARM64 floating-point registers.

parent 0b2e65f5
...@@ -369,7 +369,11 @@ NTSTATUS context_to_server( context_t *to, const CONTEXT *from ) ...@@ -369,7 +369,11 @@ NTSTATUS context_to_server( context_t *to, const CONTEXT *from )
if (flags & CONTEXT_FLOATING_POINT) if (flags & CONTEXT_FLOATING_POINT)
{ {
to->flags |= SERVER_CTX_FLOATING_POINT; to->flags |= SERVER_CTX_FLOATING_POINT;
for (i = 0; i < 64; i++) to->fp.arm64_regs.d[i] = from->V[i / 2].D[i % 2]; for (i = 0; i < 32; i++)
{
to->fp.arm64_regs.q[i].low = from->V[i].s.Low;
to->fp.arm64_regs.q[i].high = from->V[i].s.High;
}
to->fp.arm64_regs.fpcr = from->Fpcr; to->fp.arm64_regs.fpcr = from->Fpcr;
to->fp.arm64_regs.fpsr = from->Fpsr; to->fp.arm64_regs.fpsr = from->Fpsr;
} }
...@@ -414,7 +418,11 @@ NTSTATUS context_from_server( CONTEXT *to, const context_t *from ) ...@@ -414,7 +418,11 @@ NTSTATUS context_from_server( CONTEXT *to, const context_t *from )
if (from->flags & SERVER_CTX_FLOATING_POINT) if (from->flags & SERVER_CTX_FLOATING_POINT)
{ {
to->ContextFlags |= CONTEXT_FLOATING_POINT; to->ContextFlags |= CONTEXT_FLOATING_POINT;
for (i = 0; i < 64; i++) to->V[i / 2].D[i % 2] = from->fp.arm64_regs.d[i]; for (i = 0; i < 32; i++)
{
to->V[i].s.Low = from->fp.arm64_regs.q[i].low;
to->V[i].s.High = from->fp.arm64_regs.q[i].high;
}
to->Fpcr = from->fp.arm64_regs.fpcr; to->Fpcr = from->fp.arm64_regs.fpcr;
to->Fpsr = from->fp.arm64_regs.fpsr; to->Fpsr = from->fp.arm64_regs.fpsr;
} }
......
...@@ -156,7 +156,7 @@ typedef struct ...@@ -156,7 +156,7 @@ typedef struct
struct { struct { unsigned __int64 low, high; } fpregs[32]; } x86_64_regs; struct { struct { unsigned __int64 low, high; } fpregs[32]; } x86_64_regs;
struct { double fpr[32], fpscr; } powerpc_regs; struct { double fpr[32], fpscr; } powerpc_regs;
struct { unsigned __int64 d[32]; unsigned int fpscr; } arm_regs; struct { unsigned __int64 d[32]; unsigned int fpscr; } arm_regs;
struct { unsigned __int64 d[64]; unsigned int fpcr, fpsr; } arm64_regs; struct { struct { unsigned __int64 low, high; } q[32]; unsigned int fpcr, fpsr; } arm64_regs;
} fp; } fp;
union union
{ {
......
...@@ -172,7 +172,7 @@ typedef struct ...@@ -172,7 +172,7 @@ typedef struct
struct { struct { unsigned __int64 low, high; } fpregs[32]; } x86_64_regs; struct { struct { unsigned __int64 low, high; } fpregs[32]; } x86_64_regs;
struct { double fpr[32], fpscr; } powerpc_regs; struct { double fpr[32], fpscr; } powerpc_regs;
struct { unsigned __int64 d[32]; unsigned int fpscr; } arm_regs; struct { unsigned __int64 d[32]; unsigned int fpscr; } arm_regs;
struct { unsigned __int64 d[64]; unsigned int fpcr, fpsr; } arm64_regs; struct { struct { unsigned __int64 low, high; } q[32]; unsigned int fpcr, fpsr; } arm64_regs;
} fp; /* selected by SERVER_CTX_FLOATING_POINT */ } fp; /* selected by SERVER_CTX_FLOATING_POINT */
union union
{ {
......
...@@ -727,10 +727,11 @@ static void dump_varargs_context( const char *prefix, data_size_t size ) ...@@ -727,10 +727,11 @@ static void dump_varargs_context( const char *prefix, data_size_t size )
} }
if (ctx.flags & SERVER_CTX_FLOATING_POINT) if (ctx.flags & SERVER_CTX_FLOATING_POINT)
{ {
for (i = 0; i < 64; i++) for (i = 0; i < 32; i++)
{ {
fprintf( stderr, ",d%u=", i ); fprintf( stderr, ",q%u=", i );
dump_uint64( "", &ctx.fp.arm64_regs.d[i] ); dump_uint64( "", &ctx.fp.arm64_regs.q[i].high );
dump_uint64( "", &ctx.fp.arm64_regs.q[i].low );
} }
fprintf( stderr, ",fpcr=%08x,fpsr=%08x", ctx.fp.arm64_regs.fpcr, ctx.fp.arm64_regs.fpsr ); fprintf( stderr, ",fpcr=%08x,fpsr=%08x", ctx.fp.arm64_regs.fpcr, ctx.fp.arm64_regs.fpsr );
} }
...@@ -5602,6 +5603,7 @@ static const struct ...@@ -5602,6 +5603,7 @@ static const struct
{ "PIPE_CLOSING", STATUS_PIPE_CLOSING }, { "PIPE_CLOSING", STATUS_PIPE_CLOSING },
{ "PIPE_CONNECTED", STATUS_PIPE_CONNECTED }, { "PIPE_CONNECTED", STATUS_PIPE_CONNECTED },
{ "PIPE_DISCONNECTED", STATUS_PIPE_DISCONNECTED }, { "PIPE_DISCONNECTED", STATUS_PIPE_DISCONNECTED },
{ "PIPE_EMPTY", STATUS_PIPE_EMPTY },
{ "PIPE_LISTENING", STATUS_PIPE_LISTENING }, { "PIPE_LISTENING", STATUS_PIPE_LISTENING },
{ "PIPE_NOT_AVAILABLE", STATUS_PIPE_NOT_AVAILABLE }, { "PIPE_NOT_AVAILABLE", STATUS_PIPE_NOT_AVAILABLE },
{ "PRIVILEGE_NOT_HELD", STATUS_PRIVILEGE_NOT_HELD }, { "PRIVILEGE_NOT_HELD", STATUS_PRIVILEGE_NOT_HELD },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment