Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Side by Side Diff: src/trusted/validator/x86/ncval_reg_sfi/ncvalidate_iter.h

Issue 10116004: Eliminate bundle_size parameter from validator interface. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Merge Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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__ */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698