diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-04-29 00:19:55 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-29 00:19:55 -0700 |
| commit | d65b42e07caa00dfe2f2fbf221c593ce57882784 (patch) | |
| tree | 7926cbea1499e0affe930bf6d7455dc24adf014e /src/arch/x86_64/encoder.zig | |
| parent | fd6200eda6d4fe19c34a59430a88a9ce38d6d7a4 (diff) | |
| parent | fa200ca0cad2705bad40eb723dedf4e3bf11f2ff (diff) | |
| download | zig-d65b42e07caa00dfe2f2fbf221c593ce57882784.tar.gz zig-d65b42e07caa00dfe2f2fbf221c593ce57882784.zip | |
Merge pull request #15481 from ziglang/use-mem-intrinsics
actually use the new memory intrinsics
Diffstat (limited to 'src/arch/x86_64/encoder.zig')
| -rw-r--r-- | src/arch/x86_64/encoder.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/arch/x86_64/encoder.zig b/src/arch/x86_64/encoder.zig index 73b40ea3be..329dfca924 100644 --- a/src/arch/x86_64/encoder.zig +++ b/src/arch/x86_64/encoder.zig @@ -182,7 +182,7 @@ pub const Instruction = struct { .encoding = encoding, .ops = [1]Operand{.none} ** 4, }; - std.mem.copy(Operand, &inst.ops, ops); + @memcpy(inst.ops[0..ops.len], ops); return inst; } @@ -859,7 +859,7 @@ fn expectEqualHexStrings(expected: []const u8, given: []const u8, assembly: []co const idx = std.mem.indexOfDiff(u8, expected_fmt, given_fmt).?; var padding = try testing.allocator.alloc(u8, idx + 5); defer testing.allocator.free(padding); - std.mem.set(u8, padding, ' '); + @memset(padding, ' '); std.debug.print("\nASM: {s}\nEXP: {s}\nGIV: {s}\n{s}^ -- first differing byte\n", .{ assembly, expected_fmt, |
