From 6b9a40bdc475d3d7bc9057d226d6ed8ea0a5d339 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 4 May 2019 21:07:48 -0400 Subject: [PATCH] common/fp/op/FPNeg: Make FPNeg constexpr Negation in (standard IEEE) floating-point is simply flipping the sign-bit, so this operation will never be more complex than what is presented here, making constexpr a reasonable allowance. --- src/common/fp/op/FPNeg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/fp/op/FPNeg.h b/src/common/fp/op/FPNeg.h index c138bc3f..1b8534be 100644 --- a/src/common/fp/op/FPNeg.h +++ b/src/common/fp/op/FPNeg.h @@ -11,7 +11,7 @@ namespace Dynarmic::FP { template -inline FPT FPNeg(FPT op) { +constexpr FPT FPNeg(FPT op) { return op ^ FPInfo::sign_mask; }