| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
| 4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 /* | 7 /* |
| 8 * Data structures for decoding instructions. Includes definitions which are | 8 * Data structures for decoding instructions. Includes definitions which are |
| 9 * by both decoders (full-blown standalone one and reduced one in validator). | 9 * by both decoders (full-blown standalone one and reduced one in validator). |
| 10 */ | 10 */ |
| 11 | 11 |
| 12 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_RAGEL_DECODER_H_ | 12 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_RAGEL_DECODER_H_ |
| 13 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_RAGEL_DECODER_H_ | 13 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_RAGEL_DECODER_H_ |
| 14 | 14 |
| 15 #include "native_client/src/shared/utils/types.h" | 15 #include "native_client/src/shared/utils/types.h" |
| 16 #include "native_client/src/trusted/validator/x86/nacl_cpuid.h" | 16 #include "native_client/src/trusted/cpu_features/arch/x86/cpu_x86.h" |
| 17 | 17 |
| 18 EXTERN_C_BEGIN | 18 EXTERN_C_BEGIN |
| 19 | 19 |
| 20 enum OperandType { | 20 enum OperandType { |
| 21 /* | 21 /* |
| 22 * These are for general-purpose registers, memory access and immediates. | 22 * These are for general-purpose registers, memory access and immediates. |
| 23 * They are not used for XMM, MMX etc. | 23 * They are not used for XMM, MMX etc. |
| 24 */ | 24 */ |
| 25 OPERAND_TYPE_8_BIT, | 25 OPERAND_TYPE_8_BIT, |
| 26 OPERAND_TYPE_16_BIT, | 26 OPERAND_TYPE_16_BIT, |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 ProcessInstructionFunc process_instruction, | 172 ProcessInstructionFunc process_instruction, |
| 173 ProcessDecodingErrorFunc process_error, void *userdata); | 173 ProcessDecodingErrorFunc process_error, void *userdata); |
| 174 | 174 |
| 175 int DecodeChunkIA32(const uint8_t *data, size_t size, | 175 int DecodeChunkIA32(const uint8_t *data, size_t size, |
| 176 ProcessInstructionFunc process_instruction, | 176 ProcessInstructionFunc process_instruction, |
| 177 ProcessDecodingErrorFunc process_error, void *userdata); | 177 ProcessDecodingErrorFunc process_error, void *userdata); |
| 178 | 178 |
| 179 EXTERN_C_END | 179 EXTERN_C_END |
| 180 | 180 |
| 181 #endif /* NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_RAGEL_DECODER_H_ */ | 181 #endif /* NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_RAGEL_DECODER_H_ */ |
| OLD | NEW |