shithub: riscv

Download patch

ref: b03b762ac8c1665b1608350636517d3fa6ddb801
parent: 7a79e2876156cf96e3185c2748f3419d3ac75dbd
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Sat Sep 2 12:34:51 EDT 2023

libc/arm64: fabs, floor and ceil in assembly

--- /dev/null
+++ b/sys/src/libc/arm64/fabs.s
@@ -1,0 +1,4 @@
+TEXT	fabs(SB), $0
+	FMOVD	x+0(FP), F0
+	FABSD	F0, F0
+	RETURN
--- /dev/null
+++ b/sys/src/libc/arm64/floor.s
@@ -1,0 +1,9 @@
+TEXT	floor(SB), $0
+	FMOVD	x+0(FP), F0
+	FRINTMD	F0, F0
+	RETURN
+
+TEXT	ceil(SB), $0
+	FMOVD	x+0(FP), F0
+	FRINTPD	F0, F0
+	RETURN
--- a/sys/src/libc/arm64/mkfile
+++ b/sys/src/libc/arm64/mkfile
@@ -7,6 +7,8 @@
 	argv0.s\
 	atom.s\
 	cycles.s\
+	fabs.s\
+	floor.s\
 	getcallerpc.s\
 	getfcr.s\
 	main9.s\