commit 4a3bb557f1612bc9955b1bf97519afd027acff03 (tree)
parent 8c4784f9c181a13eae36d7a1ac57f278cf5fcd72
Author: daurnimator <quae@daurnimator.com>
Date: Sun, 17 Nov 2019 13:59:52 +1100
std: fix outdated valgrind module
Diffstat:
3 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/lib/std/valgrind.zig b/lib/std/valgrind.zig
@@ -1,5 +1,6 @@
const builtin = @import("builtin");
-const math = @import("index.zig").math;
+const std = @import("std.zig");
+const math = std.math;
pub fn doClientRequest(default: usize, request: usize, a1: usize, a2: usize, a3: usize, a4: usize, a5: usize) usize {
if (!builtin.valgrind_support) {
@@ -13,7 +14,7 @@ pub fn doClientRequest(default: usize, request: usize, a1: usize, a2: usize, a3:
\\ roll $29, %%edi ; roll $19, %%edi
\\ xchgl %%ebx,%%ebx
: [_] "={edx}" (-> usize)
- : [_] "{eax}" (&[]usize{ request, a1, a2, a3, a4, a5 }),
+ : [_] "{eax}" (&[_]usize{ request, a1, a2, a3, a4, a5 }),
[_] "0" (default)
: "cc", "memory"
);
@@ -24,7 +25,7 @@ pub fn doClientRequest(default: usize, request: usize, a1: usize, a2: usize, a3:
\\ rolq $61, %%rdi ; rolq $51, %%rdi
\\ xchgq %%rbx,%%rbx
: [_] "={rdx}" (-> usize)
- : [_] "{rax}" (&[]usize{ request, a1, a2, a3, a4, a5 }),
+ : [_] "{rax}" (&[_]usize{ request, a1, a2, a3, a4, a5 }),
[_] "0" (default)
: "cc", "memory"
);
@@ -263,5 +264,5 @@ pub fn monitorCommand(command: [*]u8) bool {
return doClientRequestExpr(0, ClientRequest.GdbMonitorCommand, @ptrToInt(command.ptr), 0, 0, 0, 0) != 0;
}
-pub const memcheck = @import("memcheck.zig");
-pub const callgrind = @import("callgrind.zig");
+pub const memcheck = @import("valgrind/memcheck.zig");
+pub const callgrind = @import("valgrind/callgrind.zig");
diff --git a/lib/std/valgrind/callgrind.zig b/lib/std/valgrind/callgrind.zig
@@ -1,4 +1,4 @@
-const std = @import("../index.zig");
+const std = @import("../std.zig");
const valgrind = std.valgrind;
pub const CallgrindClientRequest = extern enum {
diff --git a/lib/std/valgrind/memcheck.zig b/lib/std/valgrind/memcheck.zig
@@ -1,4 +1,4 @@
-const std = @import("../index.zig");
+const std = @import("../std.zig");
const valgrind = std.valgrind;
pub const MemCheckClientRequest = extern enum {