mailing list of musl libc
 help / color / mirror / code / Atom feed
beb2868e4a08c2e23417e7068edbf668263d0617 blob 1525 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
 
#ifndef __loongarch_soft_float

.global	feclearexcept
.type	feclearexcept,@function
feclearexcept:
	//andi	$a0, $a0, 0x1f0000 // la: exception bits in 16-20 bit of fcsr0.
        li      $a1, 0x1f0000
        and     $a0, $a0, $a1
	movfcsr2gr $a1, $r0 // r0 is fpu control status register 0(fcsr0), r0 -> fcsr0, r1 -> fcsr1, r2 -> fcsr2, r3 - fcsr3
	or	$a1, $a1, $a0
	xor	$a1, $a1, $a0
	movgr2fcsr $r0, $a1
        li      $v0, 0
	jr	$ra

.global	feraiseexcept
.type	feraiseexcept,@function
feraiseexcept:
	//andi	$a0, $a0, 0x1f0000
        li      $a1, 0x1f0000
        and     $a0, $a0, $a1
	movfcsr2gr $a1, $r0
	or	$a1, $a1, $a0
	movgr2fcsr $r0, $a1
        li      $v0, 0
	jr	$ra

.global	fetestexcept
.type	fetestexcept,@function
fetestexcept:
	//andi	$a0, $a0, 0x1f0000
        li      $a1, 0x1f0000
        and     $a0, $a0, $a1
	movfcsr2gr $a1, $r0
        and     $v0, $a1, $a0
	jr	$ra

.global	fegetround
.type	fegetround,@function
fegetround:
	movfcsr2gr $v0, $r0
        andi    $v0, $v0, 0x300 // RM
	jr	$ra

.global	__fesetround
.hidden __fesetround
.type	__fesetround,@function
__fesetround:
	movfcsr2gr $a1, $r0
	li	$a2, -769
	and	$a1, $a1, $a2
	or	$a1, $a1, $a0
	movgr2fcsr $r0, $a1
        li      $v0, 0
	jr	$ra

.global	fegetenv
.type	fegetenv,@function
fegetenv:
	movfcsr2gr $a1, $r0
	st.w	$a1, $a0, 0
        li      $v0, 0
	jr	$ra

.global	fesetenv
.type	fesetenv,@function
fesetenv:
	addi.d	$a1, $a0, 1
	beq	$a1, $r0, 1f
	ld.w	$a1, $a0, 0
1:	movgr2fcsr $r0, $a1
        li      $v0, 0
	jr	$ra

#endif
debug log:

solving beb2868e ...
found beb2868e in https://inbox.vuxu.org/musl/631a1416.5853.17a3dd4c129.Coremail.zhaixiaojuan@loongson.cn/ ||
	https://inbox.vuxu.org/musl/43a660d5.58ae.17a3df462b9.Coremail.zhaixiaojuan@loongson.cn/

applying [1/2] https://inbox.vuxu.org/musl/631a1416.5853.17a3dd4c129.Coremail.zhaixiaojuan@loongson.cn/
diff --git a/src/fenv/loongarch64/fenv.S b/src/fenv/loongarch64/fenv.S
new file mode 100644
index 00000000..beb2868e

Checking patch src/fenv/loongarch64/fenv.S...
Applied patch src/fenv/loongarch64/fenv.S cleanly.

skipping https://inbox.vuxu.org/musl/43a660d5.58ae.17a3df462b9.Coremail.zhaixiaojuan@loongson.cn/ for beb2868e
index at:
100644 beb2868e4a08c2e23417e7068edbf668263d0617	src/fenv/loongarch64/fenv.S

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).