diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-11-19 19:32:26 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-11-19 19:32:45 -0700 |
| commit | 78389af55266d58e699a4d982e00afb6cce7ec64 (patch) | |
| tree | fdb479dc59ff6e65c06d14866be3ac848965201e /src/target.zig | |
| parent | 95e135a8cb614f1ef8a8bbe38717fc533c2c2cef (diff) | |
| download | zig-78389af55266d58e699a4d982e00afb6cce7ec64.tar.gz zig-78389af55266d58e699a4d982e00afb6cce7ec64.zip | |
LLVM: add valgrind integration for x86 and aarch64
This also modifies the inline assembly to be more optimizable - instead of
doing explicit movs, we instead communicate to LLVM which registers we
would like to, somehow, have the correct values. This is how the x86_64
code already worked and thus allows the code to be unified across the
two architectures.
As a bonus, I threw in x86 support.
Diffstat (limited to 'src/target.zig')
| -rw-r--r-- | src/target.zig | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/target.zig b/src/target.zig index 23aff0f256..90cc50db23 100644 --- a/src/target.zig +++ b/src/target.zig @@ -211,7 +211,12 @@ pub fn isSingleThreaded(target: std.Target) bool { /// Valgrind supports more, but Zig does not support them yet. pub fn hasValgrindSupport(target: std.Target) bool { switch (target.cpu.arch) { - .x86_64 => { + .x86, + .x86_64, + .aarch64, + .aarch64_32, + .aarch64_be, + => { return target.os.tag == .linux or target.os.tag == .solaris or (target.os.tag == .windows and target.abi != .msvc); }, |
