mailing list of musl libc
 help / color / mirror / code / Atom feed
f5b9dd9fec5383ed8bfed1df5af7876792bca28f blob 330 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 llrintf(float x)
{
    long long r;

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

    return r;
}
debug log:

solving f5b9dd9f ...
found f5b9dd9f 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/llrintf.c b/src/math/loongarch64/llrintf.c
new file mode 100644
index 00000000..f5b9dd9f

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

index at:
100644 f5b9dd9fec5383ed8bfed1df5af7876792bca28f	src/math/loongarch64/llrintf.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).