Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #include <assert.h> | 7 #include <assert.h> |
| 8 #include <elf.h> | |
| 9 #include <inttypes.h> | |
| 10 #include <stddef.h> | 8 #include <stddef.h> |
| 11 #include <stdio.h> | 9 #include <stdio.h> |
| 12 #include <stdlib.h> | 10 #include <stdlib.h> |
| 13 #include <string.h> | 11 #include <string.h> |
| 14 #include "decoder.h" | 12 |
| 13 #include "native_client/src/trusted/validator_ragel/unreviewed/decoder.h" | |
| 15 | 14 |
| 16 #undef TRUE | 15 #undef TRUE |
| 17 #define TRUE 1 | 16 #define TRUE 1 |
|
pasko-google - do not use
2012/04/05 14:16:38
also fixable with #include "native_client/src/shar
khim
2012/04/05 16:38:43
Done.
| |
| 18 | 17 |
| 19 #undef FALSE | 18 #undef FALSE |
| 20 #define FALSE 0 | 19 #define FALSE 0 |
| 21 | 20 |
| 22 #include "decoder-x86_32-instruction-consts.c" | 21 #include "native_client/src/trusted/validator_ragel/generated/decoder-x86_32-ins truction-consts.c" |
| 23 | 22 |
| 24 %%{ | 23 %%{ |
| 25 machine x86_32_decoder; | 24 machine x86_32_decoder; |
| 26 alphtype unsigned char; | 25 alphtype unsigned char; |
| 27 | 26 |
| 28 include decode_x86_32 "decoder-x86_32-instruction.rl"; | 27 include decode_x86_32 "decoder-x86_32-instruction.rl"; |
| 29 | 28 |
| 30 main := (one_instruction | 29 main := (one_instruction |
| 31 >{ | 30 >{ |
| 32 begin = p; | 31 begin = p; |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 149 | 148 |
| 150 /* Not used in ia32_mode. */ | 149 /* Not used in ia32_mode. */ |
| 151 instruction.prefix.rex = 0; | 150 instruction.prefix.rex = 0; |
| 152 | 151 |
| 153 %% write init; | 152 %% write init; |
| 154 %% write exec; | 153 %% write exec; |
| 155 | 154 |
| 156 error_detected: | 155 error_detected: |
| 157 return result; | 156 return result; |
| 158 } | 157 } |
| OLD | NEW |