aboutsummaryrefslogtreecommitdiff
path: root/py/showbc.c
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2015-01-07 00:24:34 +0200
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2015-01-07 00:29:15 +0200
commitd8bfd77ad5df1417094f125efa9b97a8d35c03cb (patch)
tree79b193bc586284151c42b531861a1ad7e2278134 /py/showbc.c
parentb27c9876eafc01befb159852e59fb09691e59dec (diff)
showbc: Show conditional jump destination as unsigned value.
This is consistent with how BC_JUMP was handled before. We never show jumps destinations relative to jump instrucion itself, only relative to beginning of function. Another useful way to show them as absolute (real memory address), and this change makes result expected and consistent with how BC_JUMP is shown.
Diffstat (limited to 'py/showbc.c')
-rw-r--r--py/showbc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/py/showbc.c b/py/showbc.c
index e2151c5a5..67c740fbc 100644
--- a/py/showbc.c
+++ b/py/showbc.c
@@ -296,22 +296,22 @@ const byte *mp_bytecode_print_str(const byte *ip) {
case MP_BC_POP_JUMP_IF_TRUE:
DECODE_SLABEL;
- printf("POP_JUMP_IF_TRUE " INT_FMT, ip + unum - mp_showbc_code_start);
+ printf("POP_JUMP_IF_TRUE " UINT_FMT, ip + unum - mp_showbc_code_start);
break;
case MP_BC_POP_JUMP_IF_FALSE:
DECODE_SLABEL;
- printf("POP_JUMP_IF_FALSE " INT_FMT, ip + unum - mp_showbc_code_start);
+ printf("POP_JUMP_IF_FALSE " UINT_FMT, ip + unum - mp_showbc_code_start);
break;
case MP_BC_JUMP_IF_TRUE_OR_POP:
DECODE_SLABEL;
- printf("JUMP_IF_TRUE_OR_POP " INT_FMT, ip + unum - mp_showbc_code_start);
+ printf("JUMP_IF_TRUE_OR_POP " UINT_FMT, ip + unum - mp_showbc_code_start);
break;
case MP_BC_JUMP_IF_FALSE_OR_POP:
DECODE_SLABEL;
- printf("JUMP_IF_FALSE_OR_POP " INT_FMT, ip + unum - mp_showbc_code_start);
+ printf("JUMP_IF_FALSE_OR_POP " UINT_FMT, ip + unum - mp_showbc_code_start);
break;
case MP_BC_SETUP_WITH: