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 {
1167211672 \\ srl $$0, $$0, 19
1167311673 \\ or $$13, $$13, $$13
1167411674 ,
11675 .constraints = "={$11},{$12},{$11},~{memory}",
11675 .constraints = "={$11},{$12},{$11},~{memory},~{$1}",
1167611676 },
1167711677 .mips64, .mips64el => .{
1167811678 .template =
......@@ -11680,7 +11680,7 @@ pub const FuncGen = struct {
1168011680 \\ dsll $$0, $$0, 29 ; dsll $$0, $$0, 19
1168111681 \\ or $$13, $$13, $$13
1168211682 ,
11683 .constraints = "={$11},{$12},{$11},~{memory}",
11683 .constraints = "={$11},{$12},{$11},~{memory},~{$1}",
1168411684 },
1168511685 .powerpc, .powerpcle => .{
1168611686 .template =
......@@ -11727,7 +11727,7 @@ pub const FuncGen = struct {
1172711727 \\ roll $$61, %edi ; roll $$51, %edi
1172811728 \\ xchgl %ebx, %ebx
1172911729 ,
11730 .constraints = "={edx},{eax},{edx},~{cc},~{memory}",
11730 .constraints = "={edx},{eax},{edx},~{cc},~{memory},~{dirflag},~{fpsr},~{flags}",
1173111731 },
1173211732 .x86_64 => .{
1173311733 .template =
......@@ -11735,7 +11735,7 @@ pub const FuncGen = struct {
1173511735 \\ rolq $$61, %rdi ; rolq $$51, %rdi
1173611736 \\ xchgq %rbx, %rbx
1173711737 ,
11738 .constraints = "={rdx},{rax},{rdx},~{cc},~{memory}",
11738 .constraints = "={rdx},{rax},{rdx},~{cc},~{memory},~{dirflag},~{fpsr},~{flags}",
1173911739 },
1174011740 else => unreachable,
1174111741 };