diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-11-04 14:01:04 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-11-04 14:01:04 +0900 |
| commit | d13df1536d5513be64732aef41827d5d0329ee58 (patch) | |
| tree | 8c4bbf7fd1d18a5429129d9babbee28438d9227d /src/codedump.c | |
| parent | f8156ae17511e7255b5984075a025533d3771cd0 (diff) | |
| download | mruby-d13df1536d5513be64732aef41827d5d0329ee58.tar.gz mruby-d13df1536d5513be64732aef41827d5d0329ee58.zip | |
Add a new instruction `OP_LOADI32`.
That loads 32 bit integer bypassing pool access.
Diffstat (limited to 'src/codedump.c')
| -rw-r--r-- | src/codedump.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/codedump.c b/src/codedump.c index 9af609264..b62342c15 100644 --- a/src/codedump.c +++ b/src/codedump.c @@ -115,7 +115,7 @@ codedump(mrb_state *mrb, const mrb_irep *irep) ptrdiff_t i; uint32_t a; uint16_t b; - uint8_t c; + uint16_t c; ai = mrb_gc_arena_save(mrb); @@ -169,6 +169,10 @@ codedump(mrb_state *mrb, const mrb_irep *irep) printf("OP_LOADI16\tR%d\t%d\t", a, (int)(int16_t)b); print_lv_a(mrb, irep, a); break; + CASE(OP_LOADI32, BSS); + printf("OP_LOADI32\tR%d\t%d\t", a, (int)(b<<16)+c); + print_lv_a(mrb, irep, a); + break; CASE(OP_LOADI__1, B); printf("OP_LOADI__1\tR%d\t\t", a); print_lv_a(mrb, irep, a); |
