ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
|
contains exception/return codes used to control execution of an etiss::CPUCore More...
#include "etiss/jit/types.h"
Go to the source code of this file.
Macros | |
#define | etiss__toString_(X) #X |
#define | etiss_toString(X) etiss__toString_(X) |
#define | etiss__merge2_(X, Y) X##Y |
#define | etiss_merge2(X, Y) etiss__merge2_(X, Y) |
#define | defineReturnCode(NAME, VALUE, MSG) static const etiss_int32 ETISS_RETURNCODE_##NAME = VALUE |
define RETURNCODE definition template for easy use with c and c++ | |
#define | ETISS_RETURNCODE_TEMPORARY_COUNT 8 |
Functions | |
int32_t | etiss_returncode_setTemporary (const char *msg) |
sets the message of a temporary return code and returns the returncode. | |
defineReturnCode (NOERROR, 0, "No error.") | |
defineReturnCode (GENERALERROR, -1, "General error.") | |
defineReturnCode (RELOADBLOCKS, -2, "Clear cached translated blocks.") | |
defineReturnCode (RELOADCURRENTBLOCK, -3, "Clear the cached block that returned this code.") | |
defineReturnCode (DBUS_READ_ERROR, -5, "Data bus read error.") | |
defineReturnCode (DBUS_WRITE_ERROR, -6, "Data bus write error.") | |
defineReturnCode (IBUS_READ_ERROR, -7, "Instruction bus read error.") | |
defineReturnCode (IBUS_WRITE_ERROR, -8, "Instruction bus write error.") | |
defineReturnCode (INTERRUPT, -9, "Signal an interrupt.") | |
defineReturnCode (RESET, -10, "Reset signal.") | |
defineReturnCode (ILLEGALINSTRUCTION, -11, "Illegal instruction.") | |
defineReturnCode (ILLEGALJUMP, -12, "Illegal jump address.") | |
defineReturnCode (INSTR_PAGEFAULT, -13, "Instruction page fault.") | |
defineReturnCode (LOAD_PAGEFAULT, -14, "Load page fault.") | |
defineReturnCode (STORE_PAGEFAULT, -15, "Store page fault.") | |
defineReturnCode (GDBNOERROR, -16, "Has the same effect as NOERROR but allows exiting a block where NOERROR " "would have continued block execution.") | |
defineReturnCode (SYSCALL, -17, "System call") | |
defineReturnCode (PAGEFAULT, -18, "Virtual memory tranlation fault.") | |
defineReturnCode (BREAKPOINT, -19, "Break point.") | |
defineReturnCode (CPUFINISHED, 1<< 31, "Finished cpu execution. This is the proper way to exit from " "etiss::CPUCore::execute.") | |
defineReturnCode (CPUTERMINATED, 0x80000001, "Terminates cpu execution. this is the proper way to force an " "exit from etiss::CPUCore::execute (e.g. by a debugger).") | |
defineReturnCode (JITERROR, -32, "Error in JIT.") | |
defineReturnCode (JITCOMPILATIONERROR, -33, "Error in JIT compilation.") | |
defineReturnCode (ARCHERROR, -34, "Error in architecture.") | |
defineReturnCode (EMULATIONNOTSUPPORTED, -35, "Emulation is not supported.") | |
defineReturnCode (INVALIDSYSTEM, -36, "An ETISS_System structure doesn't contain " "the neccessary function pointers.") | |
defineReturnCode (TEMPORARY0, -128, "") | |
defineReturnCode (TEMPORARY1, -129, "") | |
defineReturnCode (TEMPORARY2, -130, "") | |
defineReturnCode (TEMPORARY3, -131, "") | |
defineReturnCode (TEMPORARY4, -132, "") | |
defineReturnCode (TEMPORARY5, -133, "") | |
defineReturnCode (TEMPORARY6, -134, "") | |
defineReturnCode (TEMPORARY7, -135, "") | |
contains exception/return codes used to control execution of an etiss::CPUCore
Copyright 2018 Infineon Technologies AG This file is part of ETISS tool, see https://github.com/tum-ei-eda/etiss. The initial version of this software has been created with the funding support by the German Federal Ministry of Education and Research (BMBF) in the project EffektiV under grant 01IS13022. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
any return code defined with the defineReturnCode(NAME,VALUE,MSG) macro is available in C++ under the name etiss::RETURNCODE::NAME and ETISS_RETURNCODE_NAME and in C under the name ETISS_RETURNCODE_NAME. In C++ the return code names and messages are accessible via the maps returned by etiss::RETURNCODE::getErrorMessages and etiss::RETURNCODE::getErrorNames
Definition in file ReturnCode.h.
#define defineReturnCode | ( | NAME, | |
VALUE, | |||
MSG | |||
) | static const etiss_int32 ETISS_RETURNCODE_##NAME = VALUE |
define RETURNCODE definition template for easy use with c and c++
Definition at line 154 of file ReturnCode.h.
#define etiss__merge2_ | ( | X, | |
Y | |||
) | X##Y |
Definition at line 98 of file ReturnCode.h.
#define etiss__toString_ | ( | X | ) | #X |
Definition at line 94 of file ReturnCode.h.
#define etiss_merge2 | ( | X, | |
Y | |||
) | etiss__merge2_(X, Y) |
Definition at line 99 of file ReturnCode.h.
#define ETISS_RETURNCODE_TEMPORARY_COUNT 8 |
Definition at line 207 of file ReturnCode.h.
#define etiss_toString | ( | X | ) | etiss__toString_(X) |
Definition at line 95 of file ReturnCode.h.
defineReturnCode | ( | ARCHERROR | , |
- | 34, | ||
"Error in architecture." | |||
) |
defineReturnCode | ( | BREAKPOINT | , |
- | 19, | ||
"Break point." | |||
) |
defineReturnCode | ( | CPUFINISHED | , |
1<< | 31, | ||
"Finished cpu execution. This is the proper way to exit from " "etiss::CPUCore::execute." | |||
) |
defineReturnCode | ( | CPUTERMINATED | , |
0x80000001 | , | ||
"Terminates cpu execution. this is the proper way to force an " "exit from etiss::CPUCore::execute (e.g. by a debugger)." | |||
) |
defineReturnCode | ( | DBUS_READ_ERROR | , |
- | 5, | ||
"Data bus read error." | |||
) |
defineReturnCode | ( | DBUS_WRITE_ERROR | , |
- | 6, | ||
"Data bus write error." | |||
) |
defineReturnCode | ( | EMULATIONNOTSUPPORTED | , |
- | 35, | ||
"Emulation is not supported." | |||
) |
defineReturnCode | ( | GDBNOERROR | , |
- | 16, | ||
"Has the same effect as NOERROR but allows exiting a block where NOERROR " "would have continued block execution." | |||
) |
defineReturnCode | ( | GENERALERROR | , |
- | 1, | ||
"General error." | |||
) |
defineReturnCode | ( | IBUS_READ_ERROR | , |
- | 7, | ||
"Instruction bus read error." | |||
) |
defineReturnCode | ( | IBUS_WRITE_ERROR | , |
- | 8, | ||
"Instruction bus write error." | |||
) |
defineReturnCode | ( | ILLEGALINSTRUCTION | , |
- | 11, | ||
"Illegal instruction." | |||
) |
defineReturnCode | ( | ILLEGALJUMP | , |
- | 12, | ||
"Illegal jump address." | |||
) |
defineReturnCode | ( | INSTR_PAGEFAULT | , |
- | 13, | ||
"Instruction page fault." | |||
) |
defineReturnCode | ( | INTERRUPT | , |
- | 9, | ||
"Signal an interrupt." | |||
) |
defineReturnCode | ( | INVALIDSYSTEM | , |
- | 36, | ||
"An ETISS_System structure doesn't contain " "the neccessary function pointers." | |||
) |
defineReturnCode | ( | JITCOMPILATIONERROR | , |
- | 33, | ||
"Error in JIT compilation." | |||
) |
defineReturnCode | ( | JITERROR | , |
- | 32, | ||
"Error in JIT." | |||
) |
defineReturnCode | ( | LOAD_PAGEFAULT | , |
- | 14, | ||
"Load page fault." | |||
) |
defineReturnCode | ( | NOERROR | , |
0 | , | ||
"No error." | |||
) |
defineReturnCode | ( | PAGEFAULT | , |
- | 18, | ||
"Virtual memory tranlation fault." | |||
) |
defineReturnCode | ( | RELOADBLOCKS | , |
- | 2, | ||
"Clear cached translated blocks." | |||
) |
defineReturnCode | ( | RELOADCURRENTBLOCK | , |
- | 3, | ||
"Clear the cached block that returned this code." | |||
) |
defineReturnCode | ( | RESET | , |
- | 10, | ||
"Reset signal." | |||
) |
defineReturnCode | ( | STORE_PAGEFAULT | , |
- | 15, | ||
"Store page fault." | |||
) |
defineReturnCode | ( | SYSCALL | , |
- | 17, | ||
"System call" | |||
) |
defineReturnCode | ( | TEMPORARY0 | , |
- | 128, | ||
"" | |||
) |
defineReturnCode | ( | TEMPORARY1 | , |
- | 129, | ||
"" | |||
) |
defineReturnCode | ( | TEMPORARY2 | , |
- | 130, | ||
"" | |||
) |
defineReturnCode | ( | TEMPORARY3 | , |
- | 131, | ||
"" | |||
) |
defineReturnCode | ( | TEMPORARY4 | , |
- | 132, | ||
"" | |||
) |
defineReturnCode | ( | TEMPORARY5 | , |
- | 133, | ||
"" | |||
) |
defineReturnCode | ( | TEMPORARY6 | , |
- | 134, | ||
"" | |||
) |
defineReturnCode | ( | TEMPORARY7 | , |
- | 135, | ||
"" | |||
) |
|
extern |
sets the message of a temporary return code and returns the returncode.
use for custom messages. message may be overwritten if all other temporary return codes are used
Definition at line 81 of file ReturnCode.cpp.