From fd597d265505f0ee5ff87c584e7cb20ff35a3901 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Wed, 11 Aug 2021 07:12:42 +0900 Subject: codedump.c: print local variable name for `ADDI/SUBI/ instructions. Recent peephole optimization made `ADDI/SUBI` destinations possibly local variables. --- src/codedump.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/codedump.c') diff --git a/src/codedump.c b/src/codedump.c index fa06260f7..542e54904 100644 --- a/src/codedump.c +++ b/src/codedump.c @@ -388,13 +388,15 @@ codedump(mrb_state *mrb, const mrb_irep *irep) printf("OP_ADD\tR%d\tR%d\n", a, a+1); break; CASE(OP_ADDI, BB): - printf("OP_ADDI\tR%d\t%d\n", a, b); + printf("OP_ADDI\tR%d\t%d", a, b); + print_lv_a(mrb, irep, a); break; CASE(OP_SUB, B): printf("OP_SUB\tR%d\tR%d\n", a, a+1); break; CASE(OP_SUBI, BB): - printf("OP_SUBI\tR%d\t%d\n", a, b); + printf("OP_SUBI\tR%d\t%d", a, b); + print_lv_a(mrb, irep, a); break; CASE(OP_MUL, B): printf("OP_MUL\tR%d\tR%d\n", a, a+1); -- cgit v1.2.3