// SPDX-License-Identifier: MIT OR MPL-2.0 OR LGPL-2.1-or-later OR GPL-2.0-or-later // Copyright 2010, SIL International, All rights reserved.
// This call threaded interpreter implmentation for machine.h // Author: Tim Eves
// Build either this interpreter or the direct_machine implementation. // The call threaded interpreter is portable across compilers and // architectures as well as being useful to debug (you can set breakpoints on // opcodes) but is slower that the direct threaded interpreter by a factor of 2
// Disable the unused parameter warning as th compiler is mistaken since dp // is always updated (even if by 0) on every opcode. #ifdef __GNUC__ #pragma GCC diagnostic ignored "-Wunused-parameter" #endif
// These are required by opcodes.h and should not be changed #define STARTOP(name) bool name(registers) REGPARM(4);\ bool name(registers) { #define ENDOP return (sp - sb)/Machine::STACK_MAX==0; \
}
// Pull in the opcode definitions // We pull these into a private namespace so these otherwise common names dont // pollute the toplevel namespace. namespace { #define smap reg.smap #define seg smap.segment #define is reg.is #define ip reg.ip #define map reg.map #define mapb reg.map_base #define flags reg.flags #define dir reg.direction #define status reg.status
#include"inc/opcodes.h"
#undef smap #undef seg #undef is #undef ip #undef map #undef mapb #undef flags #undef dir
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.