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 M5VarArgsFault(const std::string &format, CPRINTF_DECLARATION) :
116 M5DebugFault((DebugFunc)Func, csprintf(format, VARARGS_ALLARGS))
117 {}
118};
119
120typedef M5VarArgsFault<M5DebugFault::PanicFunc> M5PanicFault;
121typedef M5VarArgsFault<M5DebugFault::FatalFunc> M5FatalFault;
122typedef M5VarArgsFault<M5DebugFault::WarnFunc> M5WarnFault;
123typedef M5VarArgsFault<M5DebugFault::WarnOnceFunc> M5WarnOnceFault;
124
125} // namespace GenericISA
126
127#endif // __ARCH_GENERIC_DEBUGFAULTS_HH__
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 M5VarArgsFault(const std::string &format, CPRINTF_DECLARATION) :
116 M5DebugFault((DebugFunc)Func, csprintf(format, VARARGS_ALLARGS))
117 {}
118};
119
120typedef M5VarArgsFault<M5DebugFault::PanicFunc> M5PanicFault;
121typedef M5VarArgsFault<M5DebugFault::FatalFunc> M5FatalFault;
122typedef M5VarArgsFault<M5DebugFault::WarnFunc> M5WarnFault;
123typedef M5VarArgsFault<M5DebugFault::WarnOnceFunc> M5WarnOnceFault;
124
125} // namespace GenericISA
126
127#endif // __ARCH_GENERIC_DEBUGFAULTS_HH__