| 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/include/elf32.h" |
| 14 #include "native_client/src/trusted/validator_ragel/unreviewed/decoder.h" |
| 15 | 15 |
| 16 #undef TRUE | 16 #undef TRUE |
| 17 #define TRUE 1 | 17 #define TRUE 1 |
| 18 | 18 |
| 19 #undef FALSE | 19 #undef FALSE |
| 20 #define FALSE 0 | 20 #define FALSE 0 |
| 21 | 21 |
| 22 #include "decoder-x86_64-instruction-consts.c" | 22 #include "native_client/src/trusted/validator_ragel/generated/decoder-x86_64-ins
truction-consts.c" |
| 23 | 23 |
| 24 %%{ | 24 %%{ |
| 25 machine x86_64_decoder; | 25 machine x86_64_decoder; |
| 26 alphtype unsigned char; | 26 alphtype unsigned char; |
| 27 | 27 |
| 28 include decode_x86_64 "decoder-x86_64-instruction.rl"; | 28 include decode_x86_64 "decoder-x86_64-instruction.rl"; |
| 29 | 29 |
| 30 main := (one_instruction | 30 main := (one_instruction |
| 31 >{ | 31 >{ |
| 32 begin = p; | 32 begin = p; |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 int result = 0; | 166 int result = 0; |
| 167 | 167 |
| 168 int cs; | 168 int cs; |
| 169 | 169 |
| 170 %% write init; | 170 %% write init; |
| 171 %% write exec; | 171 %% write exec; |
| 172 | 172 |
| 173 error_detected: | 173 error_detected: |
| 174 return result; | 174 return result; |
| 175 } | 175 } |
| OLD | NEW |