diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2012-09-15 19:58:36 +0400 |
---|---|---|
committer | Cyrill Gorcunov <gorcunov@gmail.com> | 2012-09-16 23:23:43 +0400 |
commit | 220ac6544c857f37be9b54f44e6805494493136c (patch) | |
tree | 3a5145d1726e426bf7ae169318f8f2aee1e022f1 | |
parent | abfb6348fa88410d2e414874d0ba980e6b9b6b1c (diff) | |
download | nasm-220ac6544c857f37be9b54f44e6805494493136c.tar.gz nasm-220ac6544c857f37be9b54f44e6805494493136c.tar.bz2 nasm-220ac6544c857f37be9b54f44e6805494493136c.zip |
opflags: Introduce opflags generating macros
This patch introduces two macros
- OP_GENMASK, to generate masks in opflags
- OP_GENBIT, to generate bit at specified position
we will use them with extended 64 bits opflags.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
-rw-r--r-- | opflags.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -134,6 +134,10 @@ typedef uint64_t opflags_t; +#define OP_GENMASK(bits, shift) (((UINT64_C(1) << (bits)) - 1) << (shift)) +#define OP_GENBIT(bit, shift) (UINT64_C(1) << ((shift) + (bit))) + + /* Size, and other attributes, of the operand */ #define BITS8 UINT64_C(0x00000001) #define BITS16 UINT64_C(0x00000002) |