=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: winebuild: Emit relay debugging thunks for ARM64.
Alexandre Julliard
julliard at winehq.org
Tue Jun 13 16:14:51 CDT 2017
Module: wine
Branch: master
Commit: eed3bb6dfd52a4e520bd9e2d86ed186b9f3cc688
URL: http://source.winehq.org/git/wine.git/?a=commit;h=eed3bb6dfd52a4e520bd9e2d86ed186b9f3cc688
Author: André Hentschel <nerv at dawncrow.de>
Date: Mon Jun 12 20:30:43 2017 +0200
winebuild: Emit relay debugging thunks for ARM64.
Signed-off-by: André Hentschel <nerv at dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
tools/winebuild/spec32.c | 39 ++++++++++++++++++++++++++++++++++++++-
1 file changed, 38 insertions(+), 1 deletion(-)
diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c
index f3feb0f..39733b2 100644
--- a/tools/winebuild/spec32.c
+++ b/tools/winebuild/spec32.c
@@ -84,7 +84,9 @@ static int has_relays( DLLSPEC *spec )
{
int i;
- if (target_cpu != CPU_x86 && target_cpu != CPU_x86_64 && target_cpu != CPU_ARM) return 0;
+ if (target_cpu != CPU_x86 && target_cpu != CPU_x86_64 &&
+ target_cpu != CPU_ARM && target_cpu != CPU_ARM64)
+ return 0;
for (i = spec->base; i <= spec->limit; i++)
{
@@ -242,6 +244,41 @@ static void output_relay_debug( DLLSPEC *spec )
break;
}
+ case CPU_ARM64:
+ switch (args)
+ {
+ default:
+ case 8:
+ case 7: output( "\tstp x6, x7, [SP,#-16]!\n" );
+ /* fall through */
+ case 6:
+ case 5: output( "\tstp x4, x5, [SP,#-16]!\n" );
+ /* fall through */
+ case 4:
+ case 3: output( "\tstp x2, x3, [SP,#-16]!\n" );
+ /* fall through */
+ case 2:
+ case 1: output( "\tstp x0, x1, [SP,#-16]!\n" );
+ /* fall through */
+ case 0: break;
+ }
+ output( "\tstp x29, x30, [SP,#-16]!\n" );
+ output( "\tstp x8, x9, [SP,#-16]!\n" );
+ output( "\tmov x2, SP\n");
+ if (odp->flags & FLAG_RET64) flags |= 1;
+ output( "\tmov w1, #%u\n", (flags << 24) );
+ if (args) output( "\tadd w1, w1, #%u\n", (args << 16) );
+ if (i - spec->base) output( "\tadd w1, w1, #%u\n", i - spec->base );
+ output( "\tldr x0, 1f\n");
+ output( "\tldr x3, [x0, #8]\n");
+ output( "\tblr x3\n");
+ output( "\tadd SP, SP, #16\n" );
+ output( "\tldp x29, x30, [SP], #16\n" );
+ if (args) output( "\tadd SP, SP, #%u\n", 8 * ((min(args, 8) + 1) & 0xe) );
+ output( "\tret\n");
+ output( "\t1: .quad .L__wine_spec_relay_descr\n");
+ break;
+
case CPU_x86_64:
output( "\tsubq $40,%%rsp\n" );
output_cfi( ".cfi_adjust_cfa_offset 40" );
More information about the wine-cvs
mailing list