Handle procedural constant functor pointers.
This commit is contained in:
parent
5d20dd63ec
commit
7a0e73ef3d
|
|
@ -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.111 2001/11/01 03:00:19 steve Exp $"
|
||||
#ident "$Id: compile.cc,v 1.112 2001/11/01 04:42:39 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "arith.h"
|
||||
|
|
@ -1250,9 +1250,27 @@ void compile_code(char*label, char*mnem, comp_operands_t opa)
|
|||
break;
|
||||
}
|
||||
|
||||
functor_ref_lookup(&code->iptr2,
|
||||
opa->argv[idx].symb.text,
|
||||
opa->argv[idx].symb.idx);
|
||||
if (strcmp(opa->argv[idx].symb.text, "C<0>") == 0) {
|
||||
code->iptr2 = ipoint_make(0, 0);
|
||||
free(opa->argv[idx].symb.text);
|
||||
|
||||
} else if (strcmp(opa->argv[idx].symb.text, "C<1>") == 0) {
|
||||
code->iptr2 = ipoint_make(0, 1);
|
||||
free(opa->argv[idx].symb.text);
|
||||
|
||||
} else if (strcmp(opa->argv[idx].symb.text, "C<x>") == 0) {
|
||||
code->iptr2 = ipoint_make(0, 2);
|
||||
free(opa->argv[idx].symb.text);
|
||||
|
||||
} else if (strcmp(opa->argv[idx].symb.text, "C<z>") == 0) {
|
||||
code->iptr2 = ipoint_make(0, 3);
|
||||
free(opa->argv[idx].symb.text);
|
||||
|
||||
} else {
|
||||
functor_ref_lookup(&code->iptr2,
|
||||
opa->argv[idx].symb.text,
|
||||
opa->argv[idx].symb.idx);
|
||||
}
|
||||
break;
|
||||
|
||||
case OA_NUMBER:
|
||||
|
|
@ -1464,6 +1482,9 @@ vvp_ipoint_t debug_lookup_functor(const char*name)
|
|||
|
||||
/*
|
||||
* $Log: compile.cc,v $
|
||||
* Revision 1.112 2001/11/01 04:42:39 steve
|
||||
* Handle procedural constant functor pointers.
|
||||
*
|
||||
* Revision 1.111 2001/11/01 03:00:19 steve
|
||||
* Add force/cassign/release/deassign support. (Stephan Boettcher)
|
||||
*
|
||||
|
|
|
|||
12
vvp/force.cc
12
vvp/force.cc
|
|
@ -18,7 +18,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT)
|
||||
#ident "$Id: force.cc,v 1.1 2001/11/01 03:00:19 steve Exp $"
|
||||
#ident "$Id: force.cc,v 1.2 2001/11/01 04:42:40 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "codes.h"
|
||||
|
|
@ -194,7 +194,12 @@ bool var_functor_s::deassign(vvp_ipoint_t itgt)
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* The %cassign instruction causes a variable functor (the target) the
|
||||
* receive a behavioral continuous assignment from the functor on the
|
||||
* right (the source expression). If the source functor address is 0,
|
||||
* then the port part is a constant value to write into the target.
|
||||
*/
|
||||
bool of_CASSIGN(vthread_t thr, vvp_code_t cp)
|
||||
{
|
||||
vvp_ipoint_t itgt = cp->iptr;
|
||||
|
|
@ -244,6 +249,9 @@ bool of_DEASSIGN(vthread_t thr, vvp_code_t cp)
|
|||
|
||||
/*
|
||||
* $Log: force.cc,v $
|
||||
* Revision 1.2 2001/11/01 04:42:40 steve
|
||||
* Handle procedural constant functor pointers.
|
||||
*
|
||||
* Revision 1.1 2001/11/01 03:00:19 steve
|
||||
* Add force/cassign/release/deassign support. (Stephan Boettcher)
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue