Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107077529
D28994.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D28994.diff
View Options
diff --git a/lib/libc/riscv/gen/fabs.S b/lib/libc/riscv/gen/fabs.S
--- a/lib/libc/riscv/gen/fabs.S
+++ b/lib/libc/riscv/gen/fabs.S
@@ -1,5 +1,6 @@
/*-
* Copyright (c) 2015-2017 Ruslan Bukin <br@bsdpad.com>
+ * Copyright (c) 2021 Alex Richardson <arichardson@FreeBSD.org>
* All rights reserved.
*
* Portions of this software were developed by SRI International and the
@@ -10,6 +11,9 @@
* Computer Laboratory as part of the CTSRD Project, with support from the
* UK Higher Education Innovation Fund (HEIF).
*
+ * This work was supported by Innovate UK project 105694, "Digital Security
+ * by Design (DSbD) Technology Platform Prototype".
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -35,9 +39,12 @@
#include <machine/asm.h>
__FBSDID("$FreeBSD$");
-#ifdef __riscv_float_abi_double
ENTRY(fabs)
+#ifdef __riscv_float_abi_double
fabs.d fa0, fa0
+#else
+ slli a0,a0,1
+ srli a0,a0,1
+#endif
ret
END(fabs)
-#endif
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 10, 6:39 PM (15 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15745155
Default Alt Text
D28994.diff (1 KB)
Attached To
Mode
D28994: riscv: Add a soft-float implementation of fabs()
Attached
Detach File
Event Timeline
Log In to Comment