From b0ff35fcd1f41575d1f89eb962724335ae4bd3ad Mon Sep 17 00:00:00 2001 From: MerryMage Date: Mon, 23 Jul 2018 22:01:25 +0100 Subject: [PATCH] fp: Implement FPNeg --- src/common/fp/op/FPNeg.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/common/fp/op/FPNeg.h diff --git a/src/common/fp/op/FPNeg.h b/src/common/fp/op/FPNeg.h new file mode 100644 index 00000000..402cca21 --- /dev/null +++ b/src/common/fp/op/FPNeg.h @@ -0,0 +1,18 @@ +/* This file is part of the dynarmic project. + * Copyright (c) 2018 MerryMage + * This software may be used and distributed according to the terms of the GNU + * General Public License version 2 or any later version. + */ + +#pragma once + +#include "common/fp/info.h" + +namespace Dynarmic::FP { + +template +inline FPT FPNeg(FPT op) { + return op ^ FPInfo::sign_mask; +} + +} // namespace Dynarmic::FP