2015-01-18 03:00:19 +00:00
|
|
|
/*****************************************************************
|
|
|
|
* INSTRUCTIONS *
|
|
|
|
*****************************************************************/
|
|
|
|
|
|
|
|
#ifdef INDENT_CODE
|
|
|
|
{
|
|
|
|
{
|
|
|
|
{
|
|
|
|
#endif /* INDENT_CODE */
|
|
|
|
|
2016-03-29 01:55:12 +01:00
|
|
|
BOp(Ystop, l);
|
2019-04-24 12:10:06 +01:00
|
|
|
LOCAL_CBorder = 0;
|
|
|
|
SET_ASP(YREG, E_CB * sizeof(CELL));
|
2015-11-05 15:04:12 +00:00
|
|
|
/* make sure ASP is initialized */
|
2015-01-18 03:00:19 +00:00
|
|
|
saveregs();
|
|
|
|
|
|
|
|
#if PUSH_REGS
|
|
|
|
restore_absmi_regs(old_regs);
|
|
|
|
#endif
|
|
|
|
#if BP_FREE
|
|
|
|
P1REG = PCBACKUP;
|
|
|
|
#endif
|
2019-04-24 12:10:06 +01:00
|
|
|
LOCAL_CBorder = 0;
|
2015-01-18 03:00:19 +00:00
|
|
|
return 1;
|
|
|
|
ENDBOp();
|
|
|
|
|
|
|
|
BOp(Nstop, e);
|
2019-04-24 12:10:06 +01:00
|
|
|
SET_ASP(YREG, E_CB * sizeof(CELL));
|
2015-01-18 03:00:19 +00:00
|
|
|
saveregs();
|
|
|
|
#if PUSH_REGS
|
|
|
|
restore_absmi_regs(old_regs);
|
|
|
|
#endif
|
|
|
|
#if BP_FREE
|
|
|
|
P1REG = PCBACKUP;
|
|
|
|
#endif
|
|
|
|
return 0;
|
|
|
|
ENDBOp();
|
|
|
|
|
2016-03-29 01:55:12 +01:00
|
|
|
/************************************************************************\
|
|
|
|
* Native Code Execution *
|
2015-01-18 03:00:19 +00:00
|
|
|
\************************************************************************/
|
|
|
|
|
|
|
|
#if YAP_JIT
|
2016-03-29 01:55:12 +01:00
|
|
|
static void *OpAddress_JIT[] = {
|
|
|
|
#define OPCODE(OP, TYPE) &&_##OP
|
2015-08-07 22:57:53 +01:00
|
|
|
#include "YapOpcodes.h"
|
2016-03-29 01:55:12 +01:00
|
|
|
#undef OPCODE
|
2015-08-07 22:57:53 +01:00
|
|
|
};
|
2015-01-18 03:00:19 +00:00
|
|
|
|
2016-03-29 01:55:12 +01:00
|
|
|
/* native_me */
|
|
|
|
BOp(jit_handler, J);
|
|
|
|
if (!PREG->y_u.J.jh->fi.bcst.c)
|
|
|
|
PREG->y_u.J.jh->mf.isground = IsGround(PREG);
|
|
|
|
PREG->y_u.J.jh->fi.bcst.c++;
|
|
|
|
|
|
|
|
/* Did PREG reach threshold value to become critical? */
|
|
|
|
if (PREG->y_u.J.jh->fi.bcst.c ==
|
|
|
|
(COUNT)(ExpEnv.config_struc.frequency_bound *
|
|
|
|
(ExpEnv.config_struc.profiling_startp)) &&
|
|
|
|
!PREG->y_u.J.jh->mf.isground) {
|
2015-01-18 03:00:19 +00:00
|
|
|
#if YAP_DBG_PREDS
|
2016-03-29 01:55:12 +01:00
|
|
|
if (ExpEnv.debug_struc.pprint_me.criticals != 0 &&
|
|
|
|
ExpEnv.debug_struc.pprint_me.criticals != 0x1) {
|
|
|
|
fprintf(stderr, "%s:%d\n", __FILE__, __LINE__);
|
|
|
|
fprintf(stderr, "%s", (char *)ExpEnv.debug_struc.pprint_me.criticals);
|
2015-01-18 03:00:19 +00:00
|
|
|
}
|
2016-03-29 01:55:12 +01:00
|
|
|
#endif
|
|
|
|
traced_absmi();
|
|
|
|
}
|
2015-01-18 03:00:19 +00:00
|
|
|
#if YAP_DBG_PREDS
|
2016-03-29 01:55:12 +01:00
|
|
|
print_main_when_head(PREG, ON_INTERPRETER);
|
2015-01-18 03:00:19 +00:00
|
|
|
#endif
|
2016-03-29 01:55:12 +01:00
|
|
|
PREG = NEXTOP(PREG, J);
|
|
|
|
JMPNext();
|
|
|
|
ENDBOp();
|
2015-01-18 03:00:19 +00:00
|
|
|
#endif
|
|
|
|
|
2016-03-29 01:55:12 +01:00
|
|
|
#include "control_absmi_insts.h"
|
2015-01-20 03:00:42 +00:00
|
|
|
#include "cp_absmi_insts.h"
|
|
|
|
#include "fail_absmi_insts.h"
|
|
|
|
#include "fli_absmi_insts.h"
|
2016-03-29 01:55:12 +01:00
|
|
|
#include "index_absmi_insts.h"
|
|
|
|
#include "lu_absmi_insts.h"
|
|
|
|
#include "meta_absmi_insts.h"
|
|
|
|
#include "or_absmi_insts.h"
|
|
|
|
#include "prim_absmi_insts.h"
|
|
|
|
#include "type_absmi_insts.h"
|
|
|
|
#include "unify_absmi_insts.h"
|