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

Side by Side Diff: src/trusted/validator_ragel/unreviewed/validator.h

Issue 10031039: Add ragel validator to SCONS (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: 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 _VALIDATOR_X86_64_H_ 7 #ifndef _VALIDATOR_X86_64_H_
8 #define _VALIDATOR_X86_64_H_ 8 #define _VALIDATOR_X86_64_H_
9 9
10 #include <inttypes.h> 10 #include "native_client/src/include/portability.h"
11 #include <stdbool.h>
12 11
13 #ifdef __cplusplus 12 #ifdef __cplusplus
14 extern "C" { 13 extern "C" {
15 #endif 14 #endif
16 15
17 enum operand_type { 16 enum operand_type {
18 /* 17 /*
19 * OperandSize8bit and OperandSize16bit don't affect sandboxing state of the 18 * OperandSize8bit and OperandSize16bit don't affect sandboxing state of the
20 * register: it may become different, but top half does not change it's value. 19 * register: it may become different, but top half does not change it's value.
21 * R15 can not be used even with these operands. 20 * R15 can not be used even with these operands.
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 REG_R15, 84 REG_R15,
86 REG_RM, /* Address in memory via rm field. */ 85 REG_RM, /* Address in memory via rm field. */
87 REG_RIP, /* RIP - used as base in x86-64 mode. */ 86 REG_RIP, /* RIP - used as base in x86-64 mode. */
88 REG_RIZ, /* EIZ/RIZ - used as "always zero index" register. */ 87 REG_RIZ, /* EIZ/RIZ - used as "always zero index" register. */
89 REG_IMM, /* Fixed value in imm field. */ 88 REG_IMM, /* Fixed value in imm field. */
90 REG_IMM2, /* Fixed value in second imm field. */ 89 REG_IMM2, /* Fixed value in second imm field. */
91 REG_DS_RBX, /* Fox xlat: %ds(%rbx). */ 90 REG_DS_RBX, /* Fox xlat: %ds(%rbx). */
92 REG_ES_RDI, /* For string instructions: %es:(%rsi). */ 91 REG_ES_RDI, /* For string instructions: %es:(%rsi). */
93 REG_DS_RSI, /* For string instructions: %ds:(%rdi). */ 92 REG_DS_RSI, /* For string instructions: %ds:(%rdi). */
94 REG_PORT_DX, /* 16-bit DX: for in/out instructions. */ 93 REG_PORT_DX, /* 16-bit DX: for in/out instructions. */
95 REG_NONE, /* For modrm: both index and base can be absent. */ 94 NO_REG, /* For modrm: both index and base can be absent. */
96 REG_ST, /* For x87 instructions: implicit %st. */ 95 REG_ST, /* For x87 instructions: implicit %st. */
97 JMP_TO /* Operand is jump target address: usually %rip+offset. */ 96 JMP_TO /* Operand is jump target address: usually %rip+offset. */
98 }; 97 };
99 98
100 typedef void (*process_error_func) (const uint8_t *ptr, void *userdata); 99 typedef void (*process_error_func) (const uint8_t *ptr, void *userdata);
101 100
102 int ValidateChunkAMD64(const uint8_t *data, size_t size, 101 int ValidateChunkAMD64(const uint8_t *data, size_t size,
103 process_error_func process_error, void *userdata); 102 process_error_func process_error, void *userdata);
104 103
105 int ValidateChunkIA32(const uint8_t *data, size_t size, 104 int ValidateChunkIA32(const uint8_t *data, size_t size,
106 process_error_func process_error, void *userdata); 105 process_error_func process_error, void *userdata);
107 106
108 #ifdef __cplusplus 107 #ifdef __cplusplus
109 } 108 }
110 #endif 109 #endif
111 110
112 #endif 111 #endif
OLDNEW
« no previous file with comments | « src/trusted/validator_ragel/unreviewed/gen-dfa.cc ('k') | src/trusted/validator_ragel/unreviewed/validator-test.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698