summaryrefslogtreecommitdiffstats
path: root/Python/compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/compile.c')
-rw-r--r--Python/compile.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 943168b..c0177fb 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -2887,7 +2887,9 @@ static int compiler_addcompare(struct compiler *c, location loc,
default:
Py_UNREACHABLE();
}
- ADDOP_I(c, loc, COMPARE_OP, cmp);
+ /* cmp goes in top bits of the oparg, while the low bits are used by quickened
+ * versions of this opcode to store the comparison mask. */
+ ADDOP_I(c, loc, COMPARE_OP, cmp << 4);
return SUCCESS;
}