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

Side by Side Diff: src/trusted/validator_ragel/unreviewed/validator_x86_64.rl

Issue 12226019: Move bitmap manipulation functions in bitmap.h (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: Created 7 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
« no previous file with comments | « src/trusted/validator_ragel/unreviewed/validator_x86_32.rl ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /* 7 /*
8 * This is the core of amd64-mode validator. Please note that this file 8 * This is the core of amd64-mode validator. Please note that this file
9 * combines ragel machine description and C language actions. Please read 9 * combines ragel machine description and C language actions. Please read
10 * validator_internals.html first to understand how the whole thing is built: 10 * validator_internals.html first to understand how the whole thing is built:
11 * it explains how the byte sequences are constructed, what constructs like 11 * it explains how the byte sequences are constructed, what constructs like
12 * “@{}” or “REX_WRX?” mean, etc. 12 * “@{}” or “REX_WRX?” mean, etc.
13 */ 13 */
14 14
15 #include <assert.h> 15 #include <assert.h>
16 #include <errno.h> 16 #include <errno.h>
17 #include <stddef.h> 17 #include <stddef.h>
18 #include <stdio.h> 18 #include <stdio.h>
19 #include <stdlib.h> 19 #include <stdlib.h>
20 #include <string.h> 20 #include <string.h>
21 21
22 #include "native_client/src/trusted/validator_ragel/bitmap.h"
22 #include "native_client/src/trusted/validator_ragel/unreviewed/validator_interna l.h" 23 #include "native_client/src/trusted/validator_ragel/unreviewed/validator_interna l.h"
23 24
24 %%{ 25 %%{
25 machine x86_64_validator; 26 machine x86_64_validator;
26 alphtype unsigned char; 27 alphtype unsigned char;
27 variable p current_position; 28 variable p current_position;
28 variable pe end_of_bundle; 29 variable pe end_of_bundle;
29 variable eof end_of_bundle; 30 variable eof end_of_bundle;
30 variable cs current_state; 31 variable cs current_state;
31 32
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 */ 761 */
761 result &= ProcessInvalidJumpTargets(data, size, valid_targets, jump_dests, 762 result &= ProcessInvalidJumpTargets(data, size, valid_targets, jump_dests,
762 user_callback, callback_data); 763 user_callback, callback_data);
763 764
764 /* We only use malloc for a large code sequences */ 765 /* We only use malloc for a large code sequences */
765 if (jump_dests != jump_dests_small) free(jump_dests); 766 if (jump_dests != jump_dests_small) free(jump_dests);
766 if (valid_targets != valid_targets_small) free(valid_targets); 767 if (valid_targets != valid_targets_small) free(valid_targets);
767 if (!result) errno = EINVAL; 768 if (!result) errno = EINVAL;
768 return result; 769 return result;
769 } 770 }
OLDNEW
« no previous file with comments | « src/trusted/validator_ragel/unreviewed/validator_x86_32.rl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698