From ab5a6500296dbd847632ccc2fb43b44bba4c34f5 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 8 May 2017 13:08:01 -0300 Subject: details (direct access to 'Ck' bit in instructions) --- lopcodes.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lopcodes.h') diff --git a/lopcodes.h b/lopcodes.h index 6c9df6f3..683f8928 100644 --- a/lopcodes.h +++ b/lopcodes.h @@ -1,5 +1,5 @@ /* -** $Id: lopcodes.h,v 1.152 2017/04/26 17:46:52 roberto Exp roberto $ +** $Id: lopcodes.h,v 1.153 2017/04/28 20:57:45 roberto Exp roberto $ ** Opcodes for Lua virtual machine ** See Copyright Notice in lua.h */ @@ -106,6 +106,9 @@ enum OpMode {iABC, iABx, iAsBx, iAx}; /* basic instruction format */ #define GETARG_C(i) getarg(i, POS_C, SIZE_C) #define SETARG_C(i,v) setarg(i, v, POS_C, SIZE_C) +#define GETARG_Cr(i) getarg(i, POS_C, SIZE_C - 1) +#define GETARG_Ck(i) getarg(i, (POS_C + SIZE_C - 1), 1) + #define GETARG_Bx(i) getarg(i, POS_Bx, SIZE_Bx) #define SETARG_Bx(i,v) setarg(i, v, POS_Bx, SIZE_Bx) -- cgit v1.2.3-55-g6feb