authorgravatar for david@vortan.devDavid Rubin <david@vortan.dev> 2025-11-06 20:27:38-08:00
committergravatar for david@vortan.devDavid Rubin <david@vortan.dev> 2025-11-06 20:27:38-08:00
log483f9bd3670a52242d799dd4eee4273bdc714e8a
tree0c2dcdc6b5b14aa1e9706b4e2a0c9be0cb9130c2
parent09e4035e79caea3174bb3f60ba005fe5838d82e5
signaturelock-open Commit is signed but in an unrecognized format.

llvm: add extra clobbers to valgrind requests

This seems to work around a very puzzling miscompilation first present in LLVM 21.x. We already unconditionally add these clobbers to inline assembly that came from the source, the valgrind requests should also contain them.

1 files changed, 4 insertions(+), 4 deletions(-)

src/codegen/llvm.zig+4-4
...@@ -11672,7 +11672,7 @@ pub const FuncGen = struct {...@@ -11672,7 +11672,7 @@ pub const FuncGen = struct {
11672 \\ srl $$0, $$0, 1911672 \\ srl $$0, $$0, 19
11673 \\ or $$13, $$13, $$1311673 \\ or $$13, $$13, $$13
11674 ,11674 ,
11675 .constraints = "={$11},{$12},{$11},~{memory}",11675 .constraints = "={$11},{$12},{$11},~{memory},~{$1}",
11676 },11676 },
11677 .mips64, .mips64el => .{11677 .mips64, .mips64el => .{
11678 .template =11678 .template =
...@@ -11680,7 +11680,7 @@ pub const FuncGen = struct {...@@ -11680,7 +11680,7 @@ pub const FuncGen = struct {
11680 \\ dsll $$0, $$0, 29 ; dsll $$0, $$0, 1911680 \\ dsll $$0, $$0, 29 ; dsll $$0, $$0, 19
11681 \\ or $$13, $$13, $$1311681 \\ or $$13, $$13, $$13
11682 ,11682 ,
11683 .constraints = "={$11},{$12},{$11},~{memory}",11683 .constraints = "={$11},{$12},{$11},~{memory},~{$1}",
11684 },11684 },
11685 .powerpc, .powerpcle => .{11685 .powerpc, .powerpcle => .{
11686 .template =11686 .template =
...@@ -11727,7 +11727,7 @@ pub const FuncGen = struct {...@@ -11727,7 +11727,7 @@ pub const FuncGen = struct {
11727 \\ roll $$61, %edi ; roll $$51, %edi11727 \\ roll $$61, %edi ; roll $$51, %edi
11728 \\ xchgl %ebx, %ebx11728 \\ xchgl %ebx, %ebx
11729 ,11729 ,
11730 .constraints = "={edx},{eax},{edx},~{cc},~{memory}",11730 .constraints = "={edx},{eax},{edx},~{cc},~{memory},~{dirflag},~{fpsr},~{flags}",
11731 },11731 },
11732 .x86_64 => .{11732 .x86_64 => .{
11733 .template =11733 .template =
...@@ -11735,7 +11735,7 @@ pub const FuncGen = struct {...@@ -11735,7 +11735,7 @@ pub const FuncGen = struct {
11735 \\ rolq $$61, %rdi ; rolq $$51, %rdi11735 \\ rolq $$61, %rdi ; rolq $$51, %rdi
11736 \\ xchgq %rbx, %rbx11736 \\ xchgq %rbx, %rbx
11737 ,11737 ,
11738 .constraints = "={rdx},{rax},{rdx},~{cc},~{memory}",11738 .constraints = "={rdx},{rax},{rdx},~{cc},~{memory},~{dirflag},~{fpsr},~{flags}",
11739 },11739 },
11740 else => unreachable,11740 else => unreachable,
11741 };11741 };