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

Side by Side Diff: src/trusted/validator_x86/nc_inst_state.h

Issue 6883091: Start unit testing for functions in nc_inst_state.c (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: '' Created 9 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 2009 The Native Client Authors. All rights reserved. 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 3 * Use of this source code is governed by a BSD-style license that can be
4 * be found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 /* 7 /*
8 * Defines the user API to the state associated with matching instructions. 8 * Defines the user API to the state associated with matching instructions.
9 */ 9 */
10 10
11 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_NC_INST_STATE_H_ 11 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_NC_INST_STATE_H_
12 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_NC_INST_STATE_H_ 12 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_NC_INST_STATE_H_
13 13
14 #include "native_client/src/include/portability.h" 14 #include "native_client/src/include/portability.h"
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/ncopcode_desc.h" 16 #include "native_client/src/trusted/validator_x86/ncopcode_desc.h"
17 #include "native_client/src/trusted/validator_x86/types_memory_model.h" 17 #include "native_client/src/trusted/validator_x86/types_memory_model.h"
18 18
19 EXTERN_C_BEGIN
20
19 /* The meta model of an x86 opcode instruction. */ 21 /* The meta model of an x86 opcode instruction. */
20 struct NaClInst; 22 struct NaClInst;
21 23
22 /* The (user) representation of the parsed x86 instruction. */ 24 /* The (user) representation of the parsed x86 instruction. */
23 struct NaClExpVector; 25 struct NaClExpVector;
24 26
25 /* Defines the state used to match an instruction, while walking 27 /* Defines the state used to match an instruction, while walking
26 * instructions using the NaClInstIter. 28 * instructions using the NaClInstIter.
27 */ 29 */
28 typedef struct NaClInstState NaClInstState; 30 typedef struct NaClInstState NaClInstState;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 65
64 /* Returns the operand size (measured in bytes) of the instruction state. */ 66 /* Returns the operand size (measured in bytes) of the instruction state. */
65 uint8_t NaClInstStateOperandSize(NaClInstState* state); 67 uint8_t NaClInstStateOperandSize(NaClInstState* state);
66 68
67 /* Returns the address size (measured in bits) of the instruction state. */ 69 /* Returns the address size (measured in bits) of the instruction state. */
68 uint8_t NaClInstStateAddressSize(NaClInstState* state); 70 uint8_t NaClInstStateAddressSize(NaClInstState* state);
69 71
70 /* Changes opcode encodings to match those used by xed. */ 72 /* Changes opcode encodings to match those used by xed. */
71 void NaClChangeOpcodesToXedsModel(); 73 void NaClChangeOpcodesToXedsModel();
72 74
75 EXTERN_C_END
76
73 #endif /* NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_NC_INST_STATE_H_ */ 77 #endif /* NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_NC_INST_STATE_H_ */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698