From 1f98c98fffb09bf15a9fc04ecd5f1fa38a4bd4b8 Mon Sep 17 00:00:00 2001 From: Jacob Young Date: Fri, 13 Jun 2025 04:41:21 -0400 Subject: x86_64: increase passing test coverage on windows Now that codegen has no references to linker state this is much easier. Closes #24153 --- lib/compiler_rt/stack_probe.zig | 56 ++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 28 deletions(-) (limited to 'lib/compiler_rt/stack_probe.zig') diff --git a/lib/compiler_rt/stack_probe.zig b/lib/compiler_rt/stack_probe.zig index c45946900a..afc124196f 100644 --- a/lib/compiler_rt/stack_probe.zig +++ b/lib/compiler_rt/stack_probe.zig @@ -127,23 +127,23 @@ fn win_probe_stack_only() void { }, .x86_64 => { asm volatile ( - \\ push %%rcx - \\ push %%rax - \\ cmp $0x1000,%%rax - \\ lea 24(%%rsp),%%rcx + \\ pushq %%rcx + \\ pushq %%rax + \\ cmpq $0x1000,%%rax + \\ leaq 24(%%rsp),%%rcx \\ jb 1f \\ 2: - \\ sub $0x1000,%%rcx - \\ test %%rcx,(%%rcx) - \\ sub $0x1000,%%rax - \\ cmp $0x1000,%%rax + \\ subq $0x1000,%%rcx + \\ testq %%rcx,(%%rcx) + \\ subq $0x1000,%%rax + \\ cmpq $0x1000,%%rax \\ ja 2b \\ 1: - \\ sub %%rax,%%rcx - \\ test %%rcx,(%%rcx) - \\ pop %%rax - \\ pop %%rcx - \\ ret + \\ subq %%rax,%%rcx + \\ testq %%rcx,(%%rcx) + \\ popq %%rax + \\ popq %%rcx + \\ retq ); }, .x86 => { @@ -179,26 +179,26 @@ fn win_probe_stack_adjust_sp() void { switch (arch) { .x86_64 => { asm volatile ( - \\ push %%rcx - \\ cmp $0x1000,%%rax - \\ lea 16(%%rsp),%%rcx + \\ pushq %%rcx + \\ cmpq $0x1000,%%rax + \\ leaq 16(%%rsp),%%rcx \\ jb 1f \\ 2: - \\ sub $0x1000,%%rcx - \\ test %%rcx,(%%rcx) - \\ sub $0x1000,%%rax - \\ cmp $0x1000,%%rax + \\ subq $0x1000,%%rcx + \\ testq %%rcx,(%%rcx) + \\ subq $0x1000,%%rax + \\ cmpq $0x1000,%%rax \\ ja 2b \\ 1: - \\ sub %%rax,%%rcx - \\ test %%rcx,(%%rcx) + \\ subq %%rax,%%rcx + \\ testq %%rcx,(%%rcx) \\ - \\ lea 8(%%rsp),%%rax - \\ mov %%rcx,%%rsp - \\ mov -8(%%rax),%%rcx - \\ push (%%rax) - \\ sub %%rsp,%%rax - \\ ret + \\ leaq 8(%%rsp),%%rax + \\ movq %%rcx,%%rsp + \\ movq -8(%%rax),%%rcx + \\ pushq (%%rax) + \\ subq %%rsp,%%rax + \\ retq ); }, .x86 => { -- cgit v1.2.3