From a028488384c599aa997ba04bbd5ed98f2172630c Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 7 Feb 2022 16:48:37 -0700 Subject: Sema: clean up zirUnaryMath * pass air_tag instead of zir_tag * also pass eval function so that the branch only happens once and the body of zirUnaryMath is simplified * Value.sqrt: update to handle f80 and f128 in the normalized way that includes handling c_longdouble. Semi-related change: fix incorrect sqrt builtin name for f80 in stage1. --- src/stage1/codegen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/stage1/codegen.cpp') diff --git a/src/stage1/codegen.cpp b/src/stage1/codegen.cpp index 02f84beeab..c06f71e834 100644 --- a/src/stage1/codegen.cpp +++ b/src/stage1/codegen.cpp @@ -6996,7 +6996,7 @@ static LLVMValueRef ir_render_soft_f80_float_op(CodeGen *g, Stage1Air *executabl const char *func_name; switch (instruction->fn_id) { case BuiltinFnIdSqrt: - func_name = "__sqrt"; + func_name = "__sqrtx"; break; case BuiltinFnIdSin: func_name = "__sinx"; -- cgit v1.2.3