From: Steve Reinhardt Date: Wed, 9 Nov 2005 14:52:07 +0000 (-0500) Subject: A couple of FP-related fixes (prompted by Adam having trouble X-Git-Tag: m5_2.0_beta1~311 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e701cf48d97f58c7869ad4222157bdb2a5b44337;p=gem5.git A couple of FP-related fixes (prompted by Adam having trouble running SPEC FP codes). arch/alpha/isa_desc: Don't warn about non-standard trapping modes more than once per static instruction. (Had the flag to suppress these but forgot to check it!) build/SConstruct: Add USE_SSE2 option to enable compiling w/SSE2 (important for getting IEEE-compliant FP on x86). --HG-- extra : convert_revision : eac69efb28cce7b48035480d8b7cb004782969f4 --- diff --git a/arch/alpha/isa_desc b/arch/alpha/isa_desc index e80da6091..34e86c3a7 100644 --- a/arch/alpha/isa_desc +++ b/arch/alpha/isa_desc @@ -712,7 +712,7 @@ def template FloatingPointExecute {{ Fault %(class_name)s::execute(%(CPU_exec_context)s *xc, Trace::InstRecord *traceData) const { - if (trappingMode != Imprecise) { + if (trappingMode != Imprecise && !warnedOnTrapping) { warn("%s: non-standard trapping mode not supported", generateDisassembly(0, NULL)); warnedOnTrapping = true; @@ -755,7 +755,7 @@ def template FPFixedRoundingExecute {{ Fault %(class_name)s::execute(%(CPU_exec_context)s *xc, Trace::InstRecord *traceData) const { - if (trappingMode != Imprecise) { + if (trappingMode != Imprecise && !warnedOnTrapping) { warn("%s: non-standard trapping mode not supported", generateDisassembly(0, NULL)); warnedOnTrapping = true; diff --git a/build/SConstruct b/build/SConstruct index cbb966196..45461b0af 100644 --- a/build/SConstruct +++ b/build/SConstruct @@ -233,6 +233,9 @@ sticky_opts.AddOptions( BoolOption('SS_COMPATIBLE_FP', 'Make floating-point results compatible with SimpleScalar', False), + BoolOption('USE_SSE2', + 'Compile for SSE2 (-msse2) to get IEEE FP on x86 hosts', + False), BoolOption('STATS_BINNING', 'Bin statistics by CPU mode', have_mysql), BoolOption('USE_MYSQL', 'Use MySQL for stats output', have_mysql), BoolOption('USE_FENV', 'Use IEEE mode control', have_fenv), @@ -376,6 +379,9 @@ for build_dir in build_dirs: env['CC'] = env['BATCH_CMD'] + ' ' + env['CC'] env['CXX'] = env['BATCH_CMD'] + ' ' + env['CXX'] + if env['USE_SSE2']: + env.Append(CCFLAGS='-msse2') + # The m5/SConscript file sets up the build rules in 'env' according # to the configured options. It returns a list of environments, # one for each variant build (debug, opt, etc.)