aboutsummaryrefslogtreecommitdiff
path: root/src/value.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-03-14 12:38:56 -0400
committerGitHub <noreply@github.com>2022-03-14 12:38:56 -0400
commit5919b10048be6efa8c0ca6bcb259706098b2d5ec (patch)
tree307c504b85c9aee16602e667db1a5db5c25e1fff /src/value.zig
parentcb3b1dd6ddee65d1811fb4058b5cc0f2c06d0139 (diff)
parentb2a1b4c085b93d508c51307f40444252b8cd4d52 (diff)
downloadzig-5919b10048be6efa8c0ca6bcb259706098b2d5ec.tar.gz
zig-5919b10048be6efa8c0ca6bcb259706098b2d5ec.zip
Merge pull request #11155 from ziglang/stage2-float-fixes
stage2 float fixes
Diffstat (limited to 'src/value.zig')
-rw-r--r--src/value.zig19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/value.zig b/src/value.zig
index 9117ef78df..6ab3adba36 100644
--- a/src/value.zig
+++ b/src/value.zig
@@ -3931,15 +3931,12 @@ pub const Value = extern union {
},
80 => {
if (true) {
- @panic("TODO implement compiler_rt fabs for f80");
+ @panic("TODO implement compiler_rt fabs for f80 (__fabsx)");
}
const f = val.toFloat(f80);
return Value.Tag.float_80.create(arena, @fabs(f));
},
128 => {
- if (true) {
- @panic("TODO implement compiler_rt fabs for f128");
- }
const f = val.toFloat(f128);
return Value.Tag.float_128.create(arena, @fabs(f));
},
@@ -3963,15 +3960,12 @@ pub const Value = extern union {
},
80 => {
if (true) {
- @panic("TODO implement compiler_rt floor for f80");
+ @panic("TODO implement compiler_rt floor for f80 (__floorx)");
}
const f = val.toFloat(f80);
return Value.Tag.float_80.create(arena, @floor(f));
},
128 => {
- if (true) {
- @panic("TODO implement compiler_rt floor for f128");
- }
const f = val.toFloat(f128);
return Value.Tag.float_128.create(arena, @floor(f));
},
@@ -4001,9 +3995,6 @@ pub const Value = extern union {
return Value.Tag.float_80.create(arena, @ceil(f));
},
128 => {
- if (true) {
- @panic("TODO implement compiler_rt ceil for f128");
- }
const f = val.toFloat(f128);
return Value.Tag.float_128.create(arena, @ceil(f));
},
@@ -4033,9 +4024,6 @@ pub const Value = extern union {
return Value.Tag.float_80.create(arena, @round(f));
},
128 => {
- if (true) {
- @panic("TODO implement compiler_rt round for f128");
- }
const f = val.toFloat(f128);
return Value.Tag.float_128.create(arena, @round(f));
},
@@ -4065,9 +4053,6 @@ pub const Value = extern union {
return Value.Tag.float_80.create(arena, @trunc(f));
},
128 => {
- if (true) {
- @panic("TODO implement compiler_rt trunc for f128");
- }
const f = val.toFloat(f128);
return Value.Tag.float_128.create(arena, @trunc(f));
},