summaryrefslogtreecommitdiff
path: root/src/arch/sparc
diff options
context:
space:
mode:
authorAndreas Sandberg <andreas.sandberg@arm.com>2017-05-18 15:11:23 +0100
committerAndreas Sandberg <andreas.sandberg@arm.com>2017-05-19 08:00:45 +0000
commitc4b85d5f9854abeee6d1dbe15ae65a7a1aada6b2 (patch)
tree521b54e172ab547cd2147502bdb0015be924bb73 /src/arch/sparc
parent41ab3e6e7e9b5a5f4427949f9a981cdf2186c88a (diff)
downloadgem5-c4b85d5f9854abeee6d1dbe15ae65a7a1aada6b2.tar.xz
base, sim, arch: Fix clang 5.0 warnings
Compiling gem5 with recent version of clang (4 and 5) triggers warnings that are treated as errors: * Global templatized static functions result in a warning if they are not used. These should either be declared as static inline or without the static identifier to avoid the warning. * Some templatized classes contain static variables. The instantiated versions of these variables / templates need to be explicitly declared to avoid a compiler warning. Change-Id: Ie8261144836e94ebab7ea04ccccb90927672c257 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Curtis Dunham <curtis.dunham@arm.com> Reviewed-on: https://gem5-review.googlesource.com/3420 Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'src/arch/sparc')
-rw-r--r--src/arch/sparc/faults.hh64
1 files changed, 64 insertions, 0 deletions
diff --git a/src/arch/sparc/faults.hh b/src/arch/sparc/faults.hh
index 9d5f7e01d..42c8b7149 100644
--- a/src/arch/sparc/faults.hh
+++ b/src/arch/sparc/faults.hh
@@ -276,6 +276,70 @@ class TrapInstruction : public EnumeratedFault<TrapInstruction>
StaticInst::nullStaticInstPtr);
};
+/*
+ * Explicitly declare template static member variables to avoid warnings
+ * in some clang versions
+ */
+template<> SparcFaultBase::FaultVals SparcFault<PowerOnReset>::vals;
+template<> SparcFaultBase::FaultVals SparcFault<WatchDogReset>::vals;
+template<> SparcFaultBase::FaultVals
+ SparcFault<ExternallyInitiatedReset>::vals;
+template<> SparcFaultBase::FaultVals SparcFault<SoftwareInitiatedReset>::vals;
+template<> SparcFaultBase::FaultVals SparcFault<REDStateException>::vals;
+template<> SparcFaultBase::FaultVals SparcFault<StoreError>::vals;
+template<> SparcFaultBase::FaultVals
+ SparcFault<InstructionAccessException>::vals;
+template<> SparcFaultBase::FaultVals SparcFault<InstructionAccessError>::vals;
+template<> SparcFaultBase::FaultVals SparcFault<IllegalInstruction>::vals;
+template<> SparcFaultBase::FaultVals SparcFault<PrivilegedOpcode>::vals;
+template<> SparcFaultBase::FaultVals SparcFault<FpDisabled>::vals;
+template<> SparcFaultBase::FaultVals SparcFault<FpExceptionIEEE754>::vals;
+template<> SparcFaultBase::FaultVals SparcFault<FpExceptionOther>::vals;
+template<> SparcFaultBase::FaultVals SparcFault<TagOverflow>::vals;
+template<> SparcFaultBase::FaultVals SparcFault<CleanWindow>::vals;
+template<> SparcFaultBase::FaultVals SparcFault<DivisionByZero>::vals;
+template<> SparcFaultBase::FaultVals SparcFault<InternalProcessorError>::vals;
+template<> SparcFaultBase::FaultVals
+ SparcFault<InstructionInvalidTSBEntry>::vals;
+template<> SparcFaultBase::FaultVals SparcFault<DataInvalidTSBEntry>::vals;
+template<> SparcFaultBase::FaultVals SparcFault<DataAccessException>::vals;
+template<> SparcFaultBase::FaultVals SparcFault<DataAccessError>::vals;
+template<> SparcFaultBase::FaultVals SparcFault<DataAccessProtection>::vals;
+template<> SparcFaultBase::FaultVals SparcFault<MemAddressNotAligned>::vals;
+template<> SparcFaultBase::FaultVals
+ SparcFault<LDDFMemAddressNotAligned>::vals;
+template<> SparcFaultBase::FaultVals
+ SparcFault<STDFMemAddressNotAligned>::vals;
+template<> SparcFaultBase::FaultVals SparcFault<PrivilegedAction>::vals;
+template<> SparcFaultBase::FaultVals
+ SparcFault<LDQFMemAddressNotAligned>::vals;
+template<> SparcFaultBase::FaultVals
+ SparcFault<STQFMemAddressNotAligned>::vals;
+template<> SparcFaultBase::FaultVals
+ SparcFault<InstructionRealTranslationMiss>::vals;
+template<> SparcFaultBase::FaultVals SparcFault<DataRealTranslationMiss>::vals;
+template<> SparcFaultBase::FaultVals SparcFault<InterruptLevelN>::vals;
+template<> SparcFaultBase::FaultVals SparcFault<HstickMatch>::vals;
+template<> SparcFaultBase::FaultVals SparcFault<TrapLevelZero>::vals;
+template<> SparcFaultBase::FaultVals SparcFault<InterruptVector>::vals;
+template<> SparcFaultBase::FaultVals SparcFault<PAWatchpoint>::vals;
+template<> SparcFaultBase::FaultVals SparcFault<VAWatchpoint>::vals;
+template<> SparcFaultBase::FaultVals
+ SparcFault<FastInstructionAccessMMUMiss>::vals;
+template<> SparcFaultBase::FaultVals SparcFault<FastDataAccessMMUMiss>::vals;
+template<>
+ SparcFaultBase::FaultVals SparcFault<FastDataAccessProtection>::vals;
+template<> SparcFaultBase::FaultVals SparcFault<InstructionBreakpoint>::vals;
+template<> SparcFaultBase::FaultVals SparcFault<CpuMondo>::vals;
+template<> SparcFaultBase::FaultVals SparcFault<DevMondo>::vals;
+template<> SparcFaultBase::FaultVals SparcFault<ResumableError>::vals;
+template<> SparcFaultBase::FaultVals SparcFault<SpillNNormal>::vals;
+template<> SparcFaultBase::FaultVals SparcFault<SpillNOther>::vals;
+template<> SparcFaultBase::FaultVals SparcFault<FillNNormal>::vals;
+template<> SparcFaultBase::FaultVals SparcFault<FillNOther>::vals;
+template<> SparcFaultBase::FaultVals SparcFault<TrapInstruction>::vals;
+
+
void enterREDState(ThreadContext *tc);
void doREDFault(ThreadContext *tc, TrapType tt);