summaryrefslogtreecommitdiffhomepage
path: root/src/opcode.h
diff options
context:
space:
mode:
authorMasaki Muranaka <[email protected]>2013-03-22 17:55:16 +0900
committerYukihiro Matz Matsumoto <[email protected]>2013-03-24 00:13:23 +0900
commitdaeaa51b2dac8ab94d6d24425078594906ca1465 (patch)
tree3d00712255e65f5e75f9cc7224c81bc28b908185 /src/opcode.h
parent1756e8fc839fb734bf107cd1aa23fb8a39142642 (diff)
downloadmruby-daeaa51b2dac8ab94d6d24425078594906ca1465.tar.gz
mruby-daeaa51b2dac8ab94d6d24425078594906ca1465.zip
For particular environments which has 25 < n < 32 bit int. There is no cost even if you use 16/32bit int targets.
Diffstat (limited to 'src/opcode.h')
-rw-r--r--src/opcode.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/opcode.h b/src/opcode.h
index bebc27d5a..b4f843116 100644
--- a/src/opcode.h
+++ b/src/opcode.h
@@ -35,7 +35,7 @@
#define MKARG_C(c) (((c) & 0x7f) << 7)
#define MKARG_Bx(v) ((mrb_code)((v) & 0xffff) << 7)
#define MKARG_sBx(v) MKARG_Bx((v)+MAXARG_sBx)
-#define MKARG_Ax(v) (((v) & 0x1ffffff) << 7)
+#define MKARG_Ax(v) ((mrb_code)((v) & 0x1ffffff) << 7)
#define MKARG_PACK(b,n1,c,n2) ((((b) & ((1<<n1)-1)) << (7+n2))|(((c) & ((1<<n2)-1)) << 7))
#define MKARG_bc(b,c) MKARG_PACK(b,14,c,2)