fp: Implement FPNeg
This commit is contained in:
parent
ca6774ccce
commit
b0ff35fcd1
1 changed files with 18 additions and 0 deletions
18
src/common/fp/op/FPNeg.h
Normal file
18
src/common/fp/op/FPNeg.h
Normal file
|
@ -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<typename FPT>
|
||||||
|
inline FPT FPNeg(FPT op) {
|
||||||
|
return op ^ FPInfo<FPT>::sign_mask;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace Dynarmic::FP
|
Loading…
Reference in a new issue