| OLD | NEW |
| 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 * ragel_tester.c | 8 * ragel_tester.c |
| 9 * Implements a ragel decoder that can be used as a NaClEnumeratorDecoder. | 9 * Implements a ragel decoder that can be used as a NaClEnumeratorDecoder. |
| 10 */ | 10 */ |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 71 |
| 72 Bool RagelValidateError(const uint8_t *begin, const uint8_t *end, | 72 Bool RagelValidateError(const uint8_t *begin, const uint8_t *end, |
| 73 uint32_t error, void *callback_data) { | 73 uint32_t error, void *callback_data) { |
| 74 UNREFERENCED_PARAMETER(begin); | 74 UNREFERENCED_PARAMETER(begin); |
| 75 UNREFERENCED_PARAMETER(end); | 75 UNREFERENCED_PARAMETER(end); |
| 76 UNREFERENCED_PARAMETER(callback_data); | 76 UNREFERENCED_PARAMETER(callback_data); |
| 77 if (error & (UNRECOGNIZED_INSTRUCTION | | 77 if (error & (UNRECOGNIZED_INSTRUCTION | |
| 78 CPUID_UNSUPPORTED_INSTRUCTION | | 78 CPUID_UNSUPPORTED_INSTRUCTION | |
| 79 FORBIDDEN_BASE_REGISTER | | 79 FORBIDDEN_BASE_REGISTER | |
| 80 UNRESTRICTED_INDEX_REGISTER | | 80 UNRESTRICTED_INDEX_REGISTER | |
| 81 R15_MODIFIED | BPL_MODIFIED | SPL_MODIFIED | | 81 R15_MODIFIED | BP_MODIFIED | SP_MODIFIED | |
| 82 UNRESTRICTED_RBP_PROCESSED | UNRESTRICTED_RSP_PROCESSED | | 82 UNRESTRICTED_RBP_PROCESSED | UNRESTRICTED_RSP_PROCESSED | |
| 83 RESTRICTED_RSP_UNPROCESSED | RESTRICTED_RBP_UNPROCESSED)) { | 83 RESTRICTED_RSP_UNPROCESSED | RESTRICTED_RBP_UNPROCESSED)) { |
| 84 return FALSE; | 84 return FALSE; |
| 85 } else { | 85 } else { |
| 86 return TRUE; | 86 return TRUE; |
| 87 } | 87 } |
| 88 } | 88 } |
| 89 | 89 |
| 90 void RagelInstruction(const uint8_t *begin, const uint8_t *end, | 90 void RagelInstruction(const uint8_t *begin, const uint8_t *end, |
| 91 struct Instruction *instruction, void *userdata) { | 91 struct Instruction *instruction, void *userdata) { |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 ragel_decoder._base._install_flag_fn = InstallFlag; | 209 ragel_decoder._base._install_flag_fn = InstallFlag; |
| 210 ragel_decoder._base._get_inst_mnemonic_fn = RGetInstMnemonic; | 210 ragel_decoder._base._get_inst_mnemonic_fn = RGetInstMnemonic; |
| 211 ragel_decoder._base._get_inst_num_operands_fn = NULL; | 211 ragel_decoder._base._get_inst_num_operands_fn = NULL; |
| 212 ragel_decoder._base._get_inst_operands_text_fn = NULL; | 212 ragel_decoder._base._get_inst_operands_text_fn = NULL; |
| 213 ragel_decoder._base._writes_to_reserved_reg_fn = NULL; | 213 ragel_decoder._base._writes_to_reserved_reg_fn = NULL; |
| 214 ragel_decoder._base._maybe_inst_validates_fn = RIsInstValid; | 214 ragel_decoder._base._maybe_inst_validates_fn = RIsInstValid; |
| 215 ragel_decoder._base._segment_validates_fn = NULL; | 215 ragel_decoder._base._segment_validates_fn = NULL; |
| 216 ragel_decoder._base._usage_message = "Runs ragel to decode instructions."; | 216 ragel_decoder._base._usage_message = "Runs ragel to decode instructions."; |
| 217 return &ragel_decoder._base; | 217 return &ragel_decoder._base; |
| 218 } | 218 } |
| OLD | NEW |