Move the denormal protection routine to one place instead of 3

This commit is contained in:
Raine M. Ekman
2015-04-27 13:02:07 +03:00
parent b6643f83d4
commit dc67449175
4 changed files with 7 additions and 47 deletions

View File

@@ -25,13 +25,7 @@
#ifndef MIXER_H
#define MIXER_H
// denormals stripping
#ifdef __SSE__
#include <xmmintrin.h>
#endif
#ifdef __SSE3__
#include <pmmintrin.h>
#endif
#include "denormals.h"
#include "lmmsconfig.h"

View File

@@ -930,15 +930,7 @@ void Mixer::fifoWriter::finish()
void Mixer::fifoWriter::run()
{
// set denormal protection for this thread
#ifdef __SSE3__
/* DAZ flag */
_MM_SET_DENORMALS_ZERO_MODE( _MM_DENORMALS_ZERO_ON );
#endif
#ifdef __SSE__
/* FTZ flag */
_MM_SET_FLUSH_ZERO_MODE( _MM_FLUSH_ZERO_ON );
#endif
disable_denormals();
#if 0
#ifdef LMMS_BUILD_LINUX

View File

@@ -29,12 +29,7 @@
#include "ThreadableJob.h"
#include "Mixer.h"
#ifdef __SSE__
#include <xmmintrin.h>
#endif
#ifdef __SSE3__
#include <pmmintrin.h>
#endif
#include "denormals.h"
MixerWorkerThread::JobQueue MixerWorkerThread::globalJobQueue;
QWaitCondition * MixerWorkerThread::queueReadyWaitCond = NULL;
@@ -159,15 +154,8 @@ void MixerWorkerThread::startAndWaitForJobs()
void MixerWorkerThread::run()
{
// set denormal protection for this thread
#ifdef __SSE3__
/* DAZ flag */
_MM_SET_DENORMALS_ZERO_MODE( _MM_DENORMALS_ZERO_ON );
#endif
#ifdef __SSE__
/* FTZ flag */
_MM_SET_FLUSH_ZERO_MODE( _MM_FLUSH_ZERO_ON );
#endif
disable_denormals();
QMutex m;
while( m_quit == false )
{

View File

@@ -27,13 +27,7 @@
#include "lmmsversion.h"
#include "versioninfo.h"
// denormals stripping
#ifdef __SSE__
#include <xmmintrin.h>
#endif
#ifdef __SSE3__
#include <pmmintrin.h>
#endif
#include "denormals.h"
#include <QFileInfo>
#include <QLocale>
@@ -103,15 +97,7 @@ int main( int argc, char * * argv )
// intialize RNG
srand( getpid() + time( 0 ) );
// set denormal protection for this thread
#ifdef __SSE3__
/* DAZ flag */
_MM_SET_DENORMALS_ZERO_MODE( _MM_DENORMALS_ZERO_ON );
#endif
#ifdef __SSE__
/* FTZ flag */
_MM_SET_FLUSH_ZERO_MODE( _MM_FLUSH_ZERO_ON );
#endif
disable_denormals();
bool core_only = false;
bool fullscreen = true;