Use the correct flag for DAZ and default to using FTZ and DAZ denormal protection.

git-svn-id: svn://localhost/ardour2/branches/3.0@11132 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington
2012-01-02 23:52:28 +00:00
parent f135947606
commit 8be724db1b
2 changed files with 4 additions and 4 deletions

View File

@@ -175,7 +175,7 @@ CONFIG_VARIABLE (bool, sound_midi_notes, "sound-midi-notes", false)
/* denormal management */
CONFIG_VARIABLE (bool, denormal_protection, "denormal-protection", false)
CONFIG_VARIABLE (DenormalModel, denormal_model, "denormal-model", DenormalNone)
CONFIG_VARIABLE (DenormalModel, denormal_model, "denormal-model", DenormalFTZDAZ)
/* visibility of various things */

View File

@@ -461,7 +461,7 @@ ARDOUR::setup_fpu ()
switch (Config->get_denormal_model()) {
case DenormalNone:
MXCSR &= ~(_MM_FLUSH_ZERO_ON|0x8000);
MXCSR &= ~(_MM_FLUSH_ZERO_ON | 0x40);
break;
case DenormalFTZ:
@@ -473,14 +473,14 @@ ARDOUR::setup_fpu ()
case DenormalDAZ:
MXCSR &= ~_MM_FLUSH_ZERO_ON;
if (fpu.has_denormals_are_zero()) {
MXCSR |= 0x8000;
MXCSR |= 0x40;
}
break;
case DenormalFTZDAZ:
if (fpu.has_flush_to_zero()) {
if (fpu.has_denormals_are_zero()) {
MXCSR |= _MM_FLUSH_ZERO_ON | 0x8000;
MXCSR |= _MM_FLUSH_ZERO_ON | 0x40;
} else {
MXCSR |= _MM_FLUSH_ZERO_ON;
}