Merge "riscv64: add bionic assembler and string functions."
diff --git a/libc/arch-arm64/bionic/vfork.S b/libc/arch-arm64/bionic/vfork.S
index 9878e8d..9eb82d8 100644
--- a/libc/arch-arm64/bionic/vfork.S
+++ b/libc/arch-arm64/bionic/vfork.S
@@ -29,10 +29,7 @@
#include <platform/bionic/tls_defines.h>
#include <private/bionic_asm.h>
#include <asm/signal.h>
-
-// Must match the defines in linux/sched.h
-#define CLONE_VM 0x00000100
-#define CLONE_VFORK 0x00004000
+#include <linux/sched.h>
ENTRY(vfork)
__BIONIC_WEAK_ASM_FOR_NATIVE_BRIDGE(vfork)
diff --git a/tests/fenv_test.cpp b/tests/fenv_test.cpp
index c5b5eca..ad34caa 100644
--- a/tests/fenv_test.cpp
+++ b/tests/fenv_test.cpp
@@ -117,6 +117,21 @@
ASSERT_EQ(FE_OVERFLOW, fetestexcept(FE_ALL_EXCEPT));
}
+TEST(fenv, fegetenv_fesetenv_rounding_mode) {
+ // Test that fegetenv()/fesetenv() includes the rounding mode.
+ fesetround(FE_DOWNWARD);
+ ASSERT_EQ(FE_DOWNWARD, fegetround());
+
+ fenv_t env;
+ fegetenv(&env);
+
+ fesetround(FE_UPWARD);
+ ASSERT_EQ(FE_UPWARD, fegetround());
+
+ fesetenv(&env);
+ ASSERT_EQ(FE_DOWNWARD, fegetround());
+}
+
TEST(fenv, feholdexcept_feupdateenv) {
// Set FE_OVERFLOW only.
feclearexcept(FE_ALL_EXCEPT);