From 1756e8fc839fb734bf107cd1aa23fb8a39142642 Mon Sep 17 00:00:00 2001 From: Masaki Muranaka Date: Fri, 22 Mar 2013 17:50:01 +0900 Subject: Add brances to macro parameter. It may be refactored as GET_UNPACK_{b,c} are used only by GETARG_{b,c}. --- src/opcode.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/opcode.h') diff --git a/src/opcode.h b/src/opcode.h index 8678ef73d..bebc27d5a 100644 --- a/src/opcode.h +++ b/src/opcode.h @@ -24,8 +24,8 @@ #define GETARG_Bx(i) ((int)((((mrb_code)(i)) >> 7) & 0xffff)) #define GETARG_sBx(i) ((int)(GETARG_Bx(i)-MAXARG_sBx)) #define GETARG_Ax(i) ((int32_t)((((mrb_code)(i)) >> 7) & 0x1ffffff)) -#define GETARG_UNPACK_b(i,n1,n2) ((int)((((mrb_code)(i)) >> (7+n2)) & (((1<> 7) & (((1<> (7+(n2))) & (((1<<(n1))-1)))) +#define GETARG_UNPACK_c(i,n1,n2) ((int)((((mrb_code)(i)) >> 7) & (((1<<(n2))-1)))) #define GETARG_b(i) GETARG_UNPACK_b(i,14,2) #define GETARG_c(i) GETARG_UNPACK_c(i,14,2) -- cgit v1.2.3