Support Num.toStr for f32, f64

This commit is contained in:
Ayaz Hafiz 2022-07-13 12:13:01 -04:00
parent 6ac9c37e06
commit b7c312d449
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
7 changed files with 79 additions and 14 deletions

View file

@ -1958,10 +1958,10 @@ impl<'a> LowLevelCall<'a> {
FloatWidth::F32 => {
self.load_args(backend);
backend.code_builder.f64_promote_f32();
self.load_args_and_call_zig(backend, bitcode::STR_FROM_FLOAT);
self.load_args_and_call_zig(backend, &bitcode::STR_FROM_FLOAT[width]);
}
FloatWidth::F64 => {
self.load_args_and_call_zig(backend, bitcode::STR_FROM_FLOAT);
self.load_args_and_call_zig(backend, &bitcode::STR_FROM_FLOAT[width]);
}
FloatWidth::F128 => todo!("F128 to Str"),
},