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 * This file contains common parts of x86-32 and x86-64 internals (inline | 8 * This file contains common parts of x86-32 and x86-64 internals (inline |
9 * and static functions and defines). | 9 * and static functions and defines). |
10 */ | 10 */ |
(...skipping 16 matching lines...) Expand all Loading... |
27 * e: f2 48 a7 repnz cmpsq %es:(%rdi),%ds:(%rsi) | 27 * e: f2 48 a7 repnz cmpsq %es:(%rdi),%ds:(%rsi) |
28 */ | 28 */ |
29 #define MAX_INSTRUCTION_LENGTH 17 | 29 #define MAX_INSTRUCTION_LENGTH 17 |
30 | 30 |
31 Bool NaClDfaProcessValidationError(const uint8_t *begin, const uint8_t *end, | 31 Bool NaClDfaProcessValidationError(const uint8_t *begin, const uint8_t *end, |
32 uint32_t info, void *callback_data); | 32 uint32_t info, void *callback_data); |
33 | 33 |
34 struct StubOutCallbackData { | 34 struct StubOutCallbackData { |
35 uint32_t flags; | 35 uint32_t flags; |
36 int did_rewrite; | 36 int did_rewrite; |
| 37 int chunk_processed_as_a_contiguous_stream; |
| 38 int bundle_begin_offset; |
| 39 void *cpu_features; |
37 }; | 40 }; |
38 | 41 |
39 Bool NaClDfaStubOutUnsupportedInstruction(const uint8_t *begin, | 42 Bool NaClDfaStubOutUnsupportedInstruction(const uint8_t *begin, |
40 const uint8_t *end, | 43 const uint8_t *end, |
41 uint32_t info, | 44 uint32_t info, |
42 void *callback_data); | 45 void *callback_data); |
43 | 46 |
44 struct CodeCopyCallbackData { | 47 struct CodeCopyCallbackData { |
45 NaClCopyInstructionFunc copy_func; | 48 NaClCopyInstructionFunc copy_func; |
46 /* Difference between addresses: dest - src. */ | 49 /* Difference between addresses: dest - src. */ |
47 ptrdiff_t existing_minus_new; | 50 ptrdiff_t existing_minus_new; |
48 }; | 51 }; |
49 | 52 |
50 Bool NaClDfaProcessCodeCopyInstruction(const uint8_t *begin_new, | 53 Bool NaClDfaProcessCodeCopyInstruction(const uint8_t *begin_new, |
51 const uint8_t *end_new, | 54 const uint8_t *end_new, |
52 uint32_t info, | 55 uint32_t info, |
53 void *callback_data); | 56 void *callback_data); |
54 | 57 |
55 /* Check whether instruction is stubouted because it is not supported by current | 58 /* Check whether instruction is stubouted because it is not supported by current |
56 CPU. */ | 59 CPU. */ |
57 Bool NaClDfaCodeReplacementIsStubouted(const uint8_t *begin_existing, | 60 Bool NaClDfaCodeReplacementIsStubouted(const uint8_t *begin_existing, |
58 size_t instruction_length); | 61 size_t instruction_length); |
59 | 62 |
60 #endif /* NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_RAGEL_DFA_VALIDATE_COMMON_H_ */ | 63 #endif /* NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_RAGEL_DFA_VALIDATE_COMMON_H_ */ |
OLD | NEW |