2014-02-10 13:54:46 -05:00
|
|
|
// Copyright 2013 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2
|
|
|
|
// Refer to the license.txt file included.
|
2012-12-17 15:01:52 -06:00
|
|
|
|
2014-02-10 13:54:46 -05:00
|
|
|
#pragma once
|
2012-12-17 15:01:52 -06:00
|
|
|
|
2013-10-17 00:32:18 -04:00
|
|
|
#include "CommonTypes.h"
|
2012-12-17 15:01:52 -06:00
|
|
|
|
2013-02-26 13:49:00 -06:00
|
|
|
namespace FPURoundMode
|
2012-12-17 15:01:52 -06:00
|
|
|
{
|
2013-02-26 13:49:00 -06:00
|
|
|
enum RoundModes
|
|
|
|
{
|
|
|
|
ROUND_NEAR = 0,
|
|
|
|
ROUND_CHOP,
|
|
|
|
ROUND_UP,
|
|
|
|
ROUND_DOWN
|
|
|
|
};
|
|
|
|
enum PrecisionModes {
|
|
|
|
PREC_24 = 0,
|
|
|
|
PREC_53,
|
|
|
|
PREC_64
|
|
|
|
};
|
|
|
|
void SetRoundMode(u32 mode);
|
|
|
|
|
|
|
|
void SetPrecisionMode(u32 mode);
|
2013-10-29 01:23:17 -04:00
|
|
|
|
2013-10-24 13:52:22 +02:00
|
|
|
void SetSIMDMode(u32 roundingMode, u32 nonIEEEMode);
|
2013-02-26 13:49:00 -06:00
|
|
|
|
2013-03-19 21:51:12 -04:00
|
|
|
/*
|
|
|
|
* There are two different flavors of float to int conversion:
|
2013-10-29 01:23:17 -04:00
|
|
|
* _mm_cvtps_epi32() and _mm_cvttps_epi32().
|
2013-03-19 21:51:12 -04:00
|
|
|
*
|
|
|
|
* The first rounds according to the MXCSR rounding bits.
|
|
|
|
* The second one always uses round towards zero.
|
2013-02-26 13:49:00 -06:00
|
|
|
*/
|
|
|
|
void SaveSIMDState();
|
|
|
|
void LoadSIMDState();
|
|
|
|
void LoadDefaultSIMDState();
|
|
|
|
}
|