mailing list of musl libc
 help / color / mirror / code / Atom feed
766222d3a2530013d9b93d7878383ae863126c60 blob 333 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
 
#include <math.h>
#include <stdint.h>

long long llrint(double x)
{
    long long r;

    __asm__ __volatile__(
    "frint.d %[x], %[orig_x]             \n\t"
    "ftintrz.l.d %[x], %[x]              \n\t"
    "movfr2gr.d %[result], %[x]          \n\t"
    : [result]"+r"(r), [x]"+f"(x)
    : [orig_x]"f"(x)
    :);

    return r;
}
debug log:

solving 766222d3 ...
found 766222d3 in https://inbox.vuxu.org/musl/20240423022619.1253464-1-fanpeng@loongson.cn/

applying [1/1] https://inbox.vuxu.org/musl/20240423022619.1253464-1-fanpeng@loongson.cn/
diff --git a/src/math/loongarch64/llrint.c b/src/math/loongarch64/llrint.c
new file mode 100644
index 00000000..766222d3

Checking patch src/math/loongarch64/llrint.c...
Applied patch src/math/loongarch64/llrint.c cleanly.

index at:
100644 766222d3a2530013d9b93d7878383ae863126c60	src/math/loongarch64/llrint.c

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).