| 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 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_NCVAL_REG_SFI_NCVALIDATE_ITER_H_
_ | 7 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_NCVAL_REG_SFI_NCVALIDATE_ITER_H_
_ |
| 8 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_NCVAL_REG_SFI_NCVALIDATE_ITER_H_
_ | 8 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_NCVAL_REG_SFI_NCVALIDATE_ITER_H_
_ |
| 9 | 9 |
| 10 /* | 10 /* |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 | 90 |
| 91 /* The model of a validator state. */ | 91 /* The model of a validator state. */ |
| 92 typedef struct NaClValidatorState NaClValidatorState; | 92 typedef struct NaClValidatorState NaClValidatorState; |
| 93 | 93 |
| 94 /* Create a validator state to validate the code segment. | 94 /* Create a validator state to validate the code segment. |
| 95 * Note: Messages (if any) produced by the validator are sent to the stream | 95 * Note: Messages (if any) produced by the validator are sent to the stream |
| 96 * defined by native_client/src/shared/platform/nacl_log.h. | 96 * defined by native_client/src/shared/platform/nacl_log.h. |
| 97 * Parameters. | 97 * Parameters. |
| 98 * vbase - The virtual address for the contents of the code segment. | 98 * vbase - The virtual address for the contents of the code segment. |
| 99 * sz - The number of bytes in the code segment. | 99 * sz - The number of bytes in the code segment. |
| 100 * alignment: 16 or 32, specifying alignment. | |
| 101 * base_register - OperandKind defining value for base register (or | 100 * base_register - OperandKind defining value for base register (or |
| 102 * RegUnknown if not defined). | 101 * RegUnknown if not defined). |
| 103 * readonly - Whether the text should be treated as read-only. | 102 * readonly - Whether the text should be treated as read-only. |
| 104 * features - The CPU features to use. Uses local features of machine if NULL. | 103 * features - The CPU features to use. Uses local features of machine if NULL. |
| 105 * Returns: | 104 * Returns: |
| 106 * A pointer to an initialized validator state if everything is ok, NULL | 105 * A pointer to an initialized validator state if everything is ok, NULL |
| 107 * otherwise. | 106 * otherwise. |
| 108 */ | 107 */ |
| 109 NaClValidatorState* NaClValidatorStateCreate( | 108 NaClValidatorState* NaClValidatorStateCreate( |
| 110 const NaClPcAddress vbase, | 109 const NaClPcAddress vbase, |
| 111 const NaClMemorySize codesize, | 110 const NaClMemorySize codesize, |
| 112 const uint8_t alignment, | |
| 113 const NaClOpKind base_register, | 111 const NaClOpKind base_register, |
| 114 const int readonly, /* Bool */ | 112 const int readonly, /* Bool */ |
| 115 const NaClCPUFeaturesX86 *features); | 113 const NaClCPUFeaturesX86 *features); |
| 116 | 114 |
| 117 /* Returns true if the instruction iterator of the validator has any more | 115 /* Returns true if the instruction iterator of the validator has any more |
| 118 * instructions. Also does any necessary internal caching if there are | 116 * instructions. Also does any necessary internal caching if there are |
| 119 * more instructions, based on the instruction iterator. | 117 * more instructions, based on the instruction iterator. |
| 120 */ | 118 */ |
| 121 Bool NaClValidatorStateIterHasNext(NaClValidatorState *vstate); | 119 Bool NaClValidatorStateIterHasNext(NaClValidatorState *vstate); |
| 122 | 120 |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 | 392 |
| 395 /* Prints out the address of the current instruction, and the pre/post | 393 /* Prints out the address of the current instruction, and the pre/post |
| 396 * conditions associated with the current instruction. | 394 * conditions associated with the current instruction. |
| 397 */ | 395 */ |
| 398 void NaClPrintConditions(NaClValidatorState *state); | 396 void NaClPrintConditions(NaClValidatorState *state); |
| 399 #endif | 397 #endif |
| 400 | 398 |
| 401 EXTERN_C_END | 399 EXTERN_C_END |
| 402 | 400 |
| 403 #endif /* NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_NCVAL_REG_SFI_NCVALIDATE_ITER
_H__ */ | 401 #endif /* NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_NCVAL_REG_SFI_NCVALIDATE_ITER
_H__ */ |
| OLD | NEW |