Add a new instruction OP_LOADI32.

That loads 32 bit integer bypassing pool access.
This commit is contained in:
Yukihiro "Matz" Matsumoto
2020-11-04 14:01:04 +09:00
parent f8156ae175
commit d13df1536d
5 changed files with 37 additions and 10 deletions
+5 -1
View File
@@ -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);