-# $OpenBSD: Makefile,v 1.6 2020/10/18 17:40:06 kettenis Exp $
+# $OpenBSD: Makefile,v 1.7 2021/06/17 12:55:38 kettenis Exp $
PROG=except
REGRESS_TARGETS+= fltdiv fltinv fltovf fltund
-.if ${MACHINE} == arm64 || ${MACHINE} == armv7
+.if ${MACHINE} == arm64 || ${MACHINE} == armv7 || ${MACHINE} == riscv64
# Floating-point exceptions are optional and absent on most hardware
REGRESS_EXPECTED_FAILURES+= fltdiv fltinv fltovf fltund
.endif
-/* $OpenBSD: fpu.c,v 1.2 2020/10/19 08:50:35 kettenis Exp $ */
+/* $OpenBSD: fpu.c,v 1.3 2021/06/17 12:55:38 kettenis Exp $ */
#include <err.h>
#include <fenv.h>
rv = fegetround();
if (rv != FE_UPWARD)
errx(1, "fegetround returned %d, not FE_UPWARD", rv);
-#if !defined(__arm__) && !defined(__aarch64__)
+#if !defined(__arm__) && !defined(__aarch64__) && !defined(__riscv)
rv = fegetexcept();
if (rv != FE_DIVBYZERO)
errx(1, "fegetexcept returned %d, not FE_DIVBYZERO",
-/* $OpenBSD: setjmp-fpu.c,v 1.6 2020/10/19 08:50:35 kettenis Exp $ */
+/* $OpenBSD: setjmp-fpu.c,v 1.7 2021/06/17 12:55:38 kettenis Exp $ */
#include <err.h>
#include <fenv.h>
rv = fegetround();
if (rv != FE_UPWARD)
errx(1, "fegetround returned %d, not FE_UPWARD", rv);
-#if !defined(__arm__) && !defined(__aarch64__)
+#if !defined(__arm__) && !defined(__aarch64__) && !defined(__riscv)
rv = fegetexcept();
if (rv != FE_DIVBYZERO)
errx(1, "fegetexcept returned %d, not FE_DIVBYZERO",
-/* $OpenBSD: fenv.c,v 1.7 2019/12/21 10:05:55 kettenis Exp $ */
+/* $OpenBSD: fenv.c,v 1.8 2021/06/17 12:55:38 kettenis Exp $ */
/*-
* Copyright (c) 2004 David Schultz <das@FreeBSD.org>
static void
test_masking(void)
{
-#if !defined(__arm__) && !defined(__aarch64__)
+#if !defined(__arm__) && !defined(__aarch64__) && !defined(__riscv)
struct sigaction act;
int except, i, pass, raise, status;
assert(0);
}
}
-#if defined(__arm__) || defined(__aarch64__)
+#if defined(__arm__) || defined(__aarch64__) || defined(__riscv)
break;
#endif
}
-/* $OpenBSD: fenv_test.c,v 1.4 2020/10/19 09:35:44 kettenis Exp $ */
+/* $OpenBSD: fenv_test.c,v 1.5 2021/06/17 12:55:38 kettenis Exp $ */
/*-
* Copyright (c) 2004 David Schultz <das@FreeBSD.org>
* All rights reserved.
static void
test_masking(void)
{
-#if !defined(__arm__) && !defined(__aarch64__)
+#if !defined(__arm__) && !defined(__aarch64__) && !defined(__riscv)
struct sigaction act;
int except, pass, raise, status;
unsigned i;
assert(0);
}
}
-#if defined(__arm__) || defined(__aarch64__)
+#if defined(__arm__) || defined(__aarch64__) || defined(__riscv)
break;
#endif
}