diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-08-11 07:12:42 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-08-11 10:48:18 +0900 |
| commit | fd597d265505f0ee5ff87c584e7cb20ff35a3901 (patch) | |
| tree | 34f5d1734baec9865c364ad15f70b539ade13675 /src | |
| parent | b1b9b157f85fe371db706e0c11024681d84e4aba (diff) | |
| download | mruby-fd597d265505f0ee5ff87c584e7cb20ff35a3901.tar.gz mruby-fd597d265505f0ee5ff87c584e7cb20ff35a3901.zip | |
codedump.c: print local variable name for `ADDI/SUBI/ instructions.
Recent peephole optimization made `ADDI/SUBI` destinations possibly
local variables.
Diffstat (limited to 'src')
| -rw-r--r-- | src/codedump.c | 6 |
1 files changed, 4 insertions, 2 deletions
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); |
