1/* 2 * Copyright (c) 2010 Advanced Micro Devices, Inc. 3 * All rights reserved. 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 98 unchanged lines hidden (view full) --- 107 } 108 } 109}; 110 111template <int Func> 112class M5VarArgsFault : public M5DebugFault 113{ 114 public: |
115 template<typename ...Args> 116 M5VarArgsFault(const std::string &format, const Args &...args) : 117 M5DebugFault((DebugFunc)Func, csprintf(format, args...)) |
118 {} 119}; 120 121typedef M5VarArgsFault<M5DebugFault::PanicFunc> M5PanicFault; 122typedef M5VarArgsFault<M5DebugFault::FatalFunc> M5FatalFault; 123typedef M5VarArgsFault<M5DebugFault::WarnFunc> M5WarnFault; 124typedef M5VarArgsFault<M5DebugFault::WarnOnceFunc> M5WarnOnceFault; 125 126} // namespace GenericISA 127 128#endif // __ARCH_GENERIC_DEBUGFAULTS_HH__ |