diff options
m--------- | deps/ejit | 0 | ||||
-rw-r--r-- | src/main.c | 13 |
2 files changed, 1 insertions, 12 deletions
diff --git a/deps/ejit b/deps/ejit -Subproject 449c23ebc32eb45f8a6360c472bfbf5db6cd132 +Subproject 478c92b425eca53a0d884fb8f5dea8d76901685 @@ -30,13 +30,6 @@ enum op { OP_SQRT }; -static float escape_sqrt(size_t argc, const struct ejit_arg args[argc]) -{ - assert(argc == 1); - assert(args[0].type == EJIT_FLOAT); - return sqrtf(args[0].f); -} - static const char *skip_whitespace(const char *line) { while (*line && isspace(*line)) @@ -241,11 +234,7 @@ static size_t compile_line(struct ejit_func *kernel, const char *line) case OP_SQRT: { size_t arg = 0; line = parse_var(line, &arg); - /* unfortunately no built-in operation for sqrt so we have to do - * an expensive call */ - struct ejit_operand op = EJIT_OPERAND_FPR(arg, EJIT_FLOAT); - ejit_escapei_f(kernel, escape_sqrt, 1, &op); - ejit_retval_f(kernel, EJIT_FPR(out)); + ejit_sqrtr_f(kernel, EJIT_FPR(out), EJIT_FPR(arg)); break; } |