From c76abc70ff77be971a0139c397a6050cd5737c78 Mon Sep 17 00:00:00 2001 From: Yukihiro Matsumoto Date: Tue, 12 Jun 2012 01:51:50 +0900 Subject: GETARG_x should return int, not int32_t --- src/opcode.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/opcode.h') diff --git a/src/opcode.h b/src/opcode.h index 9e7cf7f34..40ba9d126 100644 --- a/src/opcode.h +++ b/src/opcode.h @@ -14,15 +14,15 @@ /* OP:A:Bx = 7:9:16 */ /* OP:Ax = 7:25 */ -#define GET_OPCODE(i) (((mrb_code)(i)) & 0x7f) -#define GETARG_A(i) ((((mrb_code)(i)) >> 23) & 0x1ff) -#define GETARG_B(i) ((((mrb_code)(i)) >> 14) & 0x1ff) -#define GETARG_C(i) ((((mrb_code)(i)) >> 7) & 0x7f) -#define GETARG_Bx(i) ((((mrb_code)(i)) >> 7) & 0xffff) -#define GETARG_sBx(i) (GETARG_Bx(i)-MAXARG_sBx) -#define GETARG_Ax(i) ((((mrb_code)(i)) >> 7) & 0x1ffffff) -#define GETARG_UNPACK_b(i,n1,n2) ((((mrb_code)(i)) >> (7+n2)) & (((1<> 7) & (((1<> 23) & 0x1ff)) +#define GETARG_B(i) ((int)((((mrb_code)(i)) >> 14) & 0x1ff)) +#define GETARG_C(i) ((int)((((mrb_code)(i)) >> 7) & 0x7f)) +#define GETARG_Bx(i) ((int)((((mrb_code)(i)) >> 7) & 0xffff)) +#define GETARG_sBx(i) ((int)(GETARG_Bx(i)-MAXARG_sBx)) +#define GETARG_Ax(i) ((int)((((mrb_code)(i)) >> 7) & 0x1ffffff)) +#define GETARG_UNPACK_b(i,n1,n2) ((int)((((mrb_code)(i)) >> (7+n2)) & (((1<> 7) & (((1<