aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Young <jacobly0@users.noreply.github.com>2023-05-08 16:43:57 -0400
committerJacob Young <jacobly0@users.noreply.github.com>2023-05-15 03:07:51 -0400
commit019c8844811ffb8b385ac8891cfd17cbf60d104a (patch)
treeb9e6b0d64430907d9b44bd61abb802722262cd7c
parent6f3dacc1073c30d10f640fe630580a4866cbd9db (diff)
downloadzig-019c8844811ffb8b385ac8891cfd17cbf60d104a.tar.gz
zig-019c8844811ffb8b385ac8891cfd17cbf60d104a.zip
x86_64: add missing multply of `f16`
-rw-r--r--src/arch/x86_64/CodeGen.zig5
-rw-r--r--test/behavior/floatop.zig2
2 files changed, 6 insertions, 1 deletions
diff --git a/src/arch/x86_64/CodeGen.zig b/src/arch/x86_64/CodeGen.zig
index 2dc1cc8ee4..63e3416079 100644
--- a/src/arch/x86_64/CodeGen.zig
+++ b/src/arch/x86_64/CodeGen.zig
@@ -6345,6 +6345,7 @@ fn genBinOp(
switch (air_tag) {
.add => .{ .v_ss, .add },
.sub => .{ .v_ss, .sub },
+ .mul => .{ .v_ss, .mul },
.div_float, .div_trunc, .div_floor, .div_exact => .{ .v_ss, .div },
.max => .{ .v_ss, .max },
.min => .{ .v_ss, .max },
@@ -6421,6 +6422,7 @@ fn genBinOp(
switch (air_tag) {
.add => .{ .v_ss, .add },
.sub => .{ .v_ss, .sub },
+ .mul => .{ .v_ss, .mul },
.div_float, .div_trunc, .div_floor, .div_exact => .{ .v_ss, .div },
.max => .{ .v_ss, .max },
.min => .{ .v_ss, .max },
@@ -6468,6 +6470,7 @@ fn genBinOp(
switch (air_tag) {
.add => .{ .v_ps, .add },
.sub => .{ .v_ps, .sub },
+ .mul => .{ .v_ps, .mul },
.div_float, .div_trunc, .div_floor, .div_exact => .{ .v_ps, .div },
.max => .{ .v_ps, .max },
.min => .{ .v_ps, .max },
@@ -6507,6 +6510,7 @@ fn genBinOp(
switch (air_tag) {
.add => .{ .v_ps, .add },
.sub => .{ .v_ps, .sub },
+ .mul => .{ .v_ps, .mul },
.div_float, .div_trunc, .div_floor, .div_exact => .{ .v_ps, .div },
.max => .{ .v_ps, .max },
.min => .{ .v_ps, .max },
@@ -6546,6 +6550,7 @@ fn genBinOp(
switch (air_tag) {
.add => .{ .v_ps, .add },
.sub => .{ .v_ps, .sub },
+ .mul => .{ .v_ps, .mul },
.div_float, .div_trunc, .div_floor, .div_exact => .{ .v_ps, .div },
.max => .{ .v_ps, .max },
.min => .{ .v_ps, .max },
diff --git a/test/behavior/floatop.zig b/test/behavior/floatop.zig
index d2035c656f..9d17b05865 100644
--- a/test/behavior/floatop.zig
+++ b/test/behavior/floatop.zig
@@ -184,7 +184,7 @@ test "more @sqrt f16 tests" {
test "another, possibly redundant @sqrt test" {
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
- if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO
+ if (no_x86_64_hardware_f16_support) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
try testSqrtLegacy(f64, 12.0);