Jacek Caban : winebuild: Remove no longer needed stack alignment in x86_64 syscall dispatcher.
Alexandre Julliard
julliard at winehq.org
Wed Feb 17 16:23:32 CST 2021
Module: wine
Branch: master
Commit: 877f06d123354827640109dd25185eb8d3f608be
URL: https://source.winehq.org/git/wine.git/?a=commit;h=877f06d123354827640109dd25185eb8d3f608be
Author: Jacek Caban <jacek at codeweavers.com>
Date: Mon Feb 15 21:57:48 2021 +0100
winebuild: Remove no longer needed stack alignment in x86_64 syscall dispatcher.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
tools/winebuild/import.c | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c
index fda1fe90541..cddc5a2251f 100644
--- a/tools/winebuild/import.c
+++ b/tools/winebuild/import.c
@@ -1528,25 +1528,23 @@ void output_syscalls( DLLSPEC *spec )
output( "\tleaq -0x38(%%rbp),%%rbx\n" );
output( "\tmovq %%rbx,0x328(%%rcx)\n" ); /* amd64_thread_data()->syscall_frame */
output( "\tcmpq $%u,%%rax\n", count );
- output( "\tjae 4f\n" );
+ output( "\tjae 3f\n" );
output( "\tleaq .Lsyscall_args(%%rip),%%rcx\n" );
output( "\tmovzbl (%%rcx,%%rax),%%ecx\n" );
output( "\tsubq $0x20,%%rcx\n" );
- output( "\tja 1f\n" );
- output( "\tandq $~15,%%rsp\n\t" );
- output( "\tjmp 2f\n" );
- output( "1:\tsubq %%rcx,%%rsp\n" );
+ output( "\tjbe 1f\n" );
+ output( "\tsubq %%rcx,%%rsp\n" );
output( "\tshrq $3,%%rcx\n" );
output( "\tleaq 0x38(%%rbp),%%rsi\n" );
output( "\tandq $~15,%%rsp\n\t" );
output( "\tmovq %%rsp,%%rdi\n" );
output( "\tcld\n" );
output( "\trep; movsq\n" );
- output( "2:\tmovq %%r10,%%rcx\n" );
+ output( "1:\tmovq %%r10,%%rcx\n" );
output( "\tsubq $0x20,%%rsp\n" );
output( "\tleaq .Lsyscall_table(%%rip),%%r10\n" );
output( "\tcallq *(%%r10,%%rax,8)\n" );
- output( "3:\tmovq %%gs:0x30,%%rcx\n" );
+ output( "2:\tmovq %%gs:0x30,%%rcx\n" );
output( "\tmovq $0,0x328(%%rcx)\n" );
output( "\tmovq -0x18(%%rbp),%%rdi\n" );
output_cfi( ".cfi_same_value %%rdi" );
@@ -1559,8 +1557,8 @@ void output_syscalls( DLLSPEC *spec )
output_cfi( ".cfi_adjust_cfa_offset -8" );
output_cfi( ".cfi_same_value %%rbp" );
output( "\tret\n" );
- output( "4:\tmovl $0x%x,%%eax\n", invalid_param );
- output( "\tjmp 3b\n" );
+ output( "3:\tmovl $0x%x,%%eax\n", invalid_param );
+ output( "\tjmp 2b\n" );
break;
case CPU_ARM:
output( "\tpush {r5-r11,lr}\n" );
More information about the wine-cvs
mailing list