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

Side by Side Diff: src/trusted/validator/x86/halt_trim.h

Issue 625923004: Delete old x86 validator. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: rebase master Created 6 years, 2 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
(Empty)
1 /*
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
4 * found in the LICENSE file.
5 */
6
7 /* Defines code to detect trailing halts in a code segment, and how many
8 * can be trimmed from the code segment without effecting the validator.
9 */
10
11 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_HALT_TRIM_H__
12 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_HALT_TRIM_H__
13
14 #include "native_client/src/trusted/validator/types_memory_model.h"
15
16 EXTERN_C_BEGIN
17
18 /* Takes a code memory segment, and returns the (safe) size to
19 * use for validation. It does this by checking for trailing halt
20 * instructions, and removes excess halts from the code segment memory.
21 * This function assumes the code segment will be mapped to an aligned base
22 * address.
23 *
24 * Parameters are:
25 * mbase - The beging of the memory segment to decode.
26 * sz - The number of bytes in the memory segment.
27 * alignment - The blocksize alignment used for the code segment.
28 * Returns:
29 * The number of bytes in the trimmed memory segment.
30 */
31 NaClMemorySize NCHaltTrimSize(uint8_t* mbase, NaClMemorySize sz,
32 uint8_t alignment);
33
34 EXTERN_C_END
35
36 #endif /* NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_HALT_TRIM_H__ */
OLDNEW
« no previous file with comments | « src/trusted/validator/x86/error_reporter_verbose.c ('k') | src/trusted/validator/x86/halt_trim.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698