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

Side by Side Diff: src/trusted/validator/x86/decoder/nc_inst_state_statics.c

Issue 9328024: Merge 7712 - Ensure super instructions are marked during dynamic code modification. (Closed) Base URL: svn://svn.chromium.org/native_client/branches/963/src/native_client/
Patch Set: '' Created 8 years, 10 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) 2011 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 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 includes, static functions, and constants that are used 8 * This file contains includes, static functions, and constants that are used
9 * in nc_inst_state.c, but have been factored out and put into this file, so 9 * in nc_inst_state.c, but have been factored out and put into this file, so
10 * that we can test them. That is, to allow nc_inst_state.c and 10 * that we can test them. That is, to allow nc_inst_state.c and
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 state->sib = 0; 58 state->sib = 0;
59 state->num_disp_bytes = 0; 59 state->num_disp_bytes = 0;
60 state->first_disp_byte = 0; 60 state->first_disp_byte = 0;
61 state->num_imm_bytes = 0; 61 state->num_imm_bytes = 0;
62 state->first_imm_byte = 0; 62 state->first_imm_byte = 0;
63 state->num_imm2_bytes = 0; 63 state->num_imm2_bytes = 0;
64 state->prefix_mask = 0; 64 state->prefix_mask = 0;
65 state->inst = NULL; 65 state->inst = NULL;
66 state->nodes.is_defined = FALSE; 66 state->nodes.is_defined = FALSE;
67 state->nodes.number_expr_nodes = 0; 67 state->nodes.number_expr_nodes = 0;
68 state->unchanged = FALSE;
68 } 69 }
69 70
70 /* Computes the number of bytes defined for operands of the matched 71 /* Computes the number of bytes defined for operands of the matched
71 * instruction of the given state. 72 * instruction of the given state.
72 */ 73 */
73 static int NaClExtractOpSize(NaClInstState* state) { 74 static int NaClExtractOpSize(NaClInstState* state) {
74 if (NaClHasBit(state->inst->flags, NACL_IFLAG(OperandSize_b))) { 75 if (NaClHasBit(state->inst->flags, NACL_IFLAG(OperandSize_b))) {
75 return 1; 76 return 1;
76 } 77 }
77 if (NACL_TARGET_SUBARCH == 64) { 78 if (NACL_TARGET_SUBARCH == 64) {
(...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after
923 state->inst = matching_inst; 924 state->inst = matching_inst;
924 NCInstBytesReadBytesInline(matching_length, &state->bytes); 925 NCInstBytesReadBytesInline(matching_length, &state->bytes);
925 DEBUG(NaClLog(LOG_INFO, "matched inst sequence [%d]!\n", matching_length)); 926 DEBUG(NaClLog(LOG_INFO, "matched inst sequence [%d]!\n", matching_length));
926 return TRUE; 927 return TRUE;
927 } 928 }
928 } 929 }
929 930
930 EXTERN_C_END 931 EXTERN_C_END
931 932
932 #endif /* NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_DECODER_NC_INST_STATE_STATIC S_C__ */ 933 #endif /* NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_DECODER_NC_INST_STATE_STATIC S_C__ */
OLDNEW
« no previous file with comments | « src/trusted/validator/x86/decoder/nc_inst_state_internal.h ('k') | src/trusted/validator/x86/ncval_reg_sfi/nc_jumps.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698