summaryrefslogtreecommitdiffstats
path: root/generic/tclAssembly.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-03-18 13:54:06 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-03-18 13:54:06 (GMT)
commit176431f58481aeaba56e3463648fd85990236de4 (patch)
treeacd54df49d264cc7ceef526685b300026bcf7ed7 /generic/tclAssembly.c
parentae243c85b7e7b470ea541cce41e76cd2cd7474f6 (diff)
parentaf7fa225c1d0ec592c7af29ead5922f45c1c15fb (diff)
downloadtcl-176431f58481aeaba56e3463648fd85990236de4.zip
tcl-176431f58481aeaba56e3463648fd85990236de4.tar.gz
tcl-176431f58481aeaba56e3463648fd85990236de4.tar.bz2
Merge 8.6
Diffstat (limited to 'generic/tclAssembly.c')
-rw-r--r--generic/tclAssembly.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/generic/tclAssembly.c b/generic/tclAssembly.c
index 4491d9b..9e5e947 100644
--- a/generic/tclAssembly.c
+++ b/generic/tclAssembly.c
@@ -676,7 +676,7 @@ BBEmitOpcode(
/* Compilation environment */
BasicBlock* bbPtr = assemEnvPtr->curr_bb;
/* Current basic block */
- int op = TalInstructionTable[tblIdx].tclInstCode & 0xff;
+ int op = TalInstructionTable[tblIdx].tclInstCode & 0xFF;
/*
* If this is the first instruction in a basic block, record its line
@@ -738,13 +738,13 @@ BBEmitInst1or4(
/* Current basic block */
int op = TalInstructionTable[tblIdx].tclInstCode;
- if (param <= 0xff) {
+ if (param <= 0xFF) {
op >>= 8;
} else {
- op &= 0xff;
+ op &= 0xFF;
}
TclEmitInt1(op, envPtr);
- if (param <= 0xff) {
+ if (param <= 0xFF) {
TclEmitInt1(param, envPtr);
} else {
TclEmitInt4(param, envPtr);
@@ -2233,7 +2233,7 @@ GetIntegerOperand(
* TCL_ERROR (with an appropriate error message) if the parse fails.
*
* Side effects:
- * Stores the list index at '*index'. Values between -1 and 0x7fffffff
+ * Stores the list index at '*index'. Values between -1 and 0x7FFFFFFF
* have their natural meaning; values between -2 and -0x80000000
* represent 'end-2-N'.
*
@@ -2396,7 +2396,7 @@ CheckOneByte(
{
Tcl_Obj* result; /* Error message */
- if (value < 0 || value > 0xff) {
+ if (value < 0 || value > 0xFF) {
result = Tcl_NewStringObj("operand does not fit in one byte", -1);
Tcl_SetObjResult(interp, result);
Tcl_SetErrorCode(interp, "TCL", "ASSEM", "1BYTE", NULL);
@@ -2431,7 +2431,7 @@ CheckSignedOneByte(
{
Tcl_Obj* result; /* Error message */
- if (value > 0x7f || value < -0x80) {
+ if (value > 0x7F || value < -0x80) {
result = Tcl_NewStringObj("operand does not fit in one byte", -1);
Tcl_SetObjResult(interp, result);
Tcl_SetErrorCode(interp, "TCL", "ASSEM", "1BYTE", NULL);
@@ -2845,7 +2845,7 @@ CalculateJumpRelocations(
if (bbPtr->flags & BB_JUMP1) {
offset = jumpTarget->startOffset
- (bbPtr->jumpOffset + motion);
- if (offset < -0x80 || offset > 0x7f) {
+ if (offset < -0x80 || offset > 0x7F) {
opcode = TclGetUInt1AtPtr(envPtr->codeStart
+ bbPtr->jumpOffset);
++opcode;