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