Add the jmp/1 instruction.
This commit is contained in:
parent
7aa9bc9892
commit
2f1d258acb
|
|
@ -19,7 +19,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT)
|
||||
#ident "$Id: codes.h,v 1.9 2001/03/31 01:59:58 steve Exp $"
|
||||
#ident "$Id: codes.h,v 1.10 2001/03/31 17:36:02 steve Exp $"
|
||||
#endif
|
||||
|
||||
|
||||
|
|
@ -45,6 +45,7 @@ extern bool of_INV(vthread_t thr, vvp_code_t code);
|
|||
extern bool of_JMP(vthread_t thr, vvp_code_t code);
|
||||
extern bool of_JMP0(vthread_t thr, vvp_code_t code);
|
||||
extern bool of_JMP0XZ(vthread_t thr, vvp_code_t code);
|
||||
extern bool of_JMP1(vthread_t thr, vvp_code_t code);
|
||||
extern bool of_JOIN(vthread_t thr, vvp_code_t code);
|
||||
extern bool of_LOAD(vthread_t thr, vvp_code_t code);
|
||||
extern bool of_MOV(vthread_t thr, vvp_code_t code);
|
||||
|
|
@ -96,6 +97,9 @@ extern void codespace_dump(FILE*fd);
|
|||
|
||||
/*
|
||||
* $Log: codes.h,v $
|
||||
* Revision 1.10 2001/03/31 17:36:02 steve
|
||||
* Add the jmp/1 instruction.
|
||||
*
|
||||
* Revision 1.9 2001/03/31 01:59:58 steve
|
||||
* Add the ADD instrunction.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT)
|
||||
#ident "$Id: compile.cc,v 1.20 2001/03/31 01:59:59 steve Exp $"
|
||||
#ident "$Id: compile.cc,v 1.21 2001/03/31 17:36:02 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "compile.h"
|
||||
|
|
@ -75,6 +75,7 @@ const static struct opcode_table_s opcode_table[] = {
|
|||
{ "%jmp", of_JMP, 1, {OA_CODE_PTR, OA_NONE, OA_NONE} },
|
||||
{ "%jmp/0", of_JMP0, 2, {OA_CODE_PTR, OA_BIT1, OA_NONE} },
|
||||
{ "%jmp/0xz",of_JMP0XZ, 2, {OA_CODE_PTR, OA_BIT1, OA_NONE} },
|
||||
{ "%jmp/1", of_JMP1, 2, {OA_CODE_PTR, OA_BIT1, OA_NONE} },
|
||||
{ "%join", of_JOIN, 0, {OA_NONE, OA_NONE, OA_NONE} },
|
||||
{ "%load", of_LOAD, 2, {OA_BIT1, OA_FUNC_PTR, OA_NONE} },
|
||||
{ "%mov", of_MOV, 3, {OA_BIT1, OA_BIT2, OA_NUMBER} },
|
||||
|
|
@ -688,6 +689,9 @@ void compile_dump(FILE*fd)
|
|||
|
||||
/*
|
||||
* $Log: compile.cc,v $
|
||||
* Revision 1.21 2001/03/31 17:36:02 steve
|
||||
* Add the jmp/1 instruction.
|
||||
*
|
||||
* Revision 1.20 2001/03/31 01:59:59 steve
|
||||
* Add the ADD instrunction.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT)
|
||||
#ident "$Id: vthread.cc,v 1.15 2001/03/31 01:59:59 steve Exp $"
|
||||
#ident "$Id: vthread.cc,v 1.16 2001/03/31 17:36:02 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "vthread.h"
|
||||
|
|
@ -278,6 +278,13 @@ bool of_JMP0XZ(vthread_t thr, vvp_code_t cp)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool of_JMP1(vthread_t thr, vvp_code_t cp)
|
||||
{
|
||||
if (thr_get_bit(thr, cp->bit_idx1) == 1)
|
||||
thr->pc = cp->cptr;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool of_JOIN(vthread_t thr, vvp_code_t cp)
|
||||
{
|
||||
assert(thr->child);
|
||||
|
|
@ -355,6 +362,9 @@ bool of_WAIT(vthread_t thr, vvp_code_t cp)
|
|||
|
||||
/*
|
||||
* $Log: vthread.cc,v $
|
||||
* Revision 1.16 2001/03/31 17:36:02 steve
|
||||
* Add the jmp/1 instruction.
|
||||
*
|
||||
* Revision 1.15 2001/03/31 01:59:59 steve
|
||||
* Add the ADD instrunction.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue