LABEL(paren_docol) /* (docol) ( -- R:a_retaddr ) S0 -- S0 */
/* run-time routine for colon definitions */
NAME("(docol)")
{
DEF_CA
Cell * a_retaddr;
NEXT_P0;
#ifdef VM_DEBUG
if (vm_debug) {
}
#endif
rp += -1;
{
#line 157 "./prim"
#ifdef NO_IP
a_retaddr = next_code;
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" a_retaddr=", vm_out); printarg_a_(a_retaddr);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_a_2Cell(a_retaddr,rp[0]);
goto **(Label *)PFA(CFA);
#else /* !defined(NO_IP) */
a_retaddr = (Cell *)IP;
SET_IP((Xt *)PFA(CFA));
#endif /* !defined(NO_IP) */
#line 34 "prim.i"
}
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" a_retaddr=", vm_out); printarg_a_(a_retaddr);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_a_2Cell(a_retaddr,rp[0]);
LABEL2(paren_docol)
NEXT_P1_5;
LABEL3(paren_docol)
DO_GOTO;
}
LABEL(paren_docon) /* (docon) ( -- w ) S0 -- S0 */
/* run-time routine for constants */
NAME("(docon)")
{
DEF_CA
Cell w;
NEXT_P0;
#ifdef VM_DEBUG
if (vm_debug) {
}
#endif
sp += -1;
{
#line 168 "./prim"
w = *(Cell *)PFA(CFA);
#ifdef NO_IP
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" w=", vm_out); printarg_w(w);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_w2Cell(w,sp[0]);
goto *next_code;
#endif /* defined(NO_IP) */
#line 80 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" w=", vm_out); printarg_w(w);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_w2Cell(w,sp[0]);
LABEL2(paren_docon)
NEXT_P1_5;
LABEL3(paren_docon)
DO_GOTO;
}
LABEL(paren_dovar) /* (dovar) ( -- a_body ) S0 -- S0 */
/* run-time routine for variables and CREATEd words */
NAME("(dovar)")
{
DEF_CA
Cell * a_body;
NEXT_P0;
#ifdef VM_DEBUG
if (vm_debug) {
}
#endif
sp += -1;
{
#line 176 "./prim"
a_body = PFA(CFA);
#ifdef NO_IP
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" a_body=", vm_out); printarg_a_(a_body);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_a_2Cell(a_body,sp[0]);
goto *next_code;
#endif /* defined(NO_IP) */
#line 125 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" a_body=", vm_out); printarg_a_(a_body);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_a_2Cell(a_body,sp[0]);
LABEL2(paren_dovar)
NEXT_P1_5;
LABEL3(paren_dovar)
DO_GOTO;
}
LABEL(paren_douser) /* (douser) ( -- a_user ) S0 -- S0 */
/* run-time routine for constants */
NAME("(douser)")
{
DEF_CA
Cell * a_user;
NEXT_P0;
#ifdef VM_DEBUG
if (vm_debug) {
}
#endif
sp += -1;
{
#line 184 "./prim"
a_user = (Cell *)(up+*(Cell *)PFA(CFA));
#ifdef NO_IP
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" a_user=", vm_out); printarg_a_(a_user);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_a_2Cell(a_user,sp[0]);
goto *next_code;
#endif /* defined(NO_IP) */
#line 170 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" a_user=", vm_out); printarg_a_(a_user);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_a_2Cell(a_user,sp[0]);
LABEL2(paren_douser)
NEXT_P1_5;
LABEL3(paren_douser)
DO_GOTO;
}
LABEL(paren_dodefer) /* (dodefer) ( -- ) S0 -- S0 */
/* run-time routine for deferred words */
NAME("(dodefer)")
{
DEF_CA
NEXT_P0;
#ifdef VM_DEBUG
if (vm_debug) {
}
#endif
{
#line 192 "./prim"
#ifndef NO_IP
ip=IP; /* undo any ip updating that may have been performed by NEXT_P0 */
#endif /* !defined(NO_IP) */
SUPER_END; /* !! probably unnecessary and may lead to measurement errors */
VM_JUMP(EXEC1(*(Xt *)PFA(CFA)));
#line 204 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
LABEL2(paren_dodefer)
LABEL3(paren_dodefer)
DO_GOTO;
}
LABEL(paren_field) /* (dofield) ( n1 -- n2 ) S0 -- S0 */
/* run-time routine for fields */
NAME("(dofield)")
{
DEF_CA
Cell n1;
Cell n2;
NEXT_P0;
vm_Cell2n(sp[0],n1);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" n1=", vm_out); printarg_n(n1);
}
#endif
{
#line 200 "./prim"
n2 = n1 + *(Cell *)PFA(CFA);
#ifdef NO_IP
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n2=", vm_out); printarg_n(n2);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n2,sp[0]);
goto *next_code;
#endif /* defined(NO_IP) */
#line 247 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n2=", vm_out); printarg_n(n2);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n2,sp[0]);
LABEL2(paren_field)
NEXT_P1_5;
LABEL3(paren_field)
DO_GOTO;
}
LABEL(paren_doval) /* (dovalue) ( -- w ) S0 -- S0 */
/* run-time routine for constants */
NAME("(dovalue)")
{
DEF_CA
Cell w;
NEXT_P0;
#ifdef VM_DEBUG
if (vm_debug) {
}
#endif
sp += -1;
{
#line 208 "./prim"
w = *(Cell *)PFA(CFA);
#ifdef NO_IP
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" w=", vm_out); printarg_w(w);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_w2Cell(w,sp[0]);
goto *next_code;
#endif /* defined(NO_IP) */
#line 292 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" w=", vm_out); printarg_w(w);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_w2Cell(w,sp[0]);
LABEL2(paren_doval)
NEXT_P1_5;
LABEL3(paren_doval)
DO_GOTO;
}
LABEL(paren_dodoes) /* (dodoes) ( -- a_body R:a_retaddr ) S0 -- S0 */
/* run-time routine for @code{does>}-defined words */
NAME("(dodoes)")
{
DEF_CA
Cell * a_body;
Cell * a_retaddr;
NEXT_P0;
#ifdef VM_DEBUG
if (vm_debug) {
}
#endif
sp += -1;
rp += -1;
{
#line 216 "./prim"
#ifdef NO_IP
a_retaddr = next_code;
a_body = PFA(CFA);
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" a_body=", vm_out); printarg_a_(a_body);
fputs(" a_retaddr=", vm_out); printarg_a_(a_retaddr);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_a_2Cell(a_body,sp[0]);
vm_a_2Cell(a_retaddr,rp[0]);
#ifdef DEBUG
fprintf(stderr, "dodoes to %x, push %x\n", a_retaddr, a_body);
#endif
goto **(Label *)DOES_CODE1(CFA);
#else /* !defined(NO_IP) */
a_retaddr = (Cell *)IP;
a_body = PFA(CFA);
#ifdef DEBUG
fprintf(stderr, "dodoes to %x, push %x\n", a_retaddr, a_body);
#endif
SET_IP(DOES_CODE1(CFA));
#endif /* !defined(NO_IP) */
#line 353 "prim.i"
}
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" a_body=", vm_out); printarg_a_(a_body);
fputs(" a_retaddr=", vm_out); printarg_a_(a_retaddr);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_a_2Cell(a_body,sp[0]);
vm_a_2Cell(a_retaddr,rp[0]);
LABEL2(paren_dodoes)
NEXT_P1_5;
LABEL3(paren_dodoes)
DO_GOTO;
}
LABEL(paren_does_handler) /* (does-handler) ( -- ) S0 -- S0 */
/* just a slot to have an encoding for the DOESJUMP,
which is no longer used anyway (!! eliminate this) */
NAME("(does-handler)")
{
DEF_CA
NEXT_P0;
#ifdef VM_DEBUG
if (vm_debug) {
}
#endif
{
#line 236 "./prim"
#line 386 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
LABEL2(paren_does_handler)
NEXT_P1_5;
LABEL3(paren_does_handler)
DO_GOTO;
}
GROUPADD(9)
GROUP( control, 9)
LABEL(noop) /* noop ( -- ) S0 -- S0 */
/* */
NAME("noop")
{
DEF_CA
NEXT_P0;
#ifdef VM_DEBUG
if (vm_debug) {
}
#endif
{
#line 242 "./prim"
#line 415 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
LABEL2(noop)
NEXT_P1_5;
LABEL3(noop)
DO_GOTO;
}
LABEL(call) /* call ( #a_callee -- R:a_retaddr ) S0 -- S0 */
/* Call callee (a variant of docol with inline argument). */
NAME("call")
{
DEF_CA
Cell * a_callee;
Cell * a_retaddr;
NEXT_P0;
vm_Cell2a_(IMM_ARG(IPTOS,305397760 ),a_callee);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" a_callee=", vm_out); printarg_a_(a_callee);
}
#endif
INC_IP(1);
rp += -1;
{
#line 247 "./prim"
#ifdef NO_IP
assert(0);
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" a_retaddr=", vm_out); printarg_a_(a_retaddr);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_a_2Cell(a_retaddr,rp[0]);
JUMP(a_callee);
#else
#ifdef DEBUG
{
CFA_TO_NAME((((Cell *)a_callee)-2));
fprintf(stderr,"%08lx: call %08lx %.*s\n",(Cell)ip,(Cell)a_callee,
len,name);
}
#endif
a_retaddr = (Cell *)IP;
SET_IP((Xt *)a_callee);
#endif
#line 473 "prim.i"
}
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" a_retaddr=", vm_out); printarg_a_(a_retaddr);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_a_2Cell(a_retaddr,rp[0]);
LABEL2(call)
NEXT_P1_5;
LABEL3(call)
DO_GOTO;
}
LABEL(execute) /* execute ( xt -- ) S0 -- S0 */
/* Perform the semantics represented by the execution token, @i{xt}. */
NAME("execute")
{
DEF_CA
Xt xt;
NEXT_P0;
vm_Cell2xt(sp[0],xt);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" xt=", vm_out); printarg_xt(xt);
}
#endif
sp += 1;
{
#line 265 "./prim"
#ifdef DEBUG
fprintf(stderr, "execute %08x\n", xt);
#endif
#ifndef NO_IP
ip=IP;
#endif
SUPER_END;
VM_JUMP(EXEC1(xt));
#line 515 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
LABEL2(execute)
LABEL3(execute)
DO_GOTO;
}
LABEL(perform) /* perform ( a_addr -- ) S0 -- S0 */
/* @code{@@ execute}. */
NAME("perform")
{
DEF_CA
Cell * a_addr;
NEXT_P0;
vm_Cell2a_(sp[0],a_addr);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" a_addr=", vm_out); printarg_a_(a_addr);
}
#endif
sp += 1;
{
#line 276 "./prim"
/* and pfe */
#ifndef NO_IP
ip=IP;
#endif
SUPER_END;
VM_JUMP(EXEC1(*(Xt *)a_addr));
#line 550 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
LABEL2(perform)
LABEL3(perform)
DO_GOTO;
}
LABEL(semis) /* ;s ( R:w -- ) S0 -- S0 */
/* The primitive compiled by @code{EXIT}. */
NAME(";s")
{
DEF_CA
Cell w;
NEXT_P0;
vm_Cell2w(rp[0],w);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" w=", vm_out); printarg_w(w);
}
#endif
rp += 1;
{
#line 287 "./prim"
#ifdef NO_IP
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
goto *(void *)w;
#else
SET_IP((Xt *)w);
#endif
#line 593 "prim.i"
}
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
LABEL2(semis)
NEXT_P1_5;
LABEL3(semis)
DO_GOTO;
}
LABEL(unloop) /* unloop ( R:w1 R:w2 -- ) S0 -- S0 */
/* */
NAME("unloop")
{
DEF_CA
Cell w1;
Cell w2;
NEXT_P0;
vm_Cell2w(rp[1],w1);
vm_Cell2w(rp[0],w2);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" w1=", vm_out); printarg_w(w1);
fputs(" w2=", vm_out); printarg_w(w2);
}
#endif
rp += 2;
{
#line 295 "./prim"
/* !! alias for 2rdrop */
#line 629 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
LABEL2(unloop)
NEXT_P1_5;
LABEL3(unloop)
DO_GOTO;
}
LABEL(lit_perform) /* lit-perform ( #a_addr -- ) S0 -- S0 */
/* */
NAME("lit-perform")
{
DEF_CA
Cell * a_addr;
NEXT_P0;
vm_Cell2a_(IMM_ARG(IPTOS,305397761 ),a_addr);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" a_addr=", vm_out); printarg_a_(a_addr);
}
#endif
INC_IP(1);
{
#line 300 "./prim"
#ifndef NO_IP
ip=IP;
#endif
SUPER_END;
VM_JUMP(EXEC1(*(Xt *)a_addr));
#line 665 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
LABEL2(lit_perform)
LABEL3(lit_perform)
DO_GOTO;
}
LABEL(does_exec) /* does-exec ( #a_cfa -- R:nest a_pfa ) S0 -- S0 */
/* */
NAME("does-exec")
{
DEF_CA
Cell * a_cfa;
Cell nest;
Cell * a_pfa;
NEXT_P0;
vm_Cell2a_(IMM_ARG(IPTOS,305397762 ),a_cfa);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" a_cfa=", vm_out); printarg_a_(a_cfa);
}
#endif
INC_IP(1);
sp += -1;
rp += -1;
{
#line 307 "./prim"
#ifdef NO_IP
/* compiled to LIT CALL by compile_prim */
assert(0);
#else
a_pfa = PFA(a_cfa);
nest = (Cell)IP;
#ifdef DEBUG
{
CFA_TO_NAME(a_cfa);
fprintf(stderr,"%08lx: does %08lx %.*s\n",
(Cell)ip,(Cell)a_cfa,len,name);
}
#endif
SET_IP(DOES_CODE1(a_cfa));
#endif
#line 713 "prim.i"
}
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" nest=", vm_out); printarg_n(nest);
fputs(" a_pfa=", vm_out); printarg_a_(a_pfa);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(nest,rp[0]);
vm_a_2Cell(a_pfa,sp[0]);
LABEL2(does_exec)
NEXT_P1_5;
LABEL3(does_exec)
DO_GOTO;
}
GROUPADD(8)
#ifdef HAS_GLOCALS
LABEL(branch_lp_plus_store_number) /* branch-lp+!# ( #a_target #nlocals -- ) S0 -- S0 */
/* */
NAME("branch-lp+!#")
{
DEF_CA
Cell * a_target;
Cell nlocals;
NEXT_P0;
vm_Cell2a_(IMM_ARG(IPTOS,305397763 ),a_target);
vm_Cell2n(IMM_ARG(IP[1],305397764 ),nlocals);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" a_target=", vm_out); printarg_a_(a_target);
fputs(" nlocals=", vm_out); printarg_n(nlocals);
}
#endif
INC_IP(2);
{
#line 326 "./prim"
/* this will probably not be used */
lp += nlocals;
#ifdef NO_IP
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
JUMP(a_target);
#else
SET_IP((Xt *)a_target);
#endif
#line 770 "prim.i"
}
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
LABEL2(branch_lp_plus_store_number)
NEXT_P1_5;
LABEL3(branch_lp_plus_store_number)
DO_GOTO;
}
GROUPADD(1)
#endif
LABEL(branch) /* branch ( #a_target -- ) S0 -- S0 */
/* */
NAME("branch")
{
DEF_CA
Cell * a_target;
NEXT_P0;
vm_Cell2a_(IMM_ARG(IPTOS,305397765 ),a_target);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" a_target=", vm_out); printarg_a_(a_target);
}
#endif
INC_IP(1);
{
#line 338 "./prim"
#ifdef NO_IP
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
JUMP(a_target);
#else
SET_IP((Xt *)a_target);
#endif
#line 818 "prim.i"
}
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
LABEL2(branch)
NEXT_P1_5;
LABEL3(branch)
DO_GOTO;
}
LABEL(question_branch) /* ?branch ( #a_target f -- ) S0 -- S0 */
/* */
NAME("?branch")
{
DEF_CA
Cell * a_target;
Bool f;
NEXT_P0;
vm_Cell2a_(IMM_ARG(IPTOS,305397766 ),a_target);
vm_Cell2f(sp[0],f);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" a_target=", vm_out); printarg_a_(a_target);
fputs(" f=", vm_out); printarg_f(f);
}
#endif
INC_IP(1);
sp += 1;
{
#line 383 "./prim"
#ifdef NO_IP
#line 382
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
#line 382
#endif
#line 382
if (f==0) {
#line 382
#ifdef NO_IP
#line 382
JUMP(a_target);
#line 382
#else
#line 382
SET_IP((Xt *)a_target);
#line 382
/* 0=0 */
#line 382
#endif
#line 382
}
#line 382
/* 0=0 */
#line 382
#line 886 "prim.i"
}
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
LABEL2(question_branch)
NEXT_P1_5;
LABEL3(question_branch)
DO_GOTO;
}
GROUPADD(2)
#ifdef HAS_GLOCALS
LABEL(question_branch_lp_plus_store_number) /* ?branch-lp+!# ( #a_target #nlocals f -- ) S0 -- S0 */
/* */
NAME("?branch-lp+!#")
{
DEF_CA
Cell * a_target;
Cell nlocals;
Bool f;
NEXT_P0;
vm_Cell2a_(IMM_ARG(IPTOS,305397767 ),a_target);
vm_Cell2n(IMM_ARG(IP[1],305397768 ),nlocals);
vm_Cell2f(sp[0],f);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" a_target=", vm_out); printarg_a_(a_target);
fputs(" nlocals=", vm_out); printarg_n(nlocals);
fputs(" f=", vm_out); printarg_f(f);
}
#endif
INC_IP(2);
sp += 1;
{
#line 383 "./prim"
#ifdef NO_IP
#line 382
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
#line 382
#endif
#line 382
if (f==0) {
#line 382
lp += nlocals;
#line 382
#ifdef NO_IP
#line 382
JUMP(a_target);
#line 382
#else
#line 382
SET_IP((Xt *)a_target);
#line 382
/* 0=0 */
#line 382
#endif
#line 382
}
#line 382
/* 0=0 */
#line 382
#line 961 "prim.i"
}
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
LABEL2(question_branch_lp_plus_store_number)
NEXT_P1_5;
LABEL3(question_branch_lp_plus_store_number)
DO_GOTO;
}
GROUPADD(1)
#endif
GROUPADD(0)
#ifdef HAS_XCONDS
LABEL(question_dupe_question_branch) /* ?dup-?branch ( #a_target f -- S:... ) S0 -- S0 */
/* The run-time procedure compiled by @code{?DUP-IF}. */
NAME("?dup-?branch")
{
DEF_CA
Cell * a_target;
Bool f;
NEXT_P0;
vm_Cell2a_(IMM_ARG(IPTOS,305397769 ),a_target);
vm_Cell2f(sp[0],f);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" a_target=", vm_out); printarg_a_(a_target);
fputs(" f=", vm_out); printarg_f(f);
}
#endif
INC_IP(1);
sp += 1;
{
#line 398 "./prim"
if (f==0) {
#ifdef NO_IP
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
JUMP(a_target);
#else
SET_IP((Xt *)a_target);
#endif
} else {
sp--;
sp[0]=f;
}
#line 1020 "prim.i"
}
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
LABEL2(question_dupe_question_branch)
NEXT_P1_5;
LABEL3(question_dupe_question_branch)
DO_GOTO;
}
LABEL(question_dupe_zero_equals_question_branch) /* ?dup-0=-?branch ( #a_target f -- S:... ) S0 -- S0 */
/* The run-time procedure compiled by @code{?DUP-0=-IF}. */
NAME("?dup-0=-?branch")
{
DEF_CA
Cell * a_target;
Bool f;
NEXT_P0;
vm_Cell2a_(IMM_ARG(IPTOS,305397770 ),a_target);
vm_Cell2f(sp[0],f);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" a_target=", vm_out); printarg_a_(a_target);
fputs(" f=", vm_out); printarg_f(f);
}
#endif
INC_IP(1);
sp += 1;
{
#line 412 "./prim"
if (f!=0) {
sp--;
sp[0]=f;
#ifdef NO_IP
JUMP(a_target);
#else
SET_IP((Xt *)a_target);
#endif
}
#line 1065 "prim.i"
}
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
LABEL2(question_dupe_zero_equals_question_branch)
NEXT_P1_5;
LABEL3(question_dupe_zero_equals_question_branch)
DO_GOTO;
}
GROUPADD(2)
#endif
LABEL(paren_next) /* (next) ( #a_target R:n1 -- R:n2 ) S0 -- S0 */
/* */
NAME("(next)")
{
DEF_CA
Cell * a_target;
Cell n1;
Cell n2;
NEXT_P0;
vm_Cell2a_(IMM_ARG(IPTOS,305397771 ),a_target);
vm_Cell2n(rp[0],n1);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" a_target=", vm_out); printarg_a_(a_target);
fputs(" n1=", vm_out); printarg_n(n1);
}
#endif
INC_IP(1);
{
#line 425 "./prim"
n2=n1-1;
#line 424
#ifdef NO_IP
#line 424
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n2=", vm_out); printarg_n(n2);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n2,rp[0]);
#line 424
#endif
#line 424
if (n1) {
#line 424
#ifdef NO_IP
#line 424
JUMP(a_target);
#line 424
#else
#line 424
SET_IP((Xt *)a_target);
#line 424
/* 0=0 */
#line 424
#endif
#line 424
}
#line 424
/* 0=0 */
#line 424
#line 1139 "prim.i"
}
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n2=", vm_out); printarg_n(n2);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n2,rp[0]);
LABEL2(paren_next)
NEXT_P1_5;
LABEL3(paren_next)
DO_GOTO;
}
GROUPADD(1)
#ifdef HAS_GLOCALS
LABEL(paren_next_lp_plus_store_number) /* (next)-lp+!# ( #a_target #nlocals R:n1 -- R:n2 ) S0 -- S0 */
/* */
NAME("(next)-lp+!#")
{
DEF_CA
Cell * a_target;
Cell nlocals;
Cell n1;
Cell n2;
NEXT_P0;
vm_Cell2a_(IMM_ARG(IPTOS,305397772 ),a_target);
vm_Cell2n(IMM_ARG(IP[1],305397773 ),nlocals);
vm_Cell2n(rp[0],n1);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" a_target=", vm_out); printarg_a_(a_target);
fputs(" nlocals=", vm_out); printarg_n(nlocals);
fputs(" n1=", vm_out); printarg_n(n1);
}
#endif
INC_IP(2);
{
#line 425 "./prim"
n2=n1-1;
#line 424
#ifdef NO_IP
#line 424
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n2=", vm_out); printarg_n(n2);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n2,rp[0]);
#line 424
#endif
#line 424
if (n1) {
#line 424
lp += nlocals;
#line 424
#ifdef NO_IP
#line 424
JUMP(a_target);
#line 424
#else
#line 424
SET_IP((Xt *)a_target);
#line 424
/* 0=0 */
#line 424
#endif
#line 424
}
#line 424
/* 0=0 */
#line 424
#line 1220 "prim.i"
}
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n2=", vm_out); printarg_n(n2);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n2,rp[0]);
LABEL2(paren_next_lp_plus_store_number)
NEXT_P1_5;
LABEL3(paren_next_lp_plus_store_number)
DO_GOTO;
}
GROUPADD(1)
#endif
LABEL(paren_loop) /* (loop) ( #a_target R:nlimit R:n1 -- R:nlimit R:n2 ) S0 -- S0 */
/* */
NAME("(loop)")
{
DEF_CA
Cell * a_target;
Cell nlimit;
Cell n1;
Cell n2;
NEXT_P0;
vm_Cell2a_(IMM_ARG(IPTOS,305397774 ),a_target);
vm_Cell2n(rp[1],nlimit);
vm_Cell2n(rp[0],n1);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" a_target=", vm_out); printarg_a_(a_target);
fputs(" nlimit=", vm_out); printarg_n(nlimit);
fputs(" n1=", vm_out); printarg_n(n1);
}
#endif
INC_IP(1);
{
#line 432 "./prim"
n2=n1+1;
#line 431
#ifdef NO_IP
#line 431
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n2=", vm_out); printarg_n(n2);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n2,rp[0]);
#line 431
#endif
#line 431
if (n2 != nlimit) {
#line 431
#ifdef NO_IP
#line 431
JUMP(a_target);
#line 431
#else
#line 431
SET_IP((Xt *)a_target);
#line 431
/* 0=0 */
#line 431
#endif
#line 431
}
#line 431
/* 0=0 */
#line 431
#line 1299 "prim.i"
}
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n2=", vm_out); printarg_n(n2);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n2,rp[0]);
LABEL2(paren_loop)
NEXT_P1_5;
LABEL3(paren_loop)
DO_GOTO;
}
GROUPADD(1)
#ifdef HAS_GLOCALS
LABEL(paren_loop_lp_plus_store_number) /* (loop)-lp+!# ( #a_target #nlocals R:nlimit R:n1 -- R:nlimit R:n2 ) S0 -- S0 */
/* */
NAME("(loop)-lp+!#")
{
DEF_CA
Cell * a_target;
Cell nlocals;
Cell nlimit;
Cell n1;
Cell n2;
NEXT_P0;
vm_Cell2a_(IMM_ARG(IPTOS,305397775 ),a_target);
vm_Cell2n(IMM_ARG(IP[1],305397776 ),nlocals);
vm_Cell2n(rp[1],nlimit);
vm_Cell2n(rp[0],n1);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" a_target=", vm_out); printarg_a_(a_target);
fputs(" nlocals=", vm_out); printarg_n(nlocals);
fputs(" nlimit=", vm_out); printarg_n(nlimit);
fputs(" n1=", vm_out); printarg_n(n1);
}
#endif
INC_IP(2);
{
#line 432 "./prim"
n2=n1+1;
#line 431
#ifdef NO_IP
#line 431
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n2=", vm_out); printarg_n(n2);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n2,rp[0]);
#line 431
#endif
#line 431
if (n2 != nlimit) {
#line 431
lp += nlocals;
#line 431
#ifdef NO_IP
#line 431
JUMP(a_target);
#line 431
#else
#line 431
SET_IP((Xt *)a_target);
#line 431
/* 0=0 */
#line 431
#endif
#line 431
}
#line 431
/* 0=0 */
#line 431
#line 1383 "prim.i"
}
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n2=", vm_out); printarg_n(n2);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n2,rp[0]);
LABEL2(paren_loop_lp_plus_store_number)
NEXT_P1_5;
LABEL3(paren_loop_lp_plus_store_number)
DO_GOTO;
}
GROUPADD(1)
#endif
LABEL(paren_plus_loop) /* (+loop) ( #a_target n R:nlimit R:n1 -- R:nlimit R:n2 ) S0 -- S0 */
/* */
NAME("(+loop)")
{
DEF_CA
Cell * a_target;
Cell n;
Cell nlimit;
Cell n1;
Cell n2;
NEXT_P0;
vm_Cell2a_(IMM_ARG(IPTOS,305397777 ),a_target);
vm_Cell2n(sp[0],n);
vm_Cell2n(rp[1],nlimit);
vm_Cell2n(rp[0],n1);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" a_target=", vm_out); printarg_a_(a_target);
fputs(" n=", vm_out); printarg_n(n);
fputs(" nlimit=", vm_out); printarg_n(nlimit);
fputs(" n1=", vm_out); printarg_n(n1);
}
#endif
INC_IP(1);
sp += 1;
{
#line 440 "./prim"
/* !! check this thoroughly */
#line 439
/* sign bit manipulation and test: (x^y)<0 is equivalent to (x<0) != (y<0) */
#line 439
/* dependent upon two's complement arithmetic */
#line 439
Cell olddiff = n1-nlimit;
#line 439
n2=n1+n;
#line 439
#ifdef NO_IP
#line 439
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n2=", vm_out); printarg_n(n2);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n2,rp[0]);
#line 439
#endif
#line 439
if (((olddiff^(olddiff+n)) /* the limit is not crossed */
#line 439
&(olddiff^n)) /* OR it is a wrap-around effect */
#line 439
>=0) { /* & is used to avoid having two branches for gforth-native */
#line 439
#ifdef NO_IP
#line 439
JUMP(a_target);
#line 439
#else
#line 439
SET_IP((Xt *)a_target);
#line 439
/* 0=0 */
#line 439
#endif
#line 439
}
#line 439
/* 0=0 */
#line 439
#line 1478 "prim.i"
}
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n2=", vm_out); printarg_n(n2);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n2,rp[0]);
LABEL2(paren_plus_loop)
NEXT_P1_5;
LABEL3(paren_plus_loop)
DO_GOTO;
}
GROUPADD(1)
#ifdef HAS_GLOCALS
LABEL(paren_plus_loop_lp_plus_store_number) /* (+loop)-lp+!# ( #a_target #nlocals n R:nlimit R:n1 -- R:nlimit R:n2 ) S0 -- S0 */
/* */
NAME("(+loop)-lp+!#")
{
DEF_CA
Cell * a_target;
Cell nlocals;
Cell n;
Cell nlimit;
Cell n1;
Cell n2;
NEXT_P0;
vm_Cell2a_(IMM_ARG(IPTOS,305397778 ),a_target);
vm_Cell2n(IMM_ARG(IP[1],305397779 ),nlocals);
vm_Cell2n(sp[0],n);
vm_Cell2n(rp[1],nlimit);
vm_Cell2n(rp[0],n1);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" a_target=", vm_out); printarg_a_(a_target);
fputs(" nlocals=", vm_out); printarg_n(nlocals);
fputs(" n=", vm_out); printarg_n(n);
fputs(" nlimit=", vm_out); printarg_n(nlimit);
fputs(" n1=", vm_out); printarg_n(n1);
}
#endif
INC_IP(2);
sp += 1;
{
#line 440 "./prim"
/* !! check this thoroughly */
#line 439
/* sign bit manipulation and test: (x^y)<0 is equivalent to (x<0) != (y<0) */
#line 439
/* dependent upon two's complement arithmetic */
#line 439
Cell olddiff = n1-nlimit;
#line 439
n2=n1+n;
#line 439
#ifdef NO_IP
#line 439
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n2=", vm_out); printarg_n(n2);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n2,rp[0]);
#line 439
#endif
#line 439
if (((olddiff^(olddiff+n)) /* the limit is not crossed */
#line 439
&(olddiff^n)) /* OR it is a wrap-around effect */
#line 439
>=0) { /* & is used to avoid having two branches for gforth-native */
#line 439
lp += nlocals;
#line 439
#ifdef NO_IP
#line 439
JUMP(a_target);
#line 439
#else
#line 439
SET_IP((Xt *)a_target);
#line 439
/* 0=0 */
#line 439
#endif
#line 439
}
#line 439
/* 0=0 */
#line 439
#line 1578 "prim.i"
}
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n2=", vm_out); printarg_n(n2);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n2,rp[0]);
LABEL2(paren_plus_loop_lp_plus_store_number)
NEXT_P1_5;
LABEL3(paren_plus_loop_lp_plus_store_number)
DO_GOTO;
}
GROUPADD(1)
#endif
GROUPADD(0)
#ifdef HAS_XCONDS
LABEL(paren_minus_loop) /* (-loop) ( #a_target u R:nlimit R:n1 -- R:nlimit R:n2 ) S0 -- S0 */
/* */
NAME("(-loop)")
{
DEF_CA
Cell * a_target;
UCell u;
Cell nlimit;
Cell n1;
Cell n2;
NEXT_P0;
vm_Cell2a_(IMM_ARG(IPTOS,305397780 ),a_target);
vm_Cell2u(sp[0],u);
vm_Cell2n(rp[1],nlimit);
vm_Cell2n(rp[0],n1);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" a_target=", vm_out); printarg_a_(a_target);
fputs(" u=", vm_out); printarg_u(u);
fputs(" nlimit=", vm_out); printarg_n(nlimit);
fputs(" n1=", vm_out); printarg_n(n1);
}
#endif
INC_IP(1);
sp += 1;
{
#line 459 "./prim"
UCell olddiff = n1-nlimit;
#line 458
n2=n1-u;
#line 458
#ifdef NO_IP
#line 458
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n2=", vm_out); printarg_n(n2);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n2,rp[0]);
#line 458
#endif
#line 458
if (olddiff>u) {
#line 458
#ifdef NO_IP
#line 458
JUMP(a_target);
#line 458
#else
#line 458
SET_IP((Xt *)a_target);
#line 458
/* 0=0 */
#line 458
#endif
#line 458
}
#line 458
/* 0=0 */
#line 458
#line 1665 "prim.i"
}
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n2=", vm_out); printarg_n(n2);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n2,rp[0]);
LABEL2(paren_minus_loop)
NEXT_P1_5;
LABEL3(paren_minus_loop)
DO_GOTO;
}
GROUPADD(1)
#ifdef HAS_GLOCALS
LABEL(paren_minus_loop_lp_plus_store_number) /* (-loop)-lp+!# ( #a_target #nlocals u R:nlimit R:n1 -- R:nlimit R:n2 ) S0 -- S0 */
/* */
NAME("(-loop)-lp+!#")
{
DEF_CA
Cell * a_target;
Cell nlocals;
UCell u;
Cell nlimit;
Cell n1;
Cell n2;
NEXT_P0;
vm_Cell2a_(IMM_ARG(IPTOS,305397781 ),a_target);
vm_Cell2n(IMM_ARG(IP[1],305397782 ),nlocals);
vm_Cell2u(sp[0],u);
vm_Cell2n(rp[1],nlimit);
vm_Cell2n(rp[0],n1);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" a_target=", vm_out); printarg_a_(a_target);
fputs(" nlocals=", vm_out); printarg_n(nlocals);
fputs(" u=", vm_out); printarg_u(u);
fputs(" nlimit=", vm_out); printarg_n(nlimit);
fputs(" n1=", vm_out); printarg_n(n1);
}
#endif
INC_IP(2);
sp += 1;
{
#line 459 "./prim"
UCell olddiff = n1-nlimit;
#line 458
n2=n1-u;
#line 458
#ifdef NO_IP
#line 458
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n2=", vm_out); printarg_n(n2);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n2,rp[0]);
#line 458
#endif
#line 458
if (olddiff>u) {
#line 458
lp += nlocals;
#line 458
#ifdef NO_IP
#line 458
JUMP(a_target);
#line 458
#else
#line 458
SET_IP((Xt *)a_target);
#line 458
/* 0=0 */
#line 458
#endif
#line 458
}
#line 458
/* 0=0 */
#line 458
#line 1755 "prim.i"
}
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n2=", vm_out); printarg_n(n2);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n2,rp[0]);
LABEL2(paren_minus_loop_lp_plus_store_number)
NEXT_P1_5;
LABEL3(paren_minus_loop_lp_plus_store_number)
DO_GOTO;
}
GROUPADD(1)
#endif
LABEL(paren_symmetric_plus_loop) /* (s+loop) ( #a_target n R:nlimit R:n1 -- R:nlimit R:n2 ) S0 -- S0 */
/* The run-time procedure compiled by S+LOOP. It loops until the index
crosses the boundary between limit and limit-sign(n). I.e. a symmetric
version of (+LOOP). */
NAME("(s+loop)")
{
DEF_CA
Cell * a_target;
Cell n;
Cell nlimit;
Cell n1;
Cell n2;
NEXT_P0;
vm_Cell2a_(IMM_ARG(IPTOS,305397783 ),a_target);
vm_Cell2n(sp[0],n);
vm_Cell2n(rp[1],nlimit);
vm_Cell2n(rp[0],n1);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" a_target=", vm_out); printarg_a_(a_target);
fputs(" n=", vm_out); printarg_n(n);
fputs(" nlimit=", vm_out); printarg_n(nlimit);
fputs(" n1=", vm_out); printarg_n(n1);
}
#endif
INC_IP(1);
sp += 1;
{
#line 465 "./prim"
/* !! check this thoroughly */
#line 464
Cell diff = n1-nlimit;
#line 464
Cell newdiff = diff+n;
#line 464
if (n<0) {
#line 464
diff = -diff;
#line 464
newdiff = -newdiff;
#line 464
}
#line 464
n2=n1+n;
#line 464
#ifdef NO_IP
#line 464
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n2=", vm_out); printarg_n(n2);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n2,rp[0]);
#line 464
#endif
#line 464
if (((~diff)|newdiff)<0) { /* use | to avoid two branches for gforth-native */
#line 464
#ifdef NO_IP
#line 464
JUMP(a_target);
#line 464
#else
#line 464
SET_IP((Xt *)a_target);
#line 464
/* 0=0 */
#line 464
#endif
#line 464
}
#line 464
/* 0=0 */
#line 464
#line 1854 "prim.i"
}
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n2=", vm_out); printarg_n(n2);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n2,rp[0]);
LABEL2(paren_symmetric_plus_loop)
NEXT_P1_5;
LABEL3(paren_symmetric_plus_loop)
DO_GOTO;
}
GROUPADD(1)
#ifdef HAS_GLOCALS
LABEL(paren_symmetric_plus_loop_lp_plus_store_number) /* (s+loop)-lp+!# ( #a_target #nlocals n R:nlimit R:n1 -- R:nlimit R:n2 ) S0 -- S0 */
/* The run-time procedure compiled by S+LOOP. It loops until the index
crosses the boundary between limit and limit-sign(n). I.e. a symmetric
version of (+LOOP). */
NAME("(s+loop)-lp+!#")
{
DEF_CA
Cell * a_target;
Cell nlocals;
Cell n;
Cell nlimit;
Cell n1;
Cell n2;
NEXT_P0;
vm_Cell2a_(IMM_ARG(IPTOS,305397784 ),a_target);
vm_Cell2n(IMM_ARG(IP[1],305397785 ),nlocals);
vm_Cell2n(sp[0],n);
vm_Cell2n(rp[1],nlimit);
vm_Cell2n(rp[0],n1);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" a_target=", vm_out); printarg_a_(a_target);
fputs(" nlocals=", vm_out); printarg_n(nlocals);
fputs(" n=", vm_out); printarg_n(n);
fputs(" nlimit=", vm_out); printarg_n(nlimit);
fputs(" n1=", vm_out); printarg_n(n1);
}
#endif
INC_IP(2);
sp += 1;
{
#line 465 "./prim"
/* !! check this thoroughly */
#line 464
Cell diff = n1-nlimit;
#line 464
Cell newdiff = diff+n;
#line 464
if (n<0) {
#line 464
diff = -diff;
#line 464
newdiff = -newdiff;
#line 464
}
#line 464
n2=n1+n;
#line 464
#ifdef NO_IP
#line 464
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n2=", vm_out); printarg_n(n2);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n2,rp[0]);
#line 464
#endif
#line 464
if (((~diff)|newdiff)<0) { /* use | to avoid two branches for gforth-native */
#line 464
lp += nlocals;
#line 464
#ifdef NO_IP
#line 464
JUMP(a_target);
#line 464
#else
#line 464
SET_IP((Xt *)a_target);
#line 464
/* 0=0 */
#line 464
#endif
#line 464
}
#line 464
/* 0=0 */
#line 464
#line 1958 "prim.i"
}
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n2=", vm_out); printarg_n(n2);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n2,rp[0]);
LABEL2(paren_symmetric_plus_loop_lp_plus_store_number)
NEXT_P1_5;
LABEL3(paren_symmetric_plus_loop_lp_plus_store_number)
DO_GOTO;
}
GROUPADD(1)
#endif
GROUPADD(0)
#endif
LABEL(paren_for) /* (for) ( ncount -- R:nlimit R:ncount ) S0 -- S0 */
/* */
NAME("(for)")
{
DEF_CA
Cell ncount;
Cell nlimit;
NEXT_P0;
vm_Cell2n(sp[0],ncount);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" ncount=", vm_out); printarg_n(ncount);
}
#endif
sp += 1;
rp += -2;
{
#line 483 "./prim"
/* or (for) = >r -- collides with unloop! */
nlimit=0;
#line 2000 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" nlimit=", vm_out); printarg_n(nlimit);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(nlimit,rp[1]);
vm_n2Cell(ncount,rp[0]);
LABEL2(paren_for)
NEXT_P1_5;
LABEL3(paren_for)
DO_GOTO;
}
LABEL(paren_do) /* (do) ( nlimit nstart -- R:nlimit R:nstart ) S0 -- S0 */
/* */
NAME("(do)")
{
DEF_CA
Cell nlimit;
Cell nstart;
NEXT_P0;
vm_Cell2n(sp[1],nlimit);
vm_Cell2n(sp[0],nstart);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" nlimit=", vm_out); printarg_n(nlimit);
fputs(" nstart=", vm_out); printarg_n(nstart);
}
#endif
sp += 2;
rp += -2;
{
#line 489 "./prim"
#line 2038 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(nlimit,rp[1]);
vm_n2Cell(nstart,rp[0]);
LABEL2(paren_do)
NEXT_P1_5;
LABEL3(paren_do)
DO_GOTO;
}
LABEL(paren_question_do) /* (?do) ( #a_target nlimit nstart -- R:nlimit R:nstart ) S0 -- S0 */
/* */
NAME("(?do)")
{
DEF_CA
Cell * a_target;
Cell nlimit;
Cell nstart;
NEXT_P0;
vm_Cell2a_(IMM_ARG(IPTOS,305397786 ),a_target);
vm_Cell2n(sp[1],nlimit);
vm_Cell2n(sp[0],nstart);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" a_target=", vm_out); printarg_a_(a_target);
fputs(" nlimit=", vm_out); printarg_n(nlimit);
fputs(" nstart=", vm_out); printarg_n(nstart);
}
#endif
INC_IP(1);
sp += 2;
rp += -2;
{
#line 493 "./prim"
#ifdef NO_IP
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(nlimit,rp[1]);
vm_n2Cell(nstart,rp[0]);
#endif
if (nstart == nlimit) {
#ifdef NO_IP
JUMP(a_target);
#else
SET_IP((Xt *)a_target);
#endif
}
#line 2099 "prim.i"
}
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(nlimit,rp[1]);
vm_n2Cell(nstart,rp[0]);
LABEL2(paren_question_do)
NEXT_P1_5;
LABEL3(paren_question_do)
DO_GOTO;
}
GROUPADD(3)
#ifdef HAS_XCONDS
LABEL(paren_plus_do) /* (+do) ( #a_target nlimit nstart -- R:nlimit R:nstart ) S0 -- S0 */
/* */
NAME("(+do)")
{
DEF_CA
Cell * a_target;
Cell nlimit;
Cell nstart;
NEXT_P0;
vm_Cell2a_(IMM_ARG(IPTOS,305397787 ),a_target);
vm_Cell2n(sp[1],nlimit);
vm_Cell2n(sp[0],nstart);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" a_target=", vm_out); printarg_a_(a_target);
fputs(" nlimit=", vm_out); printarg_n(nlimit);
fputs(" nstart=", vm_out); printarg_n(nstart);
}
#endif
INC_IP(1);
sp += 2;
rp += -2;
{
#line 514 "./prim"
#ifdef NO_IP
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(nlimit,rp[1]);
vm_n2Cell(nstart,rp[0]);
#endif
if (nstart >= nlimit) {
#ifdef NO_IP
JUMP(a_target);
#else
SET_IP((Xt *)a_target);
#endif
}
#line 2163 "prim.i"
}
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(nlimit,rp[1]);
vm_n2Cell(nstart,rp[0]);
LABEL2(paren_plus_do)
NEXT_P1_5;
LABEL3(paren_plus_do)
DO_GOTO;
}
LABEL(paren_u_plus_do) /* (u+do) ( #a_target ulimit ustart -- R:ulimit R:ustart ) S0 -- S0 */
/* */
NAME("(u+do)")
{
DEF_CA
Cell * a_target;
UCell ulimit;
UCell ustart;
NEXT_P0;
vm_Cell2a_(IMM_ARG(IPTOS,305397788 ),a_target);
vm_Cell2u(sp[1],ulimit);
vm_Cell2u(sp[0],ustart);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" a_target=", vm_out); printarg_a_(a_target);
fputs(" ulimit=", vm_out); printarg_u(ulimit);
fputs(" ustart=", vm_out); printarg_u(ustart);
}
#endif
INC_IP(1);
sp += 2;
rp += -2;
{
#line 535 "./prim"
#ifdef NO_IP
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_u2Cell(ulimit,rp[1]);
vm_u2Cell(ustart,rp[0]);
#endif
if (ustart >= ulimit) {
#ifdef NO_IP
JUMP(a_target);
#else
SET_IP((Xt *)a_target);
#endif
}
#line 2225 "prim.i"
}
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_u2Cell(ulimit,rp[1]);
vm_u2Cell(ustart,rp[0]);
LABEL2(paren_u_plus_do)
NEXT_P1_5;
LABEL3(paren_u_plus_do)
DO_GOTO;
}
LABEL(paren_minus_do) /* (-do) ( #a_target nlimit nstart -- R:nlimit R:nstart ) S0 -- S0 */
/* */
NAME("(-do)")
{
DEF_CA
Cell * a_target;
Cell nlimit;
Cell nstart;
NEXT_P0;
vm_Cell2a_(IMM_ARG(IPTOS,305397789 ),a_target);
vm_Cell2n(sp[1],nlimit);
vm_Cell2n(sp[0],nstart);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" a_target=", vm_out); printarg_a_(a_target);
fputs(" nlimit=", vm_out); printarg_n(nlimit);
fputs(" nstart=", vm_out); printarg_n(nstart);
}
#endif
INC_IP(1);
sp += 2;
rp += -2;
{
#line 556 "./prim"
#ifdef NO_IP
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(nlimit,rp[1]);
vm_n2Cell(nstart,rp[0]);
#endif
if (nstart <= nlimit) {
#ifdef NO_IP
JUMP(a_target);
#else
SET_IP((Xt *)a_target);
#endif
}
#line 2287 "prim.i"
}
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(nlimit,rp[1]);
vm_n2Cell(nstart,rp[0]);
LABEL2(paren_minus_do)
NEXT_P1_5;
LABEL3(paren_minus_do)
DO_GOTO;
}
LABEL(paren_u_minus_do) /* (u-do) ( #a_target ulimit ustart -- R:ulimit R:ustart ) S0 -- S0 */
/* */
NAME("(u-do)")
{
DEF_CA
Cell * a_target;
UCell ulimit;
UCell ustart;
NEXT_P0;
vm_Cell2a_(IMM_ARG(IPTOS,305397790 ),a_target);
vm_Cell2u(sp[1],ulimit);
vm_Cell2u(sp[0],ustart);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" a_target=", vm_out); printarg_a_(a_target);
fputs(" ulimit=", vm_out); printarg_u(ulimit);
fputs(" ustart=", vm_out); printarg_u(ustart);
}
#endif
INC_IP(1);
sp += 2;
rp += -2;
{
#line 577 "./prim"
#ifdef NO_IP
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_u2Cell(ulimit,rp[1]);
vm_u2Cell(ustart,rp[0]);
#endif
if (ustart <= ulimit) {
#ifdef NO_IP
JUMP(a_target);
#else
SET_IP((Xt *)a_target);
#endif
}
#line 2349 "prim.i"
}
SUPER_END;
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_u2Cell(ulimit,rp[1]);
vm_u2Cell(ustart,rp[0]);
LABEL2(paren_u_minus_do)
NEXT_P1_5;
LABEL3(paren_u_minus_do)
DO_GOTO;
}
GROUPADD(4)
#endif
LABEL(i) /* i ( R:n -- R:n n ) S0 -- S0 */
/* */
NAME("i")
{
DEF_CA
Cell n;
NEXT_P0;
vm_Cell2n(rp[0],n);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" n=", vm_out); printarg_n(n);
}
#endif
sp += -1;
{
#line 603 "./prim"
#line 2385 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n,sp[0]);
LABEL2(i)
NEXT_P1_5;
LABEL3(i)
DO_GOTO;
}
LABEL(i_tick) /* i' ( R:w R:w2 -- R:w R:w2 w ) S0 -- S0 */
/* */
NAME("i'")
{
DEF_CA
Cell w;
Cell w2;
NEXT_P0;
vm_Cell2w(rp[1],w);
vm_Cell2w(rp[0],w2);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" w=", vm_out); printarg_w(w);
fputs(" w2=", vm_out); printarg_w(w2);
}
#endif
sp += -1;
{
#line 608 "./prim"
#line 2420 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_w2Cell(w,sp[0]);
LABEL2(i_tick)
NEXT_P1_5;
LABEL3(i_tick)
DO_GOTO;
}
LABEL(j) /* j ( R:w R:w1 R:w2 -- w R:w R:w1 R:w2 ) S0 -- S0 */
/* */
NAME("j")
{
DEF_CA
Cell w;
Cell w1;
Cell w2;
NEXT_P0;
vm_Cell2w(rp[2],w);
vm_Cell2w(rp[1],w1);
vm_Cell2w(rp[0],w2);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" w=", vm_out); printarg_w(w);
fputs(" w1=", vm_out); printarg_w(w1);
fputs(" w2=", vm_out); printarg_w(w2);
}
#endif
sp += -1;
{
#line 614 "./prim"
#line 2458 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_w2Cell(w,sp[0]);
LABEL2(j)
NEXT_P1_5;
LABEL3(j)
DO_GOTO;
}
LABEL(k) /* k ( R:w R:w1 R:w2 R:w3 R:w4 -- w R:w R:w1 R:w2 R:w3 R:w4 ) S0 -- S0 */
/* */
NAME("k")
{
DEF_CA
Cell w;
Cell w1;
Cell w2;
Cell w3;
Cell w4;
NEXT_P0;
vm_Cell2w(rp[4],w);
vm_Cell2w(rp[3],w1);
vm_Cell2w(rp[2],w2);
vm_Cell2w(rp[1],w3);
vm_Cell2w(rp[0],w4);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" w=", vm_out); printarg_w(w);
fputs(" w1=", vm_out); printarg_w(w1);
fputs(" w2=", vm_out); printarg_w(w2);
fputs(" w3=", vm_out); printarg_w(w3);
fputs(" w4=", vm_out); printarg_w(w4);
}
#endif
sp += -1;
{
#line 620 "./prim"
#line 2502 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_w2Cell(w,sp[0]);
LABEL2(k)
NEXT_P1_5;
LABEL3(k)
DO_GOTO;
}
GROUPADD(4)
GROUP( strings, 44)
LABEL(move) /* move ( c_from c_to ucount -- ) S0 -- S0 */
/* Copy the contents of @i{ucount} aus at @i{c-from} to
@i{c-to}. @code{move} works correctly even if the two areas overlap. */
NAME("move")
{
DEF_CA
Char * c_from;
Char * c_to;
UCell ucount;
NEXT_P0;
vm_Cell2c_(sp[2],c_from);
vm_Cell2c_(sp[1],c_to);
vm_Cell2u(sp[0],ucount);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" c_from=", vm_out); printarg_c_(c_from);
fputs(" c_to=", vm_out); printarg_c_(c_to);
fputs(" ucount=", vm_out); printarg_u(ucount);
}
#endif
sp += 3;
{
#line 634 "./prim"
/* !! note that the standard specifies addr, not c-addr */
memmove(c_to,c_from,ucount);
/* make an Ifdef for bsd and others? */
#line 2546 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
LABEL2(move)
NEXT_P1_5;
LABEL3(move)
DO_GOTO;
}
LABEL(c_move) /* cmove ( c_from c_to u -- ) S0 -- S0 */
/* Copy the contents of @i{ucount} characters from data space at
@i{c-from} to @i{c-to}. The copy proceeds @code{char}-by-@code{char}
from low address to high address; i.e., for overlapping areas it is
safe if @i{c-to}=<@i{c-from}. */
NAME("cmove")
{
DEF_CA
Char * c_from;
Char * c_to;
UCell u;
NEXT_P0;
vm_Cell2c_(sp[2],c_from);
vm_Cell2c_(sp[1],c_to);
vm_Cell2u(sp[0],u);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" c_from=", vm_out); printarg_c_(c_from);
fputs(" c_to=", vm_out); printarg_c_(c_to);
fputs(" u=", vm_out); printarg_u(u);
}
#endif
sp += 3;
{
#line 645 "./prim"
cmove(c_from,c_to,u);
#line 2587 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
LABEL2(c_move)
NEXT_P1_5;
LABEL3(c_move)
DO_GOTO;
}
LABEL(c_move_up) /* cmove> ( c_from c_to u -- ) S0 -- S0 */
/* Copy the contents of @i{ucount} characters from data space at
@i{c-from} to @i{c-to}. The copy proceeds @code{char}-by-@code{char}
from high address to low address; i.e., for overlapping areas it is
safe if @i{c-to}>=@i{c-from}. */
NAME("cmove>")
{
DEF_CA
Char * c_from;
Char * c_to;
UCell u;
NEXT_P0;
vm_Cell2c_(sp[2],c_from);
vm_Cell2c_(sp[1],c_to);
vm_Cell2u(sp[0],u);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" c_from=", vm_out); printarg_c_(c_from);
fputs(" c_to=", vm_out); printarg_c_(c_to);
fputs(" u=", vm_out); printarg_u(u);
}
#endif
sp += 3;
{
#line 654 "./prim"
cmove_up(c_from,c_to,u);
#line 2628 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
LABEL2(c_move_up)
NEXT_P1_5;
LABEL3(c_move_up)
DO_GOTO;
}
LABEL(fill) /* fill ( c_addr u c -- ) S0 -- S0 */
/* Store @i{c} in @i{u} chars starting at @i{c-addr}. */
NAME("fill")
{
DEF_CA
Char * c_addr;
UCell u;
Char c;
NEXT_P0;
vm_Cell2c_(sp[2],c_addr);
vm_Cell2u(sp[1],u);
vm_Cell2c(sp[0],c);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" c_addr=", vm_out); printarg_c_(c_addr);
fputs(" u=", vm_out); printarg_u(u);
fputs(" c=", vm_out); printarg_c(c);
}
#endif
sp += 3;
{
#line 662 "./prim"
memset(c_addr,c,u);
#line 2666 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
LABEL2(fill)
NEXT_P1_5;
LABEL3(fill)
DO_GOTO;
}
LABEL(compare) /* compare ( c_addr1 u1 c_addr2 u2 -- n ) S0 -- S0 */
/* Compare two strings lexicographically. If they are equal, @i{n} is 0; if
the first string is smaller, @i{n} is -1; if the first string is larger, @i{n}
is 1. Currently this is based on the machine's character
comparison. In the future, this may change to consider the current
locale and its collation order. */
NAME("compare")
{
DEF_CA
Char * c_addr1;
UCell u1;
Char * c_addr2;
UCell u2;
Cell n;
NEXT_P0;
vm_Cell2c_(sp[3],c_addr1);
vm_Cell2u(sp[2],u1);
vm_Cell2c_(sp[1],c_addr2);
vm_Cell2u(sp[0],u2);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" c_addr1=", vm_out); printarg_c_(c_addr1);
fputs(" u1=", vm_out); printarg_u(u1);
fputs(" c_addr2=", vm_out); printarg_c_(c_addr2);
fputs(" u2=", vm_out); printarg_u(u2);
}
#endif
sp += 3;
{
#line 673 "./prim"
/* close ' to keep fontify happy */
n = compare(c_addr1, u1, c_addr2, u2);
#line 2713 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n=", vm_out); printarg_n(n);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n,sp[0]);
LABEL2(compare)
NEXT_P1_5;
LABEL3(compare)
DO_GOTO;
}
LABEL(toupper) /* toupper ( c1 -- c2 ) S0 -- S0 */
/* If @i{c1} is a lower-case character (in the current locale), @i{c2}
is the equivalent upper-case character. All other characters are unchanged. */
NAME("toupper")
{
DEF_CA
Char c1;
Char c2;
NEXT_P0;
vm_Cell2c(sp[0],c1);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" c1=", vm_out); printarg_c(c1);
}
#endif
{
#line 702 "./prim"
c2 = toupper(c1);
#line 2748 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" c2=", vm_out); printarg_c(c2);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_c2Cell(c2,sp[0]);
LABEL2(toupper)
NEXT_P1_5;
LABEL3(toupper)
DO_GOTO;
}
LABEL(capscompare) /* capscompare ( c_addr1 u1 c_addr2 u2 -- n ) S0 -- S0 */
/* Compare two strings lexicographically. If they are equal, @i{n} is 0; if
the first string is smaller, @i{n} is -1; if the first string is larger, @i{n}
is 1. Currently this is based on the machine's character
comparison. In the future, this may change to consider the current
locale and its collation order. */
NAME("capscompare")
{
DEF_CA
Char * c_addr1;
UCell u1;
Char * c_addr2;
UCell u2;
Cell n;
NEXT_P0;
vm_Cell2c_(sp[3],c_addr1);
vm_Cell2u(sp[2],u1);
vm_Cell2c_(sp[1],c_addr2);
vm_Cell2u(sp[0],u2);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" c_addr1=", vm_out); printarg_c_(c_addr1);
fputs(" u1=", vm_out); printarg_u(u1);
fputs(" c_addr2=", vm_out); printarg_c_(c_addr2);
fputs(" u2=", vm_out); printarg_u(u2);
}
#endif
sp += 3;
{
#line 712 "./prim"
/* close ' to keep fontify happy */
n = capscompare(c_addr1, u1, c_addr2, u2);
#line 2797 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n=", vm_out); printarg_n(n);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n,sp[0]);
LABEL2(capscompare)
NEXT_P1_5;
LABEL3(capscompare)
DO_GOTO;
}
LABEL(slash_string) /* /string ( c_addr1 u1 n -- c_addr2 u2 ) S0 -- S0 */
/* Adjust the string specified by @i{c-addr1, u1} to remove @i{n}
characters from the start of the string. */
NAME("/string")
{
DEF_CA
Char * c_addr1;
UCell u1;
Cell n;
Char * c_addr2;
UCell u2;
NEXT_P0;
vm_Cell2c_(sp[2],c_addr1);
vm_Cell2u(sp[1],u1);
vm_Cell2n(sp[0],n);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" c_addr1=", vm_out); printarg_c_(c_addr1);
fputs(" u1=", vm_out); printarg_u(u1);
fputs(" n=", vm_out); printarg_n(n);
}
#endif
sp += 1;
{
#line 718 "./prim"
c_addr2 = c_addr1+n;
u2 = u1-n;
#line 2841 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" c_addr2=", vm_out); printarg_c_(c_addr2);
fputs(" u2=", vm_out); printarg_u(u2);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_c_2Cell(c_addr2,sp[1]);
vm_u2Cell(u2,sp[0]);
LABEL2(slash_string)
NEXT_P1_5;
LABEL3(slash_string)
DO_GOTO;
}
GROUPADD(8)
GROUP( arith, 52)
LABEL(lit) /* lit ( #w -- w ) S0 -- S0 */
/* */
NAME("lit")
{
DEF_CA
Cell w;
NEXT_P0;
vm_Cell2w(IMM_ARG(IPTOS,305397791 ),w);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" w=", vm_out); printarg_w(w);
}
#endif
INC_IP(1);
sp += -1;
{
#line 726 "./prim"
#line 2879 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_w2Cell(w,sp[0]);
LABEL2(lit)
NEXT_P1_5;
LABEL3(lit)
DO_GOTO;
}
LABEL(plus) /* + ( n1 n2 -- n ) S0 -- S0 */
/* */
NAME("+")
{
DEF_CA
Cell n1;
Cell n2;
Cell n;
NEXT_P0;
vm_Cell2n(sp[1],n1);
vm_Cell2n(sp[0],n2);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" n1=", vm_out); printarg_n(n1);
fputs(" n2=", vm_out); printarg_n(n2);
}
#endif
sp += 1;
{
#line 730 "./prim"
n = n1+n2;
#line 2916 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n=", vm_out); printarg_n(n);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n,sp[0]);
LABEL2(plus)
NEXT_P1_5;
LABEL3(plus)
DO_GOTO;
}
LABEL(lit_plus) /* lit+ ( n1 #n2 -- n ) S0 -- S0 */
/* */
NAME("lit+")
{
DEF_CA
Cell n1;
Cell n2;
Cell n;
NEXT_P0;
vm_Cell2n(sp[0],n1);
vm_Cell2n(IMM_ARG(IPTOS,305397792 ),n2);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" n1=", vm_out); printarg_n(n1);
fputs(" n2=", vm_out); printarg_n(n2);
}
#endif
INC_IP(1);
{
#line 735 "./prim"
#ifdef DEBUG
fprintf(stderr, "lit+ %08x\n", n2);
#endif
n=n1+n2;
#line 2957 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n=", vm_out); printarg_n(n);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n,sp[0]);
LABEL2(lit_plus)
NEXT_P1_5;
LABEL3(lit_plus)
DO_GOTO;
}
LABEL(under_plus) /* under+ ( n1 n2 n3 -- n n2 ) S0 -- S0 */
/* add @i{n3} to @i{n1} (giving @i{n}) */
NAME("under+")
{
DEF_CA
Cell n1;
Cell n2;
Cell n3;
Cell n;
NEXT_P0;
vm_Cell2n(sp[2],n1);
vm_Cell2n(sp[1],n2);
vm_Cell2n(sp[0],n3);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" n1=", vm_out); printarg_n(n1);
fputs(" n2=", vm_out); printarg_n(n2);
fputs(" n3=", vm_out); printarg_n(n3);
}
#endif
sp += 1;
{
#line 743 "./prim"
n = n1+n3;
#line 2998 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n=", vm_out); printarg_n(n);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n,sp[1]);
LABEL2(under_plus)
NEXT_P1_5;
LABEL3(under_plus)
DO_GOTO;
}
LABEL(minus) /* - ( n1 n2 -- n ) S0 -- S0 */
/* */
NAME("-")
{
DEF_CA
Cell n1;
Cell n2;
Cell n;
NEXT_P0;
vm_Cell2n(sp[1],n1);
vm_Cell2n(sp[0],n2);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" n1=", vm_out); printarg_n(n1);
fputs(" n2=", vm_out); printarg_n(n2);
}
#endif
sp += 1;
{
#line 748 "./prim"
n = n1-n2;
#line 3036 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n=", vm_out); printarg_n(n);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n,sp[0]);
LABEL2(minus)
NEXT_P1_5;
LABEL3(minus)
DO_GOTO;
}
LABEL(negate) /* negate ( n1 -- n2 ) S0 -- S0 */
/* */
NAME("negate")
{
DEF_CA
Cell n1;
Cell n2;
NEXT_P0;
vm_Cell2n(sp[0],n1);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" n1=", vm_out); printarg_n(n1);
}
#endif
{
#line 753 "./prim"
/* use minus as alias */
n2 = -n1;
#line 3071 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n2=", vm_out); printarg_n(n2);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n2,sp[0]);
LABEL2(negate)
NEXT_P1_5;
LABEL3(negate)
DO_GOTO;
}
LABEL(one_plus) /* 1+ ( n1 -- n2 ) S0 -- S0 */
/* */
NAME("1+")
{
DEF_CA
Cell n1;
Cell n2;
NEXT_P0;
vm_Cell2n(sp[0],n1);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" n1=", vm_out); printarg_n(n1);
}
#endif
{
#line 759 "./prim"
n2 = n1+1;
#line 3105 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n2=", vm_out); printarg_n(n2);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n2,sp[0]);
LABEL2(one_plus)
NEXT_P1_5;
LABEL3(one_plus)
DO_GOTO;
}
LABEL(one_minus) /* 1- ( n1 -- n2 ) S0 -- S0 */
/* */
NAME("1-")
{
DEF_CA
Cell n1;
Cell n2;
NEXT_P0;
vm_Cell2n(sp[0],n1);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" n1=", vm_out); printarg_n(n1);
}
#endif
{
#line 764 "./prim"
n2 = n1-1;
#line 3139 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n2=", vm_out); printarg_n(n2);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n2,sp[0]);
LABEL2(one_minus)
NEXT_P1_5;
LABEL3(one_minus)
DO_GOTO;
}
LABEL(max) /* max ( n1 n2 -- n ) S0 -- S0 */
/* */
NAME("max")
{
DEF_CA
Cell n1;
Cell n2;
Cell n;
NEXT_P0;
vm_Cell2n(sp[1],n1);
vm_Cell2n(sp[0],n2);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" n1=", vm_out); printarg_n(n1);
fputs(" n2=", vm_out); printarg_n(n2);
}
#endif
sp += 1;
{
#line 769 "./prim"
if (n1<n2)
n = n2;
else
n = n1;
#line 3180 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n=", vm_out); printarg_n(n);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n,sp[0]);
LABEL2(max)
NEXT_P1_5;
LABEL3(max)
DO_GOTO;
}
LABEL(min) /* min ( n1 n2 -- n ) S0 -- S0 */
/* */
NAME("min")
{
DEF_CA
Cell n1;
Cell n2;
Cell n;
NEXT_P0;
vm_Cell2n(sp[1],n1);
vm_Cell2n(sp[0],n2);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" n1=", vm_out); printarg_n(n1);
fputs(" n2=", vm_out); printarg_n(n2);
}
#endif
sp += 1;
{
#line 777 "./prim"
if (n1<n2)
n = n1;
else
n = n2;
#line 3221 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n=", vm_out); printarg_n(n);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n,sp[0]);
LABEL2(min)
NEXT_P1_5;
LABEL3(min)
DO_GOTO;
}
LABEL(abs) /* abs ( n -- u ) S0 -- S0 */
/* */
NAME("abs")
{
DEF_CA
Cell n;
UCell u;
NEXT_P0;
vm_Cell2n(sp[0],n);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" n=", vm_out); printarg_n(n);
}
#endif
{
#line 785 "./prim"
if (n<0)
u = -n;
else
u = n;
#line 3258 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" u=", vm_out); printarg_u(u);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_u2Cell(u,sp[0]);
LABEL2(abs)
NEXT_P1_5;
LABEL3(abs)
DO_GOTO;
}
LABEL(star) /* * ( n1 n2 -- n ) S0 -- S0 */
/* */
NAME("*")
{
DEF_CA
Cell n1;
Cell n2;
Cell n;
NEXT_P0;
vm_Cell2n(sp[1],n1);
vm_Cell2n(sp[0],n2);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" n1=", vm_out); printarg_n(n1);
fputs(" n2=", vm_out); printarg_n(n2);
}
#endif
sp += 1;
{
#line 793 "./prim"
n = n1*n2;
#line 3296 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n=", vm_out); printarg_n(n);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n,sp[0]);
LABEL2(star)
NEXT_P1_5;
LABEL3(star)
DO_GOTO;
}
LABEL(slash) /* / ( n1 n2 -- n ) S0 -- S0 */
/* */
NAME("/")
{
DEF_CA
Cell n1;
Cell n2;
Cell n;
NEXT_P0;
vm_Cell2n(sp[1],n1);
vm_Cell2n(sp[0],n2);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" n1=", vm_out); printarg_n(n1);
fputs(" n2=", vm_out); printarg_n(n2);
}
#endif
sp += 1;
{
#line 798 "./prim"
n = n1/n2;
if (CHECK_DIVISION_SW && n2 == 0)
throw(BALL_DIVZERO);
if (CHECK_DIVISION_SW && n2 == -1 && n1 == CELL_MIN)
throw(BALL_RESULTRANGE);
if (FLOORED_DIV && ((n1^n2) < 0) && (n1%n2 != 0))
n--;
#line 3340 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n=", vm_out); printarg_n(n);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n,sp[0]);
LABEL2(slash)
NEXT_P1_5;
LABEL3(slash)
DO_GOTO;
}
LABEL(mod) /* mod ( n1 n2 -- n ) S0 -- S0 */
/* */
NAME("mod")
{
DEF_CA
Cell n1;
Cell n2;
Cell n;
NEXT_P0;
vm_Cell2n(sp[1],n1);
vm_Cell2n(sp[0],n2);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" n1=", vm_out); printarg_n(n1);
fputs(" n2=", vm_out); printarg_n(n2);
}
#endif
sp += 1;
{
#line 809 "./prim"
n = n1%n2;
if (CHECK_DIVISION_SW && n2 == 0)
throw(BALL_DIVZERO);
if (CHECK_DIVISION_SW && n2 == -1 && n1 == CELL_MIN)
throw(BALL_RESULTRANGE);
if(FLOORED_DIV && ((n1^n2) < 0) && n!=0) n += n2;
#line 3383 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n=", vm_out); printarg_n(n);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n,sp[0]);
LABEL2(mod)
NEXT_P1_5;
LABEL3(mod)
DO_GOTO;
}
LABEL(slash_mod) /* /mod ( n1 n2 -- n3 n4 ) S0 -- S0 */
/* */
NAME("/mod")
{
DEF_CA
Cell n1;
Cell n2;
Cell n3;
Cell n4;
NEXT_P0;
vm_Cell2n(sp[1],n1);
vm_Cell2n(sp[0],n2);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" n1=", vm_out); printarg_n(n1);
fputs(" n2=", vm_out); printarg_n(n2);
}
#endif
{
#line 819 "./prim"
n4 = n1/n2;
n3 = n1%n2; /* !! is this correct? look into C standard! */
if (CHECK_DIVISION_SW && n2 == 0)
throw(BALL_DIVZERO);
if (CHECK_DIVISION_SW && n2 == -1 && n1 == CELL_MIN)
throw(BALL_RESULTRANGE);
if (FLOORED_DIV && ((n1^n2) < 0) && n3!=0) {
n4--;
n3+=n2;
}
#line 3430 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n3=", vm_out); printarg_n(n3);
fputs(" n4=", vm_out); printarg_n(n4);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n3,sp[1]);
vm_n2Cell(n4,sp[0]);
LABEL2(slash_mod)
NEXT_P1_5;
LABEL3(slash_mod)
DO_GOTO;
}
LABEL(star_slash_mod) /* x/mod ( n1 n2 n3 -- n4 n5 ) S0 -- S0 */
/* n1*n2=n3*n5+n4, with the intermediate result (n1*n2) being double. */
NAME("*/mod")
{
DEF_CA
Cell n1;
Cell n2;
Cell n3;
Cell n4;
Cell n5;
NEXT_P0;
vm_Cell2n(sp[2],n1);
vm_Cell2n(sp[1],n2);
vm_Cell2n(sp[0],n3);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" n1=", vm_out); printarg_n(n1);
fputs(" n2=", vm_out); printarg_n(n2);
fputs(" n3=", vm_out); printarg_n(n3);
}
#endif
sp += 1;
{
#line 834 "./prim"
#ifdef BUGGY_LL_MUL
DCell d = mmul(n1,n2);
#else
DCell d = (DCell)n1 * (DCell)n2;
#endif
#ifdef ASM_SM_SLASH_REM
ASM_SM_SLASH_REM(DLO(d), DHI(d), n3, n4, n5);
if (FLOORED_DIV && ((DHI(d)^n3)<0) && n4!=0) {
if (CHECK_DIVISION && n5 == CELL_MIN)
throw(BALL_RESULTRANGE);
n5--;
n4+=n3;
}
#else
DCell r = FLOORED_DIV ? fmdiv(d,n3) : smdiv(d,n3);
n4=DHI(r);
n5=DLO(r);
#endif
#line 3491 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n4=", vm_out); printarg_n(n4);
fputs(" n5=", vm_out); printarg_n(n5);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n4,sp[1]);
vm_n2Cell(n5,sp[0]);
LABEL2(star_slash_mod)
NEXT_P1_5;
LABEL3(star_slash_mod)
DO_GOTO;
}
LABEL(star_slash) /* x/ ( n1 n2 n3 -- n4 ) S0 -- S0 */
/* n4=(n1*n2)/n3, with the intermediate result being double. */
NAME("*/")
{
DEF_CA
Cell n1;
Cell n2;
Cell n3;
Cell n4;
NEXT_P0;
vm_Cell2n(sp[2],n1);
vm_Cell2n(sp[1],n2);
vm_Cell2n(sp[0],n3);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" n1=", vm_out); printarg_n(n1);
fputs(" n2=", vm_out); printarg_n(n2);
fputs(" n3=", vm_out); printarg_n(n3);
}
#endif
sp += 2;
{
#line 857 "./prim"
#ifdef BUGGY_LL_MUL
DCell d = mmul(n1,n2);
#else
DCell d = (DCell)n1 * (DCell)n2;
#endif
#ifdef ASM_SM_SLASH_REM
Cell remainder;
ASM_SM_SLASH_REM(DLO(d), DHI(d), n3, remainder, n4);
if (FLOORED_DIV && ((DHI(d)^n3)<0) && remainder!=0) {
if (CHECK_DIVISION && n4 == CELL_MIN)
throw(BALL_RESULTRANGE);
n4--;
}
#else
DCell r = FLOORED_DIV ? fmdiv(d,n3) : smdiv(d,n3);
n4=DLO(r);
#endif
#line 3550 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n4=", vm_out); printarg_n(n4);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n4,sp[0]);
LABEL2(star_slash)
NEXT_P1_5;
LABEL3(star_slash)
DO_GOTO;
}
LABEL(two_star) /* 2* ( n1 -- n2 ) S0 -- S0 */
/* Shift left by 1; also works on unsigned numbers */
NAME("2*")
{
DEF_CA
Cell n1;
Cell n2;
NEXT_P0;
vm_Cell2n(sp[0],n1);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" n1=", vm_out); printarg_n(n1);
}
#endif
{
#line 879 "./prim"
n2 = 2*n1;
#line 3584 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n2=", vm_out); printarg_n(n2);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n2,sp[0]);
LABEL2(two_star)
NEXT_P1_5;
LABEL3(two_star)
DO_GOTO;
}
LABEL(two_slash) /* 2/ ( n1 -- n2 ) S0 -- S0 */
/* Arithmetic shift right by 1. For signed numbers this is a floored
division by 2 (note that @code{/} not necessarily floors). */
NAME("2/")
{
DEF_CA
Cell n1;
Cell n2;
NEXT_P0;
vm_Cell2n(sp[0],n1);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" n1=", vm_out); printarg_n(n1);
}
#endif
{
#line 886 "./prim"
n2 = n1>>1;
#line 3619 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n2=", vm_out); printarg_n(n2);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n2,sp[0]);
LABEL2(two_slash)
NEXT_P1_5;
LABEL3(two_slash)
DO_GOTO;
}
LABEL(f_m_slash_mod) /* fm/mod ( d1 n1 -- n2 n3 ) S0 -- S0 */
/* Floored division: @i{d1} = @i{n3}*@i{n1}+@i{n2}, @i{n1}>@i{n2}>=0 or 0>=@i{n2}>@i{n1}. */
NAME("fm/mod")
{
DEF_CA
DCell d1;
Cell n1;
Cell n2;
Cell n3;
NEXT_P0;
vm_twoCell2d(sp[2], sp[1], d1)
vm_Cell2n(sp[0],n1);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" d1=", vm_out); printarg_d(d1);
fputs(" n1=", vm_out); printarg_n(n1);
}
#endif
sp += 1;
{
#line 896 "./prim"
#ifdef ASM_SM_SLASH_REM
ASM_SM_SLASH_REM(DLO(d1), DHI(d1), n1, n2, n3);
if (((DHI(d1)^n1)<0) && n2!=0) {
if (CHECK_DIVISION && n3 == CELL_MIN)
throw(BALL_RESULTRANGE);
n3--;
n2+=n1;
}
#else /* !defined(ASM_SM_SLASH_REM) */
DCell r = fmdiv(d1,n1);
n2=DHI(r);
n3=DLO(r);
#endif /* !defined(ASM_SM_SLASH_REM) */
#line 3670 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n2=", vm_out); printarg_n(n2);
fputs(" n3=", vm_out); printarg_n(n3);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n2,sp[1]);
vm_n2Cell(n3,sp[0]);
LABEL2(f_m_slash_mod)
NEXT_P1_5;
LABEL3(f_m_slash_mod)
DO_GOTO;
}
LABEL(s_m_slash_rem) /* sm/rem ( d1 n1 -- n2 n3 ) S0 -- S0 */
/* Symmetric division: @i{d1} = @i{n3}*@i{n1}+@i{n2}, sign(@i{n2})=sign(@i{d1}) or 0. */
NAME("sm/rem")
{
DEF_CA
DCell d1;
Cell n1;
Cell n2;
Cell n3;
NEXT_P0;
vm_twoCell2d(sp[2], sp[1], d1)
vm_Cell2n(sp[0],n1);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" d1=", vm_out); printarg_d(d1);
fputs(" n1=", vm_out); printarg_n(n1);
}
#endif
sp += 1;
{
#line 917 "./prim"
#ifdef ASM_SM_SLASH_REM
ASM_SM_SLASH_REM(DLO(d1), DHI(d1), n1, n2, n3);
#else /* !defined(ASM_SM_SLASH_REM) */
DCell r = smdiv(d1,n1);
n2=DHI(r);
n3=DLO(r);
#endif /* !defined(ASM_SM_SLASH_REM) */
#line 3717 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" n2=", vm_out); printarg_n(n2);
fputs(" n3=", vm_out); printarg_n(n3);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_n2Cell(n2,sp[1]);
vm_n2Cell(n3,sp[0]);
LABEL2(s_m_slash_rem)
NEXT_P1_5;
LABEL3(s_m_slash_rem)
DO_GOTO;
}
LABEL(m_star) /* m* ( n1 n2 -- d ) S0 -- S0 */
/* */
NAME("m*")
{
DEF_CA
Cell n1;
Cell n2;
DCell d;
NEXT_P0;
vm_Cell2n(sp[1],n1);
vm_Cell2n(sp[0],n2);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" n1=", vm_out); printarg_n(n1);
fputs(" n2=", vm_out); printarg_n(n2);
}
#endif
{
#line 931 "./prim"
#ifdef BUGGY_LL_MUL
d = mmul(n1,n2);
#else
d = (DCell)n1 * (DCell)n2;
#endif
#line 3760 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" d=", vm_out); printarg_d(d);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_d2twoCell(d, sp[1], sp[0])
LABEL2(m_star)
NEXT_P1_5;
LABEL3(m_star)
DO_GOTO;
}
LABEL(u_m_star) /* um* ( u1 u2 -- ud ) S0 -- S0 */
/* */
NAME("um*")
{
DEF_CA
UCell u1;
UCell u2;
UDCell ud;
NEXT_P0;
vm_Cell2u(sp[1],u1);
vm_Cell2u(sp[0],u2);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" u1=", vm_out); printarg_u(u1);
fputs(" u2=", vm_out); printarg_u(u2);
}
#endif
{
#line 942 "./prim"
/* use u* as alias */
#ifdef BUGGY_LL_MUL
ud = ummul(u1,u2);
#else
ud = (UDCell)u1 * (UDCell)u2;
#endif
#line 3802 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" ud=", vm_out); printarg_ud(ud);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_ud2twoCell(ud, sp[1], sp[0])
LABEL2(u_m_star)
NEXT_P1_5;
LABEL3(u_m_star)
DO_GOTO;
}
LABEL(u_m_slash_mod) /* um/mod ( ud u1 -- u2 u3 ) S0 -- S0 */
/* ud=u3*u1+u2, u1>u2>=0 */
NAME("um/mod")
{
DEF_CA
UDCell ud;
UCell u1;
UCell u2;
UCell u3;
NEXT_P0;
vm_twoCell2ud(sp[2], sp[1], ud)
vm_Cell2u(sp[0],u1);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" ud=", vm_out); printarg_ud(ud);
fputs(" u1=", vm_out); printarg_u(u1);
}
#endif
sp += 1;
{
#line 959 "./prim"
#ifdef ASM_UM_SLASH_MOD
ASM_UM_SLASH_MOD(DLO(ud), DHI(ud), u1, u2, u3);
#else /* !defined(ASM_UM_SLASH_MOD) */
UDCell r = umdiv(ud,u1);
u2=DHI(r);
u3=DLO(r);
#endif /* !defined(ASM_UM_SLASH_MOD) */
#line 3847 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" u2=", vm_out); printarg_u(u2);
fputs(" u3=", vm_out); printarg_u(u3);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_u2Cell(u2,sp[1]);
vm_u2Cell(u3,sp[0]);
LABEL2(u_m_slash_mod)
NEXT_P1_5;
LABEL3(u_m_slash_mod)
DO_GOTO;
}
LABEL(m_plus) /* m+ ( d1 n -- d2 ) S0 -- S0 */
/* */
NAME("m+")
{
DEF_CA
DCell d1;
Cell n;
DCell d2;
NEXT_P0;
vm_twoCell2d(sp[2], sp[1], d1)
vm_Cell2n(sp[0],n);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" d1=", vm_out); printarg_d(d1);
fputs(" n=", vm_out); printarg_n(n);
}
#endif
sp += 1;
{
#line 977 "./prim"
#ifdef BUGGY_LL_ADD
DLO_IS(d2, DLO(d1)+n);
DHI_IS(d2, DHI(d1) - (n<0) + (DLO(d2)<DLO(d1)));
#else
d2 = d1+n;
#endif
#line 3892 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" d2=", vm_out); printarg_d(d2);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_d2twoCell(d2, sp[1], sp[0])
LABEL2(m_plus)
NEXT_P1_5;
LABEL3(m_plus)
DO_GOTO;
}
LABEL(d_plus) /* d+ ( d1 d2 -- d ) S0 -- S0 */
/* */
NAME("d+")
{
DEF_CA
DCell d1;
DCell d2;
DCell d;
NEXT_P0;
vm_twoCell2d(sp[3], sp[2], d1)
vm_twoCell2d(sp[1], sp[0], d2)
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" d1=", vm_out); printarg_d(d1);
fputs(" d2=", vm_out); printarg_d(d2);
}
#endif
sp += 2;
{
#line 987 "./prim"
#ifdef BUGGY_LL_ADD
DLO_IS(d, DLO(d1) + DLO(d2));
DHI_IS(d, DHI(d1) + DHI(d2) + (d.lo<DLO(d1)));
#else
d = d1+d2;
#endif
#line 3935 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" d=", vm_out); printarg_d(d);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_d2twoCell(d, sp[1], sp[0])
LABEL2(d_plus)
NEXT_P1_5;
LABEL3(d_plus)
DO_GOTO;
}
LABEL(d_minus) /* d- ( d1 d2 -- d ) S0 -- S0 */
/* */
NAME("d-")
{
DEF_CA
DCell d1;
DCell d2;
DCell d;
NEXT_P0;
vm_twoCell2d(sp[3], sp[2], d1)
vm_twoCell2d(sp[1], sp[0], d2)
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" d1=", vm_out); printarg_d(d1);
fputs(" d2=", vm_out); printarg_d(d2);
}
#endif
sp += 2;
{
#line 997 "./prim"
#ifdef BUGGY_LL_ADD
DLO_IS(d, DLO(d1) - DLO(d2));
DHI_IS(d, DHI(d1)-DHI(d2)-(DLO(d1)<DLO(d2)));
#else
d = d1-d2;
#endif
#line 3978 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" d=", vm_out); printarg_d(d);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_d2twoCell(d, sp[1], sp[0])
LABEL2(d_minus)
NEXT_P1_5;
LABEL3(d_minus)
DO_GOTO;
}
LABEL(d_negate) /* dnegate ( d1 -- d2 ) S0 -- S0 */
/* */
NAME("dnegate")
{
DEF_CA
DCell d1;
DCell d2;
NEXT_P0;
vm_twoCell2d(sp[1], sp[0], d1)
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" d1=", vm_out); printarg_d(d1);
}
#endif
{
#line 1007 "./prim"
/* use dminus as alias */
#ifdef BUGGY_LL_ADD
d2 = dnegate(d1);
#else
d2 = -d1;
#endif
#line 4017 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" d2=", vm_out); printarg_d(d2);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_d2twoCell(d2, sp[1], sp[0])
LABEL2(d_negate)
NEXT_P1_5;
LABEL3(d_negate)
DO_GOTO;
}
LABEL(d_two_star) /* d2* ( d1 -- d2 ) S0 -- S0 */
/* Shift left by 1; also works on unsigned numbers */
NAME("d2*")
{
DEF_CA
DCell d1;
DCell d2;
NEXT_P0;
vm_twoCell2d(sp[1], sp[0], d1)
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" d1=", vm_out); printarg_d(d1);
}
#endif
{
#line 1018 "./prim"
d2 = DLSHIFT(d1,1);
#line 4051 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" d2=", vm_out); printarg_d(d2);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_d2twoCell(d2, sp[1], sp[0])
LABEL2(d_two_star)
NEXT_P1_5;
LABEL3(d_two_star)
DO_GOTO;
}
LABEL(d_two_slash) /* d2/ ( d1 -- d2 ) S0 -- S0 */
/* Arithmetic shift right by 1. For signed numbers this is a floored
division by 2. */
NAME("d2/")
{
DEF_CA
DCell d1;
DCell d2;
NEXT_P0;
vm_twoCell2d(sp[1], sp[0], d1)
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" d1=", vm_out); printarg_d(d1);
}
#endif
{
#line 1025 "./prim"
#ifdef BUGGY_LL_SHIFT
DHI_IS(d2, DHI(d1)>>1);
DLO_IS(d2, (DLO(d1)>>1) | (DHI(d1)<<(CELL_BITS-1)));
#else
d2 = d1>>1;
#endif
#line 4091 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" d2=", vm_out); printarg_d(d2);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_d2twoCell(d2, sp[1], sp[0])
LABEL2(d_two_slash)
NEXT_P1_5;
LABEL3(d_two_slash)
DO_GOTO;
}
LABEL(and) /* and ( w1 w2 -- w ) S0 -- S0 */
/* */
NAME("and")
{
DEF_CA
Cell w1;
Cell w2;
Cell w;
NEXT_P0;
vm_Cell2w(sp[1],w1);
vm_Cell2w(sp[0],w2);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" w1=", vm_out); printarg_w(w1);
fputs(" w2=", vm_out); printarg_w(w2);
}
#endif
sp += 1;
{
#line 1036 "./prim"
w = w1&w2;
#line 4129 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" w=", vm_out); printarg_w(w);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_w2Cell(w,sp[0]);
LABEL2(and)
NEXT_P1_5;
LABEL3(and)
DO_GOTO;
}
LABEL(or) /* or ( w1 w2 -- w ) S0 -- S0 */
/* */
NAME("or")
{
DEF_CA
Cell w1;
Cell w2;
Cell w;
NEXT_P0;
vm_Cell2w(sp[1],w1);
vm_Cell2w(sp[0],w2);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" w1=", vm_out); printarg_w(w1);
fputs(" w2=", vm_out); printarg_w(w2);
}
#endif
sp += 1;
{
#line 1039 "./prim"
w = w1|w2;
#line 4167 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" w=", vm_out); printarg_w(w);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_w2Cell(w,sp[0]);
LABEL2(or)
NEXT_P1_5;
LABEL3(or)
DO_GOTO;
}
LABEL(x_or) /* xor ( w1 w2 -- w ) S0 -- S0 */
/* */
NAME("xor")
{
DEF_CA
Cell w1;
Cell w2;
Cell w;
NEXT_P0;
vm_Cell2w(sp[1],w1);
vm_Cell2w(sp[0],w2);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" w1=", vm_out); printarg_w(w1);
fputs(" w2=", vm_out); printarg_w(w2);
}
#endif
sp += 1;
{
#line 1044 "./prim"
w = w1^w2;
#line 4205 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" w=", vm_out); printarg_w(w);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_w2Cell(w,sp[0]);
LABEL2(x_or)
NEXT_P1_5;
LABEL3(x_or)
DO_GOTO;
}
LABEL(invert) /* invert ( w1 -- w2 ) S0 -- S0 */
/* */
NAME("invert")
{
DEF_CA
Cell w1;
Cell w2;
NEXT_P0;
vm_Cell2w(sp[0],w1);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" w1=", vm_out); printarg_w(w1);
}
#endif
{
#line 1047 "./prim"
w2 = ~w1;
#line 4239 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" w2=", vm_out); printarg_w(w2);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_w2Cell(w2,sp[0]);
LABEL2(invert)
NEXT_P1_5;
LABEL3(invert)
DO_GOTO;
}
LABEL(r_shift) /* rshift ( u1 n -- u2 ) S0 -- S0 */
/* Logical shift right by @i{n} bits. */
NAME("rshift")
{
DEF_CA
UCell u1;
Cell n;
UCell u2;
NEXT_P0;
vm_Cell2u(sp[1],u1);
vm_Cell2n(sp[0],n);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" u1=", vm_out); printarg_u(u1);
fputs(" n=", vm_out); printarg_n(n);
}
#endif
sp += 1;
{
#line 1053 "./prim"
#ifdef BROKEN_SHIFT
u2 = rshift(u1, n);
#else
u2 = u1 >> n;
#endif
#line 4281 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" u2=", vm_out); printarg_u(u2);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_u2Cell(u2,sp[0]);
LABEL2(r_shift)
NEXT_P1_5;
LABEL3(r_shift)
DO_GOTO;
}
LABEL(l_shift) /* lshift ( u1 n -- u2 ) S0 -- S0 */
/* */
NAME("lshift")
{
DEF_CA
UCell u1;
Cell n;
UCell u2;
NEXT_P0;
vm_Cell2u(sp[1],u1);
vm_Cell2n(sp[0],n);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" u1=", vm_out); printarg_u(u1);
fputs(" n=", vm_out); printarg_n(n);
}
#endif
sp += 1;
{
#line 1062 "./prim"
#ifdef BROKEN_SHIFT
u2 = lshift(u1, n);
#else
u2 = u1 << n;
#endif
#line 4323 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" u2=", vm_out); printarg_u(u2);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_u2Cell(u2,sp[0]);
LABEL2(l_shift)
NEXT_P1_5;
LABEL3(l_shift)
DO_GOTO;
}
GROUPADD(36)
GROUP( compare, 88)
LABEL(zero_equals) /* 0= ( n -- f ) S0 -- S0 */
/* */
NAME("0=")
{
DEF_CA
Cell n;
Bool f;
NEXT_P0;
vm_Cell2n(sp[0],n);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" n=", vm_out); printarg_n(n);
}
#endif
{
#line 1123 "./prim"
f = FLAG(n==0);
#line 1122
#line 4360 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" f=", vm_out); printarg_f(f);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_f2Cell(f,sp[0]);
LABEL2(zero_equals)
NEXT_P1_5;
LABEL3(zero_equals)
DO_GOTO;
}
LABEL(zero_not_equals) /* 0<> ( n -- f ) S0 -- S0 */
/* */
NAME("0<>")
{
DEF_CA
Cell n;
Bool f;
NEXT_P0;
vm_Cell2n(sp[0],n);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" n=", vm_out); printarg_n(n);
}
#endif
{
#line 1123 "./prim"
f = FLAG(n!=0);
#line 1122
#line 4395 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" f=", vm_out); printarg_f(f);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_f2Cell(f,sp[0]);
LABEL2(zero_not_equals)
NEXT_P1_5;
LABEL3(zero_not_equals)
DO_GOTO;
}
LABEL(zero_less_than) /* 0< ( n -- f ) S0 -- S0 */
/* */
NAME("0<")
{
DEF_CA
Cell n;
Bool f;
NEXT_P0;
vm_Cell2n(sp[0],n);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" n=", vm_out); printarg_n(n);
}
#endif
{
#line 1123 "./prim"
f = FLAG(n<0);
#line 1122
#line 4430 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" f=", vm_out); printarg_f(f);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_f2Cell(f,sp[0]);
LABEL2(zero_less_than)
NEXT_P1_5;
LABEL3(zero_less_than)
DO_GOTO;
}
LABEL(zero_greater_than) /* 0> ( n -- f ) S0 -- S0 */
/* */
NAME("0>")
{
DEF_CA
Cell n;
Bool f;
NEXT_P0;
vm_Cell2n(sp[0],n);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" n=", vm_out); printarg_n(n);
}
#endif
{
#line 1123 "./prim"
f = FLAG(n>0);
#line 1122
#line 4465 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" f=", vm_out); printarg_f(f);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_f2Cell(f,sp[0]);
LABEL2(zero_greater_than)
NEXT_P1_5;
LABEL3(zero_greater_than)
DO_GOTO;
}
LABEL(zero_less_or_equal) /* 0<= ( n -- f ) S0 -- S0 */
/* */
NAME("0<=")
{
DEF_CA
Cell n;
Bool f;
NEXT_P0;
vm_Cell2n(sp[0],n);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" n=", vm_out); printarg_n(n);
}
#endif
{
#line 1123 "./prim"
f = FLAG(n<=0);
#line 1122
#line 4500 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" f=", vm_out); printarg_f(f);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_f2Cell(f,sp[0]);
LABEL2(zero_less_or_equal)
NEXT_P1_5;
LABEL3(zero_less_or_equal)
DO_GOTO;
}
LABEL(zero_greater_or_equal) /* 0>= ( n -- f ) S0 -- S0 */
/* */
NAME("0>=")
{
DEF_CA
Cell n;
Bool f;
NEXT_P0;
vm_Cell2n(sp[0],n);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" n=", vm_out); printarg_n(n);
}
#endif
{
#line 1123 "./prim"
f = FLAG(n>=0);
#line 1122
#line 4535 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" f=", vm_out); printarg_f(f);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_f2Cell(f,sp[0]);
LABEL2(zero_greater_or_equal)
NEXT_P1_5;
LABEL3(zero_greater_or_equal)
DO_GOTO;
}
LABEL(equals) /* = ( n1 n2 -- f ) S0 -- S0 */
/* */
NAME("=")
{
DEF_CA
Cell n1;
Cell n2;
Bool f;
NEXT_P0;
vm_Cell2n(sp[1],n1);
vm_Cell2n(sp[0],n2);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" n1=", vm_out); printarg_n(n1);
fputs(" n2=", vm_out); printarg_n(n2);
}
#endif
sp += 1;
{
#line 1124 "./prim"
f = FLAG(n1==n2);
#line 1123
#line 4574 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" f=", vm_out); printarg_f(f);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_f2Cell(f,sp[0]);
LABEL2(equals)
NEXT_P1_5;
LABEL3(equals)
DO_GOTO;
}
LABEL(not_equals) /* <> ( n1 n2 -- f ) S0 -- S0 */
/* */
NAME("<>")
{
DEF_CA
Cell n1;
Cell n2;
Bool f;
NEXT_P0;
vm_Cell2n(sp[1],n1);
vm_Cell2n(sp[0],n2);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" n1=", vm_out); printarg_n(n1);
fputs(" n2=", vm_out); printarg_n(n2);
}
#endif
sp += 1;
{
#line 1124 "./prim"
f = FLAG(n1!=n2);
#line 1123
#line 4613 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" f=", vm_out); printarg_f(f);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_f2Cell(f,sp[0]);
LABEL2(not_equals)
NEXT_P1_5;
LABEL3(not_equals)
DO_GOTO;
}
LABEL(less_than) /* < ( n1 n2 -- f ) S0 -- S0 */
/* */
NAME("<")
{
DEF_CA
Cell n1;
Cell n2;
Bool f;
NEXT_P0;
vm_Cell2n(sp[1],n1);
vm_Cell2n(sp[0],n2);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" n1=", vm_out); printarg_n(n1);
fputs(" n2=", vm_out); printarg_n(n2);
}
#endif
sp += 1;
{
#line 1124 "./prim"
f = FLAG(n1<n2);
#line 1123
#line 4652 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" f=", vm_out); printarg_f(f);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_f2Cell(f,sp[0]);
LABEL2(less_than)
NEXT_P1_5;
LABEL3(less_than)
DO_GOTO;
}
LABEL(greater_than) /* > ( n1 n2 -- f ) S0 -- S0 */
/* */
NAME(">")
{
DEF_CA
Cell n1;
Cell n2;
Bool f;
NEXT_P0;
vm_Cell2n(sp[1],n1);
vm_Cell2n(sp[0],n2);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" n1=", vm_out); printarg_n(n1);
fputs(" n2=", vm_out); printarg_n(n2);
}
#endif
sp += 1;
{
#line 1124 "./prim"
f = FLAG(n1>n2);
#line 1123
#line 4691 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" f=", vm_out); printarg_f(f);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_f2Cell(f,sp[0]);
LABEL2(greater_than)
NEXT_P1_5;
LABEL3(greater_than)
DO_GOTO;
}
LABEL(less_or_equal) /* <= ( n1 n2 -- f ) S0 -- S0 */
/* */
NAME("<=")
{
DEF_CA
Cell n1;
Cell n2;
Bool f;
NEXT_P0;
vm_Cell2n(sp[1],n1);
vm_Cell2n(sp[0],n2);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" n1=", vm_out); printarg_n(n1);
fputs(" n2=", vm_out); printarg_n(n2);
}
#endif
sp += 1;
{
#line 1124 "./prim"
f = FLAG(n1<=n2);
#line 1123
#line 4730 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" f=", vm_out); printarg_f(f);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_f2Cell(f,sp[0]);
LABEL2(less_or_equal)
NEXT_P1_5;
LABEL3(less_or_equal)
DO_GOTO;
}
LABEL(greater_or_equal) /* >= ( n1 n2 -- f ) S0 -- S0 */
/* */
NAME(">=")
{
DEF_CA
Cell n1;
Cell n2;
Bool f;
NEXT_P0;
vm_Cell2n(sp[1],n1);
vm_Cell2n(sp[0],n2);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" n1=", vm_out); printarg_n(n1);
fputs(" n2=", vm_out); printarg_n(n2);
}
#endif
sp += 1;
{
#line 1124 "./prim"
f = FLAG(n1>=n2);
#line 1123
#line 4769 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" f=", vm_out); printarg_f(f);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_f2Cell(f,sp[0]);
LABEL2(greater_or_equal)
NEXT_P1_5;
LABEL3(greater_or_equal)
DO_GOTO;
}
LABEL(u_equals) /* u= ( u1 u2 -- f ) S0 -- S0 */
/* */
NAME("u=")
{
DEF_CA
UCell u1;
UCell u2;
Bool f;
NEXT_P0;
vm_Cell2u(sp[1],u1);
vm_Cell2u(sp[0],u2);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" u1=", vm_out); printarg_u(u1);
fputs(" u2=", vm_out); printarg_u(u2);
}
#endif
sp += 1;
{
#line 1125 "./prim"
f = FLAG(u1==u2);
#line 1124
#line 4808 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" f=", vm_out); printarg_f(f);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_f2Cell(f,sp[0]);
LABEL2(u_equals)
NEXT_P1_5;
LABEL3(u_equals)
DO_GOTO;
}
LABEL(u_not_equals) /* u<> ( u1 u2 -- f ) S0 -- S0 */
/* */
NAME("u<>")
{
DEF_CA
UCell u1;
UCell u2;
Bool f;
NEXT_P0;
vm_Cell2u(sp[1],u1);
vm_Cell2u(sp[0],u2);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" u1=", vm_out); printarg_u(u1);
fputs(" u2=", vm_out); printarg_u(u2);
}
#endif
sp += 1;
{
#line 1125 "./prim"
f = FLAG(u1!=u2);
#line 1124
#line 4847 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" f=", vm_out); printarg_f(f);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_f2Cell(f,sp[0]);
LABEL2(u_not_equals)
NEXT_P1_5;
LABEL3(u_not_equals)
DO_GOTO;
}
LABEL(u_less_than) /* u< ( u1 u2 -- f ) S0 -- S0 */
/* */
NAME("u<")
{
DEF_CA
UCell u1;
UCell u2;
Bool f;
NEXT_P0;
vm_Cell2u(sp[1],u1);
vm_Cell2u(sp[0],u2);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" u1=", vm_out); printarg_u(u1);
fputs(" u2=", vm_out); printarg_u(u2);
}
#endif
sp += 1;
{
#line 1125 "./prim"
f = FLAG(u1<u2);
#line 1124
#line 4886 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" f=", vm_out); printarg_f(f);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_f2Cell(f,sp[0]);
LABEL2(u_less_than)
NEXT_P1_5;
LABEL3(u_less_than)
DO_GOTO;
}
LABEL(u_greater_than) /* u> ( u1 u2 -- f ) S0 -- S0 */
/* */
NAME("u>")
{
DEF_CA
UCell u1;
UCell u2;
Bool f;
NEXT_P0;
vm_Cell2u(sp[1],u1);
vm_Cell2u(sp[0],u2);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" u1=", vm_out); printarg_u(u1);
fputs(" u2=", vm_out); printarg_u(u2);
}
#endif
sp += 1;
{
#line 1125 "./prim"
f = FLAG(u1>u2);
#line 1124
#line 4925 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" f=", vm_out); printarg_f(f);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_f2Cell(f,sp[0]);
LABEL2(u_greater_than)
NEXT_P1_5;
LABEL3(u_greater_than)
DO_GOTO;
}
LABEL(u_less_or_equal) /* u<= ( u1 u2 -- f ) S0 -- S0 */
/* */
NAME("u<=")
{
DEF_CA
UCell u1;
UCell u2;
Bool f;
NEXT_P0;
vm_Cell2u(sp[1],u1);
vm_Cell2u(sp[0],u2);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" u1=", vm_out); printarg_u(u1);
fputs(" u2=", vm_out); printarg_u(u2);
}
#endif
sp += 1;
{
#line 1125 "./prim"
f = FLAG(u1<=u2);
#line 1124
#line 4964 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" f=", vm_out); printarg_f(f);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_f2Cell(f,sp[0]);
LABEL2(u_less_or_equal)
NEXT_P1_5;
LABEL3(u_less_or_equal)
DO_GOTO;
}
LABEL(u_greater_or_equal) /* u>= ( u1 u2 -- f ) S0 -- S0 */
/* */
NAME("u>=")
{
DEF_CA
UCell u1;
UCell u2;
Bool f;
NEXT_P0;
vm_Cell2u(sp[1],u1);
vm_Cell2u(sp[0],u2);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" u1=", vm_out); printarg_u(u1);
fputs(" u2=", vm_out); printarg_u(u2);
}
#endif
sp += 1;
{
#line 1125 "./prim"
f = FLAG(u1>=u2);
#line 1124
#line 5003 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" f=", vm_out); printarg_f(f);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_f2Cell(f,sp[0]);
LABEL2(u_greater_or_equal)
NEXT_P1_5;
LABEL3(u_greater_or_equal)
DO_GOTO;
}
GROUPADD(18)
#ifdef HAS_DCOMPS
LABEL(d_equals) /* d= ( d1 d2 -- f ) S0 -- S0 */
/* */
NAME("d=")
{
DEF_CA
DCell d1;
DCell d2;
Bool f;
NEXT_P0;
vm_twoCell2d(sp[3], sp[2], d1)
vm_twoCell2d(sp[1], sp[0], d2)
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" d1=", vm_out); printarg_d(d1);
fputs(" d2=", vm_out); printarg_d(d2);
}
#endif
sp += 3;
{
#line 1175 "./prim"
#ifdef BUGGY_LL_CMP
#line 1174
f = FLAG(d1.lo==d2.lo && d1.hi==d2.hi);
#line 1174
#else
#line 1174
f = FLAG(d1==d2);
#line 1174
#endif
#line 1174
#line 5052 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" f=", vm_out); printarg_f(f);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_f2Cell(f,sp[0]);
LABEL2(d_equals)
NEXT_P1_5;
LABEL3(d_equals)
DO_GOTO;
}
LABEL(d_not_equals) /* d<> ( d1 d2 -- f ) S0 -- S0 */
/* */
NAME("d<>")
{
DEF_CA
DCell d1;
DCell d2;
Bool f;
NEXT_P0;
vm_twoCell2d(sp[3], sp[2], d1)
vm_twoCell2d(sp[1], sp[0], d2)
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" d1=", vm_out); printarg_d(d1);
fputs(" d2=", vm_out); printarg_d(d2);
}
#endif
sp += 3;
{
#line 1175 "./prim"
#ifdef BUGGY_LL_CMP
#line 1174
f = FLAG(d1.lo!=d2.lo || d1.hi!=d2.hi);
#line 1174
#else
#line 1174
f = FLAG(d1!=d2);
#line 1174
#endif
#line 1174
#line 5099 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" f=", vm_out); printarg_f(f);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_f2Cell(f,sp[0]);
LABEL2(d_not_equals)
NEXT_P1_5;
LABEL3(d_not_equals)
DO_GOTO;
}
LABEL(d_less_than) /* d< ( d1 d2 -- f ) S0 -- S0 */
/* */
NAME("d<")
{
DEF_CA
DCell d1;
DCell d2;
Bool f;
NEXT_P0;
vm_twoCell2d(sp[3], sp[2], d1)
vm_twoCell2d(sp[1], sp[0], d2)
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" d1=", vm_out); printarg_d(d1);
fputs(" d2=", vm_out); printarg_d(d2);
}
#endif
sp += 3;
{
#line 1175 "./prim"
#ifdef BUGGY_LL_CMP
#line 1174
f = FLAG(d1.hi==d2.hi ? d1.lo<d2.lo : d1.hi<d2.hi);
#line 1174
#else
#line 1174
f = FLAG(d1<d2);
#line 1174
#endif
#line 1174
#line 5146 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" f=", vm_out); printarg_f(f);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_f2Cell(f,sp[0]);
LABEL2(d_less_than)
NEXT_P1_5;
LABEL3(d_less_than)
DO_GOTO;
}
LABEL(d_greater_than) /* d> ( d1 d2 -- f ) S0 -- S0 */
/* */
NAME("d>")
{
DEF_CA
DCell d1;
DCell d2;
Bool f;
NEXT_P0;
vm_twoCell2d(sp[3], sp[2], d1)
vm_twoCell2d(sp[1], sp[0], d2)
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" d1=", vm_out); printarg_d(d1);
fputs(" d2=", vm_out); printarg_d(d2);
}
#endif
sp += 3;
{
#line 1175 "./prim"
#ifdef BUGGY_LL_CMP
#line 1174
f = FLAG(d1.hi==d2.hi ? d1.lo>d2.lo : d1.hi>d2.hi);
#line 1174
#else
#line 1174
f = FLAG(d1>d2);
#line 1174
#endif
#line 1174
#line 5193 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" f=", vm_out); printarg_f(f);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_f2Cell(f,sp[0]);
LABEL2(d_greater_than)
NEXT_P1_5;
LABEL3(d_greater_than)
DO_GOTO;
}
LABEL(d_less_or_equal) /* d<= ( d1 d2 -- f ) S0 -- S0 */
/* */
NAME("d<=")
{
DEF_CA
DCell d1;
DCell d2;
Bool f;
NEXT_P0;
vm_twoCell2d(sp[3], sp[2], d1)
vm_twoCell2d(sp[1], sp[0], d2)
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" d1=", vm_out); printarg_d(d1);
fputs(" d2=", vm_out); printarg_d(d2);
}
#endif
sp += 3;
{
#line 1175 "./prim"
#ifdef BUGGY_LL_CMP
#line 1174
f = FLAG(d1.hi==d2.hi ? d1.lo<=d2.lo : d1.hi<=d2.hi);
#line 1174
#else
#line 1174
f = FLAG(d1<=d2);
#line 1174
#endif
#line 1174
#line 5240 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" f=", vm_out); printarg_f(f);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_f2Cell(f,sp[0]);
LABEL2(d_less_or_equal)
NEXT_P1_5;
LABEL3(d_less_or_equal)
DO_GOTO;
}
LABEL(d_greater_or_equal) /* d>= ( d1 d2 -- f ) S0 -- S0 */
/* */
NAME("d>=")
{
DEF_CA
DCell d1;
DCell d2;
Bool f;
NEXT_P0;
vm_twoCell2d(sp[3], sp[2], d1)
vm_twoCell2d(sp[1], sp[0], d2)
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" d1=", vm_out); printarg_d(d1);
fputs(" d2=", vm_out); printarg_d(d2);
}
#endif
sp += 3;
{
#line 1175 "./prim"
#ifdef BUGGY_LL_CMP
#line 1174
f = FLAG(d1.hi==d2.hi ? d1.lo>=d2.lo : d1.hi>=d2.hi);
#line 1174
#else
#line 1174
f = FLAG(d1>=d2);
#line 1174
#endif
#line 1174
#line 5287 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" f=", vm_out); printarg_f(f);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_f2Cell(f,sp[0]);
LABEL2(d_greater_or_equal)
NEXT_P1_5;
LABEL3(d_greater_or_equal)
DO_GOTO;
}
LABEL(d_zero_equals) /* d0= ( d -- f ) S0 -- S0 */
/* */
NAME("d0=")
{
DEF_CA
DCell d;
Bool f;
NEXT_P0;
vm_twoCell2d(sp[1], sp[0], d)
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" d=", vm_out); printarg_d(d);
}
#endif
sp += 1;
{
#line 1176 "./prim"
#ifdef BUGGY_LL_CMP
#line 1175
f = FLAG(d.lo==DZERO.lo && d.hi==DZERO.hi);
#line 1175
#else
#line 1175
f = FLAG(d==DZERO);
#line 1175
#endif
#line 1175
#line 5331 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" f=", vm_out); printarg_f(f);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_f2Cell(f,sp[0]);
LABEL2(d_zero_equals)
NEXT_P1_5;
LABEL3(d_zero_equals)
DO_GOTO;
}
LABEL(d_zero_not_equals) /* d0<> ( d -- f ) S0 -- S0 */
/* */
NAME("d0<>")
{
DEF_CA
DCell d;
Bool f;
NEXT_P0;
vm_twoCell2d(sp[1], sp[0], d)
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" d=", vm_out); printarg_d(d);
}
#endif
sp += 1;
{
#line 1176 "./prim"
#ifdef BUGGY_LL_CMP
#line 1175
f = FLAG(d.lo!=DZERO.lo || d.hi!=DZERO.hi);
#line 1175
#else
#line 1175
f = FLAG(d!=DZERO);
#line 1175
#endif
#line 1175
#line 5375 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" f=", vm_out); printarg_f(f);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_f2Cell(f,sp[0]);
LABEL2(d_zero_not_equals)
NEXT_P1_5;
LABEL3(d_zero_not_equals)
DO_GOTO;
}
LABEL(d_zero_less_than) /* d0< ( d -- f ) S0 -- S0 */
/* */
NAME("d0<")
{
DEF_CA
DCell d;
Bool f;
NEXT_P0;
vm_twoCell2d(sp[1], sp[0], d)
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" d=", vm_out); printarg_d(d);
}
#endif
sp += 1;
{
#line 1176 "./prim"
#ifdef BUGGY_LL_CMP
#line 1175
f = FLAG(d.hi==DZERO.hi ? d.lo<DZERO.lo : d.hi<DZERO.hi);
#line 1175
#else
#line 1175
f = FLAG(d<DZERO);
#line 1175
#endif
#line 1175
#line 5419 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" f=", vm_out); printarg_f(f);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_f2Cell(f,sp[0]);
LABEL2(d_zero_less_than)
NEXT_P1_5;
LABEL3(d_zero_less_than)
DO_GOTO;
}
LABEL(d_zero_greater_than) /* d0> ( d -- f ) S0 -- S0 */
/* */
NAME("d0>")
{
DEF_CA
DCell d;
Bool f;
NEXT_P0;
vm_twoCell2d(sp[1], sp[0], d)
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" d=", vm_out); printarg_d(d);
}
#endif
sp += 1;
{
#line 1176 "./prim"
#ifdef BUGGY_LL_CMP
#line 1175
f = FLAG(d.hi==DZERO.hi ? d.lo>DZERO.lo : d.hi>DZERO.hi);
#line 1175
#else
#line 1175
f = FLAG(d>DZERO);
#line 1175
#endif
#line 1175
#line 5463 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" f=", vm_out); printarg_f(f);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_f2Cell(f,sp[0]);
LABEL2(d_zero_greater_than)
NEXT_P1_5;
LABEL3(d_zero_greater_than)
DO_GOTO;
}
LABEL(d_zero_less_or_equal) /* d0<= ( d -- f ) S0 -- S0 */
/* */
NAME("d0<=")
{
DEF_CA
DCell d;
Bool f;
NEXT_P0;
vm_twoCell2d(sp[1], sp[0], d)
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" d=", vm_out); printarg_d(d);
}
#endif
sp += 1;
{
#line 1176 "./prim"
#ifdef BUGGY_LL_CMP
#line 1175
f = FLAG(d.hi==DZERO.hi ? d.lo<=DZERO.lo : d.hi<=DZERO.hi);
#line 1175
#else
#line 1175
f = FLAG(d<=DZERO);
#line 1175
#endif
#line 1175
#line 5507 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" f=", vm_out); printarg_f(f);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_f2Cell(f,sp[0]);
LABEL2(d_zero_less_or_equal)
NEXT_P1_5;
LABEL3(d_zero_less_or_equal)
DO_GOTO;
}
LABEL(d_zero_greater_or_equal) /* d0>= ( d -- f ) S0 -- S0 */
/* */
NAME("d0>=")
{
DEF_CA
DCell d;
Bool f;
NEXT_P0;
vm_twoCell2d(sp[1], sp[0], d)
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" d=", vm_out); printarg_d(d);
}
#endif
sp += 1;
{
#line 1176 "./prim"
#ifdef BUGGY_LL_CMP
#line 1175
f = FLAG(d.hi==DZERO.hi ? d.lo>=DZERO.lo : d.hi>=DZERO.hi);
#line 1175
#else
#line 1175
f = FLAG(d>=DZERO);
#line 1175
#endif
#line 1175
#line 5551 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" f=", vm_out); printarg_f(f);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_f2Cell(f,sp[0]);
LABEL2(d_zero_greater_or_equal)
NEXT_P1_5;
LABEL3(d_zero_greater_or_equal)
DO_GOTO;
}
LABEL(d_u_equals) /* du= ( ud1 ud2 -- f ) S0 -- S0 */
/* */
NAME("du=")
{
DEF_CA
UDCell ud1;
UDCell ud2;
Bool f;
NEXT_P0;
vm_twoCell2ud(sp[3], sp[2], ud1)
vm_twoCell2ud(sp[1], sp[0], ud2)
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" ud1=", vm_out); printarg_ud(ud1);
fputs(" ud2=", vm_out); printarg_ud(ud2);
}
#endif
sp += 3;
{
#line 1177 "./prim"
#ifdef BUGGY_LL_CMP
#line 1176
f = FLAG(ud1.lo==ud2.lo && ud1.hi==ud2.hi);
#line 1176
#else
#line 1176
f = FLAG(ud1==ud2);
#line 1176
#endif
#line 1176
#line 5598 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" f=", vm_out); printarg_f(f);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_f2Cell(f,sp[0]);
LABEL2(d_u_equals)
NEXT_P1_5;
LABEL3(d_u_equals)
DO_GOTO;
}
LABEL(d_u_not_equals) /* du<> ( ud1 ud2 -- f ) S0 -- S0 */
/* */
NAME("du<>")
{
DEF_CA
UDCell ud1;
UDCell ud2;
Bool f;
NEXT_P0;
vm_twoCell2ud(sp[3], sp[2], ud1)
vm_twoCell2ud(sp[1], sp[0], ud2)
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" ud1=", vm_out); printarg_ud(ud1);
fputs(" ud2=", vm_out); printarg_ud(ud2);
}
#endif
sp += 3;
{
#line 1177 "./prim"
#ifdef BUGGY_LL_CMP
#line 1176
f = FLAG(ud1.lo!=ud2.lo || ud1.hi!=ud2.hi);
#line 1176
#else
#line 1176
f = FLAG(ud1!=ud2);
#line 1176
#endif
#line 1176
#line 5645 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" f=", vm_out); printarg_f(f);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_f2Cell(f,sp[0]);
LABEL2(d_u_not_equals)
NEXT_P1_5;
LABEL3(d_u_not_equals)
DO_GOTO;
}
LABEL(d_u_less_than) /* du< ( ud1 ud2 -- f ) S0 -- S0 */
/* */
NAME("du<")
{
DEF_CA
UDCell ud1;
UDCell ud2;
Bool f;
NEXT_P0;
vm_twoCell2ud(sp[3], sp[2], ud1)
vm_twoCell2ud(sp[1], sp[0], ud2)
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" ud1=", vm_out); printarg_ud(ud1);
fputs(" ud2=", vm_out); printarg_ud(ud2);
}
#endif
sp += 3;
{
#line 1177 "./prim"
#ifdef BUGGY_LL_CMP
#line 1176
f = FLAG(ud1.hi==ud2.hi ? ud1.lo<ud2.lo : ud1.hi<ud2.hi);
#line 1176
#else
#line 1176
f = FLAG(ud1<ud2);
#line 1176
#endif
#line 1176
#line 5692 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" f=", vm_out); printarg_f(f);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_f2Cell(f,sp[0]);
LABEL2(d_u_less_than)
NEXT_P1_5;
LABEL3(d_u_less_than)
DO_GOTO;
}
LABEL(d_u_greater_than) /* du> ( ud1 ud2 -- f ) S0 -- S0 */
/* */
NAME("du>")
{
DEF_CA
UDCell ud1;
UDCell ud2;
Bool f;
NEXT_P0;
vm_twoCell2ud(sp[3], sp[2], ud1)
vm_twoCell2ud(sp[1], sp[0], ud2)
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" ud1=", vm_out); printarg_ud(ud1);
fputs(" ud2=", vm_out); printarg_ud(ud2);
}
#endif
sp += 3;
{
#line 1177 "./prim"
#ifdef BUGGY_LL_CMP
#line 1176
f = FLAG(ud1.hi==ud2.hi ? ud1.lo>ud2.lo : ud1.hi>ud2.hi);
#line 1176
#else
#line 1176
f = FLAG(ud1>ud2);
#line 1176
#endif
#line 1176
#line 5739 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" f=", vm_out); printarg_f(f);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_f2Cell(f,sp[0]);
LABEL2(d_u_greater_than)
NEXT_P1_5;
LABEL3(d_u_greater_than)
DO_GOTO;
}
LABEL(d_u_less_or_equal) /* du<= ( ud1 ud2 -- f ) S0 -- S0 */
/* */
NAME("du<=")
{
DEF_CA
UDCell ud1;
UDCell ud2;
Bool f;
NEXT_P0;
vm_twoCell2ud(sp[3], sp[2], ud1)
vm_twoCell2ud(sp[1], sp[0], ud2)
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" ud1=", vm_out); printarg_ud(ud1);
fputs(" ud2=", vm_out); printarg_ud(ud2);
}
#endif
sp += 3;
{
#line 1177 "./prim"
#ifdef BUGGY_LL_CMP
#line 1176
f = FLAG(ud1.hi==ud2.hi ? ud1.lo<=ud2.lo : ud1.hi<=ud2.hi);
#line 1176
#else
#line 1176
f = FLAG(ud1<=ud2);
#line 1176
#endif
#line 1176
#line 5786 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" f=", vm_out); printarg_f(f);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_f2Cell(f,sp[0]);
LABEL2(d_u_less_or_equal)
NEXT_P1_5;
LABEL3(d_u_less_or_equal)
DO_GOTO;
}
LABEL(d_u_greater_or_equal) /* du>= ( ud1 ud2 -- f ) S0 -- S0 */
/* */
NAME("du>=")
{
DEF_CA
UDCell ud1;
UDCell ud2;
Bool f;
NEXT_P0;
vm_twoCell2ud(sp[3], sp[2], ud1)
vm_twoCell2ud(sp[1], sp[0], ud2)
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" ud1=", vm_out); printarg_ud(ud1);
fputs(" ud2=", vm_out); printarg_ud(ud2);
}
#endif
sp += 3;
{
#line 1177 "./prim"
#ifdef BUGGY_LL_CMP
#line 1176
f = FLAG(ud1.hi==ud2.hi ? ud1.lo>=ud2.lo : ud1.hi>=ud2.hi);
#line 1176
#else
#line 1176
f = FLAG(ud1>=ud2);
#line 1176
#endif
#line 1176
#line 5833 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" f=", vm_out); printarg_f(f);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_f2Cell(f,sp[0]);
LABEL2(d_u_greater_or_equal)
NEXT_P1_5;
LABEL3(d_u_greater_or_equal)
DO_GOTO;
}
GROUPADD(18)
#endif
LABEL(within) /* within ( u1 u2 u3 -- f ) S0 -- S0 */
/* u2=<u1<u3 or: u3=<u2 and u1 is not in [u3,u2). This works for
unsigned and signed numbers (but not a mixture). Another way to think
about this word is to consider the numbers as a circle (wrapping
around from @code{max-u} to 0 for unsigned, and from @code{max-n} to
min-n for signed numbers); now consider the range from u2 towards
increasing numbers up to and excluding u3 (giving an empty range if
u2=u3); if u1 is in this range, @code{within} returns true. */
NAME("within")
{
DEF_CA
UCell u1;
UCell u2;
UCell u3;
Bool f;
NEXT_P0;
vm_Cell2u(sp[2],u1);
vm_Cell2u(sp[1],u2);
vm_Cell2u(sp[0],u3);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" u1=", vm_out); printarg_u(u1);
fputs(" u2=", vm_out); printarg_u(u2);
fputs(" u3=", vm_out); printarg_u(u3);
}
#endif
sp += 2;
{
#line 1189 "./prim"
f = FLAG(u1-u2 < u3-u2);
#line 5882 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" f=", vm_out); printarg_f(f);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_f2Cell(f,sp[0]);
LABEL2(within)
NEXT_P1_5;
LABEL3(within)
DO_GOTO;
}
GROUPADD(1)
GROUP( stack, 125)
LABEL(useraddr) /* useraddr ( #u -- a_addr ) S0 -- S0 */
/* */
NAME("useraddr")
{
DEF_CA
UCell u;
Cell * a_addr;
NEXT_P0;
vm_Cell2u(IMM_ARG(IPTOS,305397793 ),u);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" u=", vm_out); printarg_u(u);
}
#endif
INC_IP(1);
sp += -1;
{
#line 1196 "./prim"
a_addr = (Cell *)(up+u);
#line 5920 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" a_addr=", vm_out); printarg_a_(a_addr);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_a_2Cell(a_addr,sp[0]);
LABEL2(useraddr)
NEXT_P1_5;
LABEL3(useraddr)
DO_GOTO;
}
LABEL(up_store) /* up! ( a_addr -- ) S0 -- S0 */
/* */
NAME("up!")
{
DEF_CA
Cell * a_addr;
NEXT_P0;
vm_Cell2a_(sp[0],a_addr);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" a_addr=", vm_out); printarg_a_(a_addr);
}
#endif
sp += 1;
{
#line 1199 "./prim"
gforth_UP=up=(Address)a_addr;
#line 5954 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
LABEL2(up_store)
NEXT_P1_5;
LABEL3(up_store)
DO_GOTO;
}
LABEL(sp_fetch) /* sp@ ( S:... -- a_addr ) S0 -- S0 */
/* */
NAME("sp@")
{
DEF_CA
Cell * a_addr;
NEXT_P0;
#ifdef VM_DEBUG
if (vm_debug) {
}
#endif
{
#line 1205 "./prim"
a_addr = sp;
#line 5983 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" a_addr=", vm_out); printarg_a_(a_addr);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
sp += -1;
vm_a_2Cell(a_addr,sp[0]);
LABEL2(sp_fetch)
NEXT_P1_5;
LABEL3(sp_fetch)
DO_GOTO;
}
LABEL(sp_store) /* sp! ( a_addr -- S:... ) S0 -- S0 */
/* */
NAME("sp!")
{
DEF_CA
Cell * a_addr;
NEXT_P0;
vm_Cell2a_(sp[0],a_addr);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" a_addr=", vm_out); printarg_a_(a_addr);
}
#endif
sp += 1;
{
#line 1208 "./prim"
sp = a_addr;
#line 6018 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
LABEL2(sp_store)
NEXT_P1_5;
LABEL3(sp_store)
DO_GOTO;
}
LABEL(rp_fetch) /* rp@ ( -- a_addr ) S0 -- S0 */
/* */
NAME("rp@")
{
DEF_CA
Cell * a_addr;
NEXT_P0;
#ifdef VM_DEBUG
if (vm_debug) {
}
#endif
sp += -1;
{
#line 1211 "./prim"
a_addr = rp;
#line 6048 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" a_addr=", vm_out); printarg_a_(a_addr);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_a_2Cell(a_addr,sp[0]);
LABEL2(rp_fetch)
NEXT_P1_5;
LABEL3(rp_fetch)
DO_GOTO;
}
LABEL(rp_store) /* rp! ( a_addr -- ) S0 -- S0 */
/* */
NAME("rp!")
{
DEF_CA
Cell * a_addr;
NEXT_P0;
vm_Cell2a_(sp[0],a_addr);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" a_addr=", vm_out); printarg_a_(a_addr);
}
#endif
sp += 1;
{
#line 1214 "./prim"
rp = a_addr;
#line 6082 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
LABEL2(rp_store)
NEXT_P1_5;
LABEL3(rp_store)
DO_GOTO;
}
GROUPADD(6)
#ifdef HAS_FLOATING
LABEL(fp_fetch) /* fp@ ( f:... -- f_addr ) S0 -- S0 */
/* */
NAME("fp@")
{
DEF_CA
Float * f_addr;
NEXT_P0;
#ifdef VM_DEBUG
if (vm_debug) {
}
#endif
sp += -1;
{
#line 1219 "./prim"
f_addr = fp;
#line 6114 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" f_addr=", vm_out); printarg_f_(f_addr);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_f_2Cell(f_addr,sp[0]);
LABEL2(fp_fetch)
NEXT_P1_5;
LABEL3(fp_fetch)
DO_GOTO;
}
LABEL(fp_store) /* fp! ( f_addr -- f:... ) S0 -- S0 */
/* */
NAME("fp!")
{
DEF_CA
Float * f_addr;
NEXT_P0;
vm_Cell2f_(sp[0],f_addr);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" f_addr=", vm_out); printarg_f_(f_addr);
}
#endif
sp += 1;
{
#line 1222 "./prim"
fp = f_addr;
#line 6148 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
LABEL2(fp_store)
NEXT_P1_5;
LABEL3(fp_store)
DO_GOTO;
}
GROUPADD(2)
#endif
LABEL(to_r) /* >r ( w -- R:w ) S0 -- S0 */
/* */
NAME(">r")
{
DEF_CA
Cell w;
NEXT_P0;
vm_Cell2w(sp[0],w);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" w=", vm_out); printarg_w(w);
}
#endif
sp += 1;
rp += -1;
{
#line 1227 "./prim"
#line 6182 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_w2Cell(w,rp[0]);
LABEL2(to_r)
NEXT_P1_5;
LABEL3(to_r)
DO_GOTO;
}
LABEL(r_from) /* r> ( R:w -- w ) S0 -- S0 */
/* */
NAME("r>")
{
DEF_CA
Cell w;
NEXT_P0;
vm_Cell2w(rp[0],w);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" w=", vm_out); printarg_w(w);
}
#endif
sp += -1;
rp += 1;
{
#line 1232 "./prim"
#line 6215 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_w2Cell(w,sp[0]);
LABEL2(r_from)
NEXT_P1_5;
LABEL3(r_from)
DO_GOTO;
}
LABEL(rdrop) /* rdrop ( R:w -- ) S0 -- S0 */
/* */
NAME("rdrop")
{
DEF_CA
Cell w;
NEXT_P0;
vm_Cell2w(rp[0],w);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" w=", vm_out); printarg_w(w);
}
#endif
rp += 1;
{
#line 1237 "./prim"
#line 6247 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
LABEL2(rdrop)
NEXT_P1_5;
LABEL3(rdrop)
DO_GOTO;
}
LABEL(two_to_r) /* 2>r ( d -- R:d ) S0 -- S0 */
/* */
NAME("2>r")
{
DEF_CA
DCell d;
NEXT_P0;
vm_twoCell2d(sp[1], sp[0], d)
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" d=", vm_out); printarg_d(d);
}
#endif
sp += 2;
rp += -2;
{
#line 1241 "./prim"
#line 6279 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_d2twoCell(d, rp[1], rp[0])
LABEL2(two_to_r)
NEXT_P1_5;
LABEL3(two_to_r)
DO_GOTO;
}
LABEL(two_r_from) /* 2r> ( R:d -- d ) S0 -- S0 */
/* */
NAME("2r>")
{
DEF_CA
DCell d;
NEXT_P0;
vm_twoCell2d(rp[1], rp[0], d)
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" d=", vm_out); printarg_d(d);
}
#endif
sp += -2;
rp += 2;
{
#line 1245 "./prim"
#line 6312 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_d2twoCell(d, sp[1], sp[0])
LABEL2(two_r_from)
NEXT_P1_5;
LABEL3(two_r_from)
DO_GOTO;
}
LABEL(two_r_fetch) /* 2r@ ( R:d -- R:d d ) S0 -- S0 */
/* */
NAME("2r@")
{
DEF_CA
DCell d;
NEXT_P0;
vm_twoCell2d(rp[1], rp[0], d)
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" d=", vm_out); printarg_d(d);
}
#endif
sp += -2;
{
#line 1249 "./prim"
#line 6344 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_d2twoCell(d, rp[1], rp[0])
vm_d2twoCell(d, sp[1], sp[0])
LABEL2(two_r_fetch)
NEXT_P1_5;
LABEL3(two_r_fetch)
DO_GOTO;
}
LABEL(two_r_drop) /* 2rdrop ( R:d -- ) S0 -- S0 */
/* */
NAME("2rdrop")
{
DEF_CA
DCell d;
NEXT_P0;
vm_twoCell2d(rp[1], rp[0], d)
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" d=", vm_out); printarg_d(d);
}
#endif
rp += 2;
{
#line 1253 "./prim"
#line 6377 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
LABEL2(two_r_drop)
NEXT_P1_5;
LABEL3(two_r_drop)
DO_GOTO;
}
LABEL(over) /* over ( w1 w2 -- w1 w2 w1 ) S0 -- S0 */
/* */
NAME("over")
{
DEF_CA
Cell w1;
Cell w2;
NEXT_P0;
vm_Cell2w(sp[1],w1);
vm_Cell2w(sp[0],w2);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" w1=", vm_out); printarg_w(w1);
fputs(" w2=", vm_out); printarg_w(w2);
}
#endif
sp += -1;
{
#line 1257 "./prim"
#line 6411 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_w2Cell(w1,sp[0]);
LABEL2(over)
NEXT_P1_5;
LABEL3(over)
DO_GOTO;
}
LABEL(drop) /* drop ( w -- ) S0 -- S0 */
/* */
NAME("drop")
{
DEF_CA
Cell w;
NEXT_P0;
vm_Cell2w(sp[0],w);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" w=", vm_out); printarg_w(w);
}
#endif
sp += 1;
{
#line 1261 "./prim"
#line 6443 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
LABEL2(drop)
NEXT_P1_5;
LABEL3(drop)
DO_GOTO;
}
LABEL(swap) /* swap ( w1 w2 -- w2 w1 ) S0 -- S0 */
/* */
NAME("swap")
{
DEF_CA
Cell w1;
Cell w2;
NEXT_P0;
vm_Cell2w(sp[1],w1);
vm_Cell2w(sp[0],w2);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" w1=", vm_out); printarg_w(w1);
fputs(" w2=", vm_out); printarg_w(w2);
}
#endif
{
#line 1265 "./prim"
#line 6476 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_w2Cell(w2,sp[1]);
vm_w2Cell(w1,sp[0]);
LABEL2(swap)
NEXT_P1_5;
LABEL3(swap)
DO_GOTO;
}
LABEL(dupe) /* dup ( w -- w w ) S0 -- S0 */
/* */
NAME("dup")
{
DEF_CA
Cell w;
NEXT_P0;
vm_Cell2w(sp[0],w);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" w=", vm_out); printarg_w(w);
}
#endif
sp += -1;
{
#line 1270 "./prim"
#line 6509 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_w2Cell(w,sp[0]);
LABEL2(dupe)
NEXT_P1_5;
LABEL3(dupe)
DO_GOTO;
}
LABEL(rote) /* rot ( w1 w2 w3 -- w2 w3 w1 ) S0 -- S0 */
/* */
NAME("rot")
{
DEF_CA
Cell w1;
Cell w2;
Cell w3;
NEXT_P0;
vm_Cell2w(sp[2],w1);
vm_Cell2w(sp[1],w2);
vm_Cell2w(sp[0],w3);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" w1=", vm_out); printarg_w(w1);
fputs(" w2=", vm_out); printarg_w(w2);
fputs(" w3=", vm_out); printarg_w(w3);
}
#endif
{
#line 1274 "./prim"
#line 6546 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_w2Cell(w2,sp[2]);
vm_w2Cell(w3,sp[1]);
vm_w2Cell(w1,sp[0]);
LABEL2(rote)
NEXT_P1_5;
LABEL3(rote)
DO_GOTO;
}
LABEL(not_rote) /* -rot ( w1 w2 w3 -- w3 w1 w2 ) S0 -- S0 */
/* */
NAME("-rot")
{
DEF_CA
Cell w1;
Cell w2;
Cell w3;
NEXT_P0;
vm_Cell2w(sp[2],w1);
vm_Cell2w(sp[1],w2);
vm_Cell2w(sp[0],w3);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" w1=", vm_out); printarg_w(w1);
fputs(" w2=", vm_out); printarg_w(w2);
fputs(" w3=", vm_out); printarg_w(w3);
}
#endif
{
#line 1283 "./prim"
#line 6585 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_w2Cell(w3,sp[2]);
vm_w2Cell(w1,sp[1]);
vm_w2Cell(w2,sp[0]);
LABEL2(not_rote)
NEXT_P1_5;
LABEL3(not_rote)
DO_GOTO;
}
LABEL(nip) /* nip ( w1 w2 -- w2 ) S0 -- S0 */
/* */
NAME("nip")
{
DEF_CA
Cell w1;
Cell w2;
NEXT_P0;
vm_Cell2w(sp[1],w1);
vm_Cell2w(sp[0],w2);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" w1=", vm_out); printarg_w(w1);
fputs(" w2=", vm_out); printarg_w(w2);
}
#endif
sp += 1;
{
#line 1287 "./prim"
#line 6622 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_w2Cell(w2,sp[0]);
LABEL2(nip)
NEXT_P1_5;
LABEL3(nip)
DO_GOTO;
}
LABEL(tuck) /* tuck ( w1 w2 -- w2 w1 w2 ) S0 -- S0 */
/* */
NAME("tuck")
{
DEF_CA
Cell w1;
Cell w2;
NEXT_P0;
vm_Cell2w(sp[1],w1);
vm_Cell2w(sp[0],w2);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" w1=", vm_out); printarg_w(w1);
fputs(" w2=", vm_out); printarg_w(w2);
}
#endif
sp += -1;
{
#line 1291 "./prim"
#line 6657 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_w2Cell(w2,sp[2]);
vm_w2Cell(w1,sp[1]);
vm_w2Cell(w2,sp[0]);
LABEL2(tuck)
NEXT_P1_5;
LABEL3(tuck)
DO_GOTO;
}
LABEL(question_dupe) /* ?dup ( w -- S:... w ) S0 -- S0 */
/* Actually the stack effect is: @code{( w -- 0 | w w )}. It performs a
@code{dup} if w is nonzero. */
NAME("?dup")
{
DEF_CA
Cell w;
NEXT_P0;
vm_Cell2w(sp[0],w);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" w=", vm_out); printarg_w(w);
}
#endif
sp += 1;
{
#line 1297 "./prim"
if (w!=0) {
*--sp = w;
}
#line 6695 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
sp += -1;
vm_w2Cell(w,sp[0]);
LABEL2(question_dupe)
NEXT_P1_5;
LABEL3(question_dupe)
DO_GOTO;
}
LABEL(pick) /* pick ( S:... u -- S:... w ) S0 -- S0 */
/* Actually the stack effect is @code{ x0 ... xu u -- x0 ... xu x0 }. */
NAME("pick")
{
DEF_CA
UCell u;
Cell w;
NEXT_P0;
vm_Cell2u(sp[0],u);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" u=", vm_out); printarg_u(u);
}
#endif
sp += 1;
{
#line 1305 "./prim"
w = sp[u];
#line 6730 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" w=", vm_out); printarg_w(w);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
sp += -1;
vm_w2Cell(w,sp[0]);
LABEL2(pick)
NEXT_P1_5;
LABEL3(pick)
DO_GOTO;
}
LABEL(two_drop) /* 2drop ( w1 w2 -- ) S0 -- S0 */
/* */
NAME("2drop")
{
DEF_CA
Cell w1;
Cell w2;
NEXT_P0;
vm_Cell2w(sp[1],w1);
vm_Cell2w(sp[0],w2);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" w1=", vm_out); printarg_w(w1);
fputs(" w2=", vm_out); printarg_w(w2);
}
#endif
sp += 2;
{
#line 1310 "./prim"
#line 6767 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
LABEL2(two_drop)
NEXT_P1_5;
LABEL3(two_drop)
DO_GOTO;
}
LABEL(two_dupe) /* 2dup ( w1 w2 -- w1 w2 w1 w2 ) S0 -- S0 */
/* */
NAME("2dup")
{
DEF_CA
Cell w1;
Cell w2;
NEXT_P0;
vm_Cell2w(sp[1],w1);
vm_Cell2w(sp[0],w2);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" w1=", vm_out); printarg_w(w1);
fputs(" w2=", vm_out); printarg_w(w2);
}
#endif
sp += -2;
{
#line 1314 "./prim"
#line 6801 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_w2Cell(w1,sp[1]);
vm_w2Cell(w2,sp[0]);
LABEL2(two_dupe)
NEXT_P1_5;
LABEL3(two_dupe)
DO_GOTO;
}
LABEL(two_over) /* 2over ( w1 w2 w3 w4 -- w1 w2 w3 w4 w1 w2 ) S0 -- S0 */
/* */
NAME("2over")
{
DEF_CA
Cell w1;
Cell w2;
Cell w3;
Cell w4;
NEXT_P0;
vm_Cell2w(sp[3],w1);
vm_Cell2w(sp[2],w2);
vm_Cell2w(sp[1],w3);
vm_Cell2w(sp[0],w4);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" w1=", vm_out); printarg_w(w1);
fputs(" w2=", vm_out); printarg_w(w2);
fputs(" w3=", vm_out); printarg_w(w3);
fputs(" w4=", vm_out); printarg_w(w4);
}
#endif
sp += -2;
{
#line 1318 "./prim"
#line 6843 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_w2Cell(w1,sp[1]);
vm_w2Cell(w2,sp[0]);
LABEL2(two_over)
NEXT_P1_5;
LABEL3(two_over)
DO_GOTO;
}
LABEL(two_swap) /* 2swap ( w1 w2 w3 w4 -- w3 w4 w1 w2 ) S0 -- S0 */
/* */
NAME("2swap")
{
DEF_CA
Cell w1;
Cell w2;
Cell w3;
Cell w4;
NEXT_P0;
vm_Cell2w(sp[3],w1);
vm_Cell2w(sp[2],w2);
vm_Cell2w(sp[1],w3);
vm_Cell2w(sp[0],w4);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" w1=", vm_out); printarg_w(w1);
fputs(" w2=", vm_out); printarg_w(w2);
fputs(" w3=", vm_out); printarg_w(w3);
fputs(" w4=", vm_out); printarg_w(w4);
}
#endif
{
#line 1322 "./prim"
#line 6884 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_w2Cell(w3,sp[3]);
vm_w2Cell(w4,sp[2]);
vm_w2Cell(w1,sp[1]);
vm_w2Cell(w2,sp[0]);
LABEL2(two_swap)
NEXT_P1_5;
LABEL3(two_swap)
DO_GOTO;
}
LABEL(two_rote) /* 2rot ( w1 w2 w3 w4 w5 w6 -- w3 w4 w5 w6 w1 w2 ) S0 -- S0 */
/* */
NAME("2rot")
{
DEF_CA
Cell w1;
Cell w2;
Cell w3;
Cell w4;
Cell w5;
Cell w6;
NEXT_P0;
vm_Cell2w(sp[5],w1);
vm_Cell2w(sp[4],w2);
vm_Cell2w(sp[3],w3);
vm_Cell2w(sp[2],w4);
vm_Cell2w(sp[1],w5);
vm_Cell2w(sp[0],w6);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" w1=", vm_out); printarg_w(w1);
fputs(" w2=", vm_out); printarg_w(w2);
fputs(" w3=", vm_out); printarg_w(w3);
fputs(" w4=", vm_out); printarg_w(w4);
fputs(" w5=", vm_out); printarg_w(w5);
fputs(" w6=", vm_out); printarg_w(w6);
}
#endif
{
#line 1326 "./prim"
#line 6933 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_w2Cell(w3,sp[5]);
vm_w2Cell(w4,sp[4]);
vm_w2Cell(w5,sp[3]);
vm_w2Cell(w6,sp[2]);
vm_w2Cell(w1,sp[1]);
vm_w2Cell(w2,sp[0]);
LABEL2(two_rote)
NEXT_P1_5;
LABEL3(two_rote)
DO_GOTO;
}
LABEL(two_nip) /* 2nip ( w1 w2 w3 w4 -- w3 w4 ) S0 -- S0 */
/* */
NAME("2nip")
{
DEF_CA
Cell w1;
Cell w2;
Cell w3;
Cell w4;
NEXT_P0;
vm_Cell2w(sp[3],w1);
vm_Cell2w(sp[2],w2);
vm_Cell2w(sp[1],w3);
vm_Cell2w(sp[0],w4);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" w1=", vm_out); printarg_w(w1);
fputs(" w2=", vm_out); printarg_w(w2);
fputs(" w3=", vm_out); printarg_w(w3);
fputs(" w4=", vm_out); printarg_w(w4);
}
#endif
sp += 2;
{
#line 1330 "./prim"
#line 6979 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_w2Cell(w3,sp[1]);
vm_w2Cell(w4,sp[0]);
LABEL2(two_nip)
NEXT_P1_5;
LABEL3(two_nip)
DO_GOTO;
}
LABEL(two_tuck) /* 2tuck ( w1 w2 w3 w4 -- w3 w4 w1 w2 w3 w4 ) S0 -- S0 */
/* */
NAME("2tuck")
{
DEF_CA
Cell w1;
Cell w2;
Cell w3;
Cell w4;
NEXT_P0;
vm_Cell2w(sp[3],w1);
vm_Cell2w(sp[2],w2);
vm_Cell2w(sp[1],w3);
vm_Cell2w(sp[0],w4);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" w1=", vm_out); printarg_w(w1);
fputs(" w2=", vm_out); printarg_w(w2);
fputs(" w3=", vm_out); printarg_w(w3);
fputs(" w4=", vm_out); printarg_w(w4);
}
#endif
sp += -2;
{
#line 1334 "./prim"
#line 7021 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_w2Cell(w3,sp[5]);
vm_w2Cell(w4,sp[4]);
vm_w2Cell(w1,sp[3]);
vm_w2Cell(w2,sp[2]);
vm_w2Cell(w3,sp[1]);
vm_w2Cell(w4,sp[0]);
LABEL2(two_tuck)
NEXT_P1_5;
LABEL3(two_tuck)
DO_GOTO;
}
GROUPADD(24)
GROUP( memory, 157)
LABEL(fetch) /* @ ( a_addr -- w ) S0 -- S0 */
/* @i{w} is the cell stored at @i{a_addr}. */
NAME("@")
{
DEF_CA
Cell * a_addr;
Cell w;
NEXT_P0;
vm_Cell2a_(sp[0],a_addr);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" a_addr=", vm_out); printarg_a_(a_addr);
}
#endif
{
#line 1343 "./prim"
w = *a_addr;
#line 7061 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" w=", vm_out); printarg_w(w);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_w2Cell(w,sp[0]);
LABEL2(fetch)
NEXT_P1_5;
LABEL3(fetch)
DO_GOTO;
}
LABEL(lit_fetch) /* lit@ ( #a_addr -- w ) S0 -- S0 */
/* */
NAME("lit@")
{
DEF_CA
Cell * a_addr;
Cell w;
NEXT_P0;
vm_Cell2a_(IMM_ARG(IPTOS,305397794 ),a_addr);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" a_addr=", vm_out); printarg_a_(a_addr);
}
#endif
INC_IP(1);
sp += -1;
{
#line 1348 "./prim"
w = *a_addr;
#line 7097 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" w=", vm_out); printarg_w(w);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_w2Cell(w,sp[0]);
LABEL2(lit_fetch)
NEXT_P1_5;
LABEL3(lit_fetch)
DO_GOTO;
}
LABEL(store) /* ! ( w a_addr -- ) S0 -- S0 */
/* Store @i{w} into the cell at @i{a-addr}. */
NAME("!")
{
DEF_CA
Cell w;
Cell * a_addr;
NEXT_P0;
vm_Cell2w(sp[1],w);
vm_Cell2a_(sp[0],a_addr);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" w=", vm_out); printarg_w(w);
fputs(" a_addr=", vm_out); printarg_a_(a_addr);
}
#endif
sp += 2;
{
#line 1352 "./prim"
*a_addr = w;
#line 7134 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
LABEL2(store)
NEXT_P1_5;
LABEL3(store)
DO_GOTO;
}
LABEL(plus_store) /* +! ( n a_addr -- ) S0 -- S0 */
/* Add @i{n} to the cell at @i{a-addr}. */
NAME("+!")
{
DEF_CA
Cell n;
Cell * a_addr;
NEXT_P0;
vm_Cell2n(sp[1],n);
vm_Cell2a_(sp[0],a_addr);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" n=", vm_out); printarg_n(n);
fputs(" a_addr=", vm_out); printarg_a_(a_addr);
}
#endif
sp += 2;
{
#line 1356 "./prim"
*a_addr += n;
#line 7169 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
#endif
NEXT_P1;
LABEL2(plus_store)
NEXT_P1_5;
LABEL3(plus_store)
DO_GOTO;
}
LABEL(c_fetch) /* c@ ( c_addr -- c ) S0 -- S0 */
/* @i{c} is the char stored at @i{c_addr}. */
NAME("c@")
{
DEF_CA
Char * c_addr;
Char c;
NEXT_P0;
vm_Cell2c_(sp[0],c_addr);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" c_addr=", vm_out); printarg_c_(c_addr);
}
#endif
{
#line 1362 "./prim"
c = *c_addr;
#line 7201 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputs(" c=", vm_out); printarg_c(c);
fputc('\n', vm_out);
}
#endif
NEXT_P1;
vm_c2Cell(c,sp[0]);
LABEL2(c_fetch)
NEXT_P1_5;
LABEL3(c_fetch)
DO_GOTO;
}
LABEL(c_store) /* c! ( c c_addr -- ) S0 -- S0 */
/* Store @i{c} into the char at @i{c-addr}. */
NAME("c!")
{
DEF_CA
Char c;
Char * c_addr;
NEXT_P0;
vm_Cell2c(sp[1],c);
vm_Cell2c_(sp[0],c_addr);
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" c=", vm_out); printarg_c(c);
fputs(" c_addr=", vm_out); printarg_c_(c_addr);
}
#endif
sp += 2;
{
#line 1388 "./prim"
*c_addr = c;
#line 7238 "prim.i"
}
#ifdef VM_DEBUG
if (vm_debug) {
fputs(" -- ", vm_out); fputc('\n', vm_out);
}
|