authorgravatar for jacobly@ziglang.orgJacob Young <jacobly@ziglang.org> 2023-10-27 01:39:57-04:00
committergravatar for jacobly@ziglang.orgJacob Young <jacobly@ziglang.org> 2023-10-27 01:40:27-04:00
log42bca3e2ee3adcfcdb7282c6eaa60f93ad6625cd
tree2cb437a0bfb247cf5c167bfd8c5bc7ae754e28ed
parent434a7db986d1ffd2d1e6b7d4bb69873ed05c7980

x86_64: fix `@memset`


2 files changed, 1 insertions(+), 14 deletions(-)

lib/std/zig/parser_test.zig-14
...@@ -748,8 +748,6 @@ test "zig fmt: anon literal in array" {...@@ -748,8 +748,6 @@ test "zig fmt: anon literal in array" {
748}748}
749749
750test "zig fmt: alignment in anonymous literal" {750test "zig fmt: alignment in anonymous literal" {
751 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
752
753 try testTransform(751 try testTransform(
754 \\const a = .{752 \\const a = .{
755 \\ "U", "L", "F",753 \\ "U", "L", "F",
...@@ -1953,8 +1951,6 @@ test "zig fmt: struct literal containing a multiline expression" {...@@ -1953,8 +1951,6 @@ test "zig fmt: struct literal containing a multiline expression" {
1953}1951}
19541952
1955test "zig fmt: array literal with hint" {1953test "zig fmt: array literal with hint" {
1956 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
1957
1958 try testTransform(1954 try testTransform(
1959 \\const a = []u8{1955 \\const a = []u8{
1960 \\ 1, 2, //1956 \\ 1, 2, //
...@@ -2032,8 +2028,6 @@ test "zig fmt: array literal with hint" {...@@ -2032,8 +2028,6 @@ test "zig fmt: array literal with hint" {
2032}2028}
20332029
2034test "zig fmt: array literal vertical column alignment" {2030test "zig fmt: array literal vertical column alignment" {
2035 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
2036
2037 try testTransform(2031 try testTransform(
2038 \\const a = []u8{2032 \\const a = []u8{
2039 \\ 1000, 200,2033 \\ 1000, 200,
...@@ -2266,8 +2260,6 @@ test "zig fmt: slice align" {...@@ -2266,8 +2260,6 @@ test "zig fmt: slice align" {
2266}2260}
22672261
2268test "zig fmt: add trailing comma to array literal" {2262test "zig fmt: add trailing comma to array literal" {
2269 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
2270
2271 try testTransform(2263 try testTransform(
2272 \\comptime {2264 \\comptime {
2273 \\ return []u16{'m', 's', 'y', 's', '-' // hi2265 \\ return []u16{'m', 's', 'y', 's', '-' // hi
...@@ -3803,8 +3795,6 @@ test "zig fmt: fix single statement if/for/while line breaks" {...@@ -3803,8 +3795,6 @@ test "zig fmt: fix single statement if/for/while line breaks" {
3803}3795}
38043796
3805test "zig fmt: anon struct/array literal in if" {3797test "zig fmt: anon struct/array literal in if" {
3806 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
3807
3808 try testCanonical(3798 try testCanonical(
3809 \\test {3799 \\test {
3810 \\ const a = if (cond) .{3800 \\ const a = if (cond) .{
...@@ -4699,8 +4689,6 @@ test "zig fmt: regression test for #8974" {...@@ -4699,8 +4689,6 @@ test "zig fmt: regression test for #8974" {
4699}4689}
47004690
4701test "zig fmt: allow trailing line comments to do manual array formatting" {4691test "zig fmt: allow trailing line comments to do manual array formatting" {
4702 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
4703
4704 try testCanonical(4692 try testCanonical(
4705 \\fn foo() void {4693 \\fn foo() void {
4706 \\ self.code.appendSliceAssumeCapacity(&[_]u8{4694 \\ self.code.appendSliceAssumeCapacity(&[_]u8{
...@@ -4739,8 +4727,6 @@ test "zig fmt: allow trailing line comments to do manual array formatting" {...@@ -4739,8 +4727,6 @@ test "zig fmt: allow trailing line comments to do manual array formatting" {
4739}4727}
47404728
4741test "zig fmt: multiline string literals should play nice with array initializers" {4729test "zig fmt: multiline string literals should play nice with array initializers" {
4742 if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest;
4743
4744 try testCanonical(4730 try testCanonical(
4745 \\fn main() void {4731 \\fn main() void {
4746 \\ var a = .{.{.{.{.{.{.{.{4732 \\ var a = .{.{.{.{.{.{.{.{
src/arch/x86_64/CodeGen.zig+1
...@@ -13366,6 +13366,7 @@ fn airMemset(self: *Self, inst: Air.Inst.Index, safety: bool) !void {...@@ -13366,6 +13366,7 @@ fn airMemset(self: *Self, inst: Air.Inst.Index, safety: bool) !void {
13366 defer self.register_manager.unlockReg(len_lock);13366 defer self.register_manager.unlockReg(len_lock);
1336713367
13368 try self.genSetReg(len_reg, Type.usize, len);13368 try self.genSetReg(len_reg, Type.usize, len);
13369 try self.asmRegisterRegister(.{ ._, .@"test" }, len_reg, len_reg);
1336913370
13370 const skip_reloc = try self.asmJccReloc(.z, undefined);13371 const skip_reloc = try self.asmJccReloc(.z, undefined);
13371 try self.store(slice_ptr_ty, ptr, src_val);13372 try self.store(slice_ptr_ty, ptr, src_val);