Upstream version 11.39.266.0
[platform/framework/web/crosswalk.git] / src / native_client / src / trusted / validator / x86 / decoder / nc_decode_tables_types.h
1 /*
2  * Copyright (c) 2011 The Native Client Authors. All rights reserved.
3  * Use of this source code is governed by a BSD-style license that can be
4  * found in the LICENSE file.
5  */
6
7 /*
8  * Defines types used in decoder tables.
9  */
10
11 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_NC_DECODE_TABLES_TYPES_H__
12 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_NC_DECODE_TABLES_TYPES_H__
13
14 #include "native_client/src/include/portability.h"
15
16 EXTERN_C_BEGIN
17
18 /* Defines the maximum allowable bytes per x86 instruction. */
19 #define NACL_MAX_BYTES_PER_X86_INSTRUCTION 15
20
21 /* Offset into generated table of operands, defining where the operands
22  * are located.
23  */
24 typedef uint16_t NaClOperandArrayOffset;
25
26 /* Offset into generated table of opcodes, defining where the instruction
27  * is defined.
28  */
29 typedef uint16_t NaClOpcodeArrayOffset;
30
31 /* Special value used to denote NULL for an NaClOpcodeArrayOffset value. */
32 #define NACL_OPCODE_NULL_OFFSET 0xFFFF
33
34 /* Offset into generated table of prefix opcode lookups. */
35 typedef uint16_t NaClPrefixOpcodeArrayOffset;
36
37 EXTERN_C_END
38
39 #endif  /* NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_NC_DECODE_TABLES_TYPES_H__ */