2015-05-24 06:55:12 +02:00
|
|
|
// Copyright 2008 Dolphin Emulator Project
|
2021-07-05 03:22:19 +02:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2012-12-17 22:01:52 +01:00
|
|
|
|
2014-02-10 19:54:46 +01:00
|
|
|
#pragma once
|
2012-12-17 22:01:52 +01:00
|
|
|
|
2014-02-17 11:18:15 +01:00
|
|
|
#include "Common/CommonTypes.h"
|
2012-12-17 22:01:52 +01:00
|
|
|
|
2023-03-21 15:49:35 +01:00
|
|
|
namespace Common::FPU
|
2012-12-17 22:01:52 +01:00
|
|
|
{
|
2021-07-18 03:55:06 +02:00
|
|
|
enum RoundMode : u32
|
2013-02-26 20:49:00 +01:00
|
|
|
{
|
|
|
|
ROUND_NEAR = 0,
|
2014-02-23 14:57:31 +01:00
|
|
|
ROUND_CHOP = 1,
|
|
|
|
ROUND_UP = 2,
|
|
|
|
ROUND_DOWN = 3
|
2013-02-26 20:49:00 +01:00
|
|
|
};
|
2016-06-24 10:43:46 +02:00
|
|
|
|
2021-07-18 03:55:06 +02:00
|
|
|
void SetSIMDMode(RoundMode rounding_mode, bool non_ieee_mode);
|
2013-02-26 20:49:00 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
* There are two different flavors of float to int conversion:
|
|
|
|
* _mm_cvtps_epi32() and _mm_cvttps_epi32().
|
2013-03-20 02:51:12 +01:00
|
|
|
*
|
2013-02-26 20:49:00 +01:00
|
|
|
* The first rounds according to the MXCSR rounding bits.
|
|
|
|
* The second one always uses round towards zero.
|
|
|
|
*/
|
|
|
|
void SaveSIMDState();
|
|
|
|
void LoadSIMDState();
|
|
|
|
void LoadDefaultSIMDState();
|
2023-03-21 15:49:35 +01:00
|
|
|
} // namespace Common::FPU
|