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

    __asm__ __volatile__(
    "frint.s %[x], %[orig_x]             \n\t"
    "ftintrz.l.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 b30872e9 ...
found b30872e9 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/lrintf.c b/src/math/loongarch64/lrintf.c
new file mode 100644
index 00000000..b30872e9

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

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