mirror of
https://github.com/ziglang/zig.git
synced 2026-01-21 06:45:24 +00:00
x86_64: implement movement for pointer vectors
This commit is contained in:
parent
0be7c23f11
commit
485e20884c
@ -13046,6 +13046,24 @@ fn moveStrategy(self: *Self, ty: Type, class: Register.Class, aligned: bool) !Mo
|
||||
},
|
||||
else => {},
|
||||
},
|
||||
.Pointer, .Optional => if (ty.childType(mod).isPtrAtRuntime(mod))
|
||||
switch (ty.vectorLen(mod)) {
|
||||
1 => return .{ .move = if (self.hasFeature(.avx))
|
||||
.{ .v_q, .mov }
|
||||
else
|
||||
.{ ._q, .mov } },
|
||||
2 => return .{ .move = if (self.hasFeature(.avx))
|
||||
if (aligned) .{ .v_, .movdqa } else .{ .v_, .movdqu }
|
||||
else if (aligned) .{ ._, .movdqa } else .{ ._, .movdqu } },
|
||||
3...4 => if (self.hasFeature(.avx))
|
||||
return .{ .move = if (aligned)
|
||||
.{ .v_, .movdqa }
|
||||
else
|
||||
.{ .v_, .movdqu } },
|
||||
else => {},
|
||||
}
|
||||
else
|
||||
unreachable,
|
||||
.Float => switch (ty.childType(mod).floatBits(self.target.*)) {
|
||||
16 => switch (ty.vectorLen(mod)) {
|
||||
1 => return if (self.hasFeature(.avx)) .{ .vex_insert_extract = .{
|
||||
|
||||
@ -2355,7 +2355,6 @@ test "@ptrFromInt on vector" {
|
||||
|
||||
test "@intFromPtr on vector" {
|
||||
if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user