Fix x86 encoder to use 64-bit type to accumulate opcode/prefix bits
authorBruce Forstall <brucefo@microsoft.com>
Wed, 30 Nov 2016 02:57:18 +0000 (18:57 -0800)
committerBruce Forstall <brucefo@microsoft.com>
Wed, 30 Nov 2016 22:10:16 +0000 (14:10 -0800)
commitb90516fe443d50cacfe6635d8c1be595d41b8a90
treeab06a7a9af95103b4f0f7c6f892c027d6458614f
parent0b0d51ebfbb2dfd6defe43892d681e42ca9122d0
Fix x86 encoder to use 64-bit type to accumulate opcode/prefix bits

The encoder was using size_t, a 32-bit type on x86, to accumulate opcode
and prefix bits to emit. AVX support uses 3 bytes for prefixes that are
higher than the 32-bit type can handle. So, change all code byte related types
from size_t to a new code_t, defined as "unsigned __int64" on RyuJIT x86
(there is precedence for this type on the ARM architectures).

Fixes #8331
src/jit/emit.cpp
src/jit/emit.h
src/jit/emitxarch.cpp
src/jit/emitxarch.h