summaryrefslogtreecommitdiffstats
path: root/generic/tclAssembly.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2017-03-17 13:14:14 (GMT)
committerdgp <dgp@users.sourceforge.net>2017-03-17 13:14:14 (GMT)
commit6e3f60cdad4f1736dd52cf66a9ad94abc3664472 (patch)
treefbeab2daa748495cacdee97cf19bec914a8e228b /generic/tclAssembly.c
parent535dcf373182e96a209816ac847fcbc907866adc (diff)
parent5dbf2681d7206b079a706e9db96e4cf3f43edb25 (diff)
downloadtcl-6e3f60cdad4f1736dd52cf66a9ad94abc3664472.zip
tcl-6e3f60cdad4f1736dd52cf66a9ad94abc3664472.tar.gz
tcl-6e3f60cdad4f1736dd52cf66a9ad94abc3664472.tar.bz2
merge trunk
Diffstat (limited to 'generic/tclAssembly.c')
-rw-r--r--generic/tclAssembly.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/generic/tclAssembly.c b/generic/tclAssembly.c
index f58f871..e184f3e 100644
--- a/generic/tclAssembly.c
+++ b/generic/tclAssembly.c
@@ -138,6 +138,8 @@ typedef enum TalInstType {
* ranges */
ASSEM_BOOL, /* One Boolean operand */
ASSEM_BOOL_LVT4, /* One Boolean, one 4-byte LVT ref. */
+ ASSEM_CLOCK_READ, /* 1-byte unsigned-integer case number, in the
+ * range 0-3 */
ASSEM_CONCAT1, /* 1-byte unsigned-integer operand count, must
* be strictly positive, consumes N, produces
* 1 */
@@ -351,6 +353,7 @@ static const TalInstDesc TalInstructionTable[] = {
{"bitnot", ASSEM_1BYTE, INST_BITNOT, 1, 1},
{"bitor", ASSEM_1BYTE, INST_BITOR, 2, 1},
{"bitxor", ASSEM_1BYTE, INST_BITXOR, 2, 1},
+ {"clockRead", ASSEM_CLOCK_READ, INST_CLOCK_READ, 0, 1},
{"concat", ASSEM_CONCAT1, INST_STR_CONCAT1, INT_MIN,1},
{"concatStk", ASSEM_LIST, INST_CONCAT_STK, INT_MIN,1},
{"coroName", ASSEM_1BYTE, INST_COROUTINE_NAME, 0, 1},
@@ -1362,6 +1365,23 @@ AssembleOneLine(
TclEmitInt4(localVar, envPtr);
break;
+ case ASSEM_CLOCK_READ:
+ if (parsePtr->numWords != 2) {
+ Tcl_WrongNumArgs(interp, 1, &instNameObj, "imm8");
+ goto cleanup;
+ }
+ if (GetIntegerOperand(assemEnvPtr, &tokenPtr, &opnd) != TCL_OK) {
+ goto cleanup;
+ }
+ if (opnd < 0 || opnd > 3) {
+ Tcl_SetObjResult(interp,
+ Tcl_NewStringObj("operand must be [0..3]", -1));
+ Tcl_SetErrorCode(interp, "TCL", "ASSEM", "OPERAND<0,>3", NULL);
+ goto cleanup;
+ }
+ BBEmitInstInt1(assemEnvPtr, tblIdx, opnd, opnd);
+ break;
+
case ASSEM_CONCAT1:
if (parsePtr->numWords != 2) {
Tcl_WrongNumArgs(interp, 1, &instNameObj, "imm8");