dolphin/Source/Core/Common/FPURoundMode.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
649 B
C
Raw Normal View History

// Copyright 2008 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
2012-12-17 14:01:52 -07:00
#pragma once
2012-12-17 14:01:52 -07:00
#include "Common/CommonTypes.h"
2012-12-17 14:01:52 -07:00
2013-02-26 12:49:00 -07:00
namespace FPURoundMode
2012-12-17 14:01:52 -07:00
{
2021-07-17 19:55:06 -06:00
enum RoundMode : u32
2013-02-26 12:49:00 -07:00
{
ROUND_NEAR = 0,
ROUND_CHOP = 1,
ROUND_UP = 2,
ROUND_DOWN = 3
2013-02-26 12:49:00 -07:00
};
2021-07-17 19:55:06 -06:00
void SetSIMDMode(RoundMode rounding_mode, bool non_ieee_mode);
2013-02-26 12:49:00 -07:00
/*
* There are two different flavors of float to int conversion:
* _mm_cvtps_epi32() and _mm_cvttps_epi32().
*
2013-02-26 12:49:00 -07:00
* The first rounds according to the MXCSR rounding bits.
* The second one always uses round towards zero.
*/
void SaveSIMDState();
void LoadSIMDState();
void LoadDefaultSIMDState();
} // namespace FPURoundMode