| OLD | NEW |
| 1 |
| 2 |
| 1 /* | 3 /* |
| 2 * Copyright 2012 The Native Client Authors. All rights reserved. | 4 * Copyright 2012 The Native Client Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can | 5 * Use of this source code is governed by a BSD-style license that can |
| 4 * be found in the LICENSE file. | 6 * be found in the LICENSE file. |
| 5 */ | 7 */ |
| 6 | 8 |
| 7 /* | 9 // DO NOT EDIT: GENERATED CODE |
| 8 * DO NOT EDIT: GENERATED CODE | 10 |
| 9 */ | |
| 10 | 11 |
| 11 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_GEN_ARM32_DECODE_H_ | 12 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_GEN_ARM32_DECODE_H_ |
| 12 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_GEN_ARM32_DECODE_H_ | 13 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_GEN_ARM32_DECODE_H_ |
| 13 | 14 |
| 14 #include "native_client/src/trusted/validator_arm/decode.h" | 15 #include "native_client/src/trusted/validator_arm/decode.h" |
| 16 #include "native_client/src/trusted/validator_arm/inst_classes.h" |
| 15 | 17 |
| 16 namespace nacl_arm_dec { | 18 namespace nacl_arm_dec { |
| 17 | 19 |
| 18 /* | 20 // Defines a decoder class selector for instructions. |
| 19 * Defines a stateless decoder class selector for instructions | |
| 20 */ | |
| 21 /* | |
| 22 * Define the class decoders used by this decoder state. | |
| 23 */ | |
| 24 class Arm32DecoderState : DecoderState { | 21 class Arm32DecoderState : DecoderState { |
| 25 public: | 22 public: |
| 26 // Generates an instance of a decoder state. | 23 explicit Arm32DecoderState(); |
| 27 explicit Arm32DecoderState(); | 24 virtual ~Arm32DecoderState(); |
| 28 virtual ~Arm32DecoderState(); | 25 |
| 29 | 26 // Parses the given instruction, returning the decoder to use. |
| 30 // Parses the given instruction, returning the decoder to use. | 27 virtual const ClassDecoder& decode(const Instruction) const; |
| 31 virtual const class ClassDecoder &decode(const Instruction) const; | 28 |
| 32 | |
| 33 // Define the decoders to use in this decoder state | |
| 34 CoprocessorOp CoprocessorOp_instance_; | |
| 35 ImmediateBic ImmediateBic_instance_; | |
| 36 LoadMultiple LoadMultiple_instance_; | |
| 37 LoadCoprocessor LoadCoprocessor_instance_; | |
| 38 LoadDoubleExclusive LoadDoubleExclusive_instance_; | |
| 39 Branch Branch_instance_; | |
| 40 Test Test_instance_; | |
| 41 StoreRegister StoreRegister_instance_; | |
| 42 MoveDoubleFromCoprocessor MoveDoubleFromCoprocessor_instance_; | |
| 43 TestImmediate TestImmediate_instance_; | |
| 44 BxBlx BxBlx_instance_; | |
| 45 EffectiveNoOp EffectiveNoOp_instance_; | |
| 46 LongMultiply LongMultiply_instance_; | |
| 47 Binary4RegisterShiftedOp Binary4RegisterShiftedOp_instance_; | |
| 48 Breakpoint Breakpoint_instance_; | |
| 49 Multiply Multiply_instance_; | |
| 50 PackSatRev PackSatRev_instance_; | |
| 51 LoadExclusive LoadExclusive_instance_; | |
| 52 VectorStore VectorStore_instance_; | |
| 53 Unary3RegisterShiftedOp Unary3RegisterShiftedOp_instance_; | |
| 54 Undefined Undefined_instance_; | |
| 55 DataProc DataProc_instance_; | |
| 56 Deprecated Deprecated_instance_; | |
| 57 LoadImmediate LoadImmediate_instance_; | |
| 58 StoreCoprocessor StoreCoprocessor_instance_; | |
| 59 Roadblock Roadblock_instance_; | |
| 60 LoadDoubleR LoadDoubleR_instance_; | |
| 61 StoreExclusive StoreExclusive_instance_; | |
| 62 StoreImmediate StoreImmediate_instance_; | |
| 63 MoveFromCoprocessor MoveFromCoprocessor_instance_; | |
| 64 LoadRegister LoadRegister_instance_; | |
| 65 LoadDoubleI LoadDoubleI_instance_; | |
| 66 Binary3RegisterShiftedTest Binary3RegisterShiftedTest_instance_; | |
| 67 Unpredictable Unpredictable_instance_; | |
| 68 Forbidden Forbidden_instance_; | |
| 69 VectorLoad VectorLoad_instance_; | |
| 70 MoveToStatusRegister MoveToStatusRegister_instance_; | |
| 71 SatAddSub SatAddSub_instance_; | |
| 72 | |
| 73 private: | 29 private: |
| 74 // Don't allow the following! | 30 |
| 75 explicit Arm32DecoderState(const Arm32DecoderState&); | 31 // The following list of methods correspond to each decoder table, |
| 76 void operator=(const Arm32DecoderState&); | 32 // and implements the pattern matching of the corresponding bit |
| 33 // patterns. After matching the corresponding bit patterns, they |
| 34 // either call other methods in this list (corresponding to another |
| 35 // decoder table), or they return the instance field that implements |
| 36 // the class decoder that should be used to decode the particular |
| 37 // instruction. |
| 38 |
| 39 inline const ClassDecoder& decode_ARMv7( |
| 40 const Instruction insn) const; |
| 41 |
| 42 inline const ClassDecoder& decode_branch_block_xfer( |
| 43 const Instruction insn) const; |
| 44 |
| 45 inline const ClassDecoder& decode_dp_immed( |
| 46 const Instruction insn) const; |
| 47 |
| 48 inline const ClassDecoder& decode_dp_misc( |
| 49 const Instruction insn) const; |
| 50 |
| 51 inline const ClassDecoder& decode_dp_reg( |
| 52 const Instruction insn) const; |
| 53 |
| 54 inline const ClassDecoder& decode_dp_reg_shifted( |
| 55 const Instruction insn) const; |
| 56 |
| 57 inline const ClassDecoder& decode_extra_load_store( |
| 58 const Instruction insn) const; |
| 59 |
| 60 inline const ClassDecoder& decode_half_mult( |
| 61 const Instruction insn) const; |
| 62 |
| 63 inline const ClassDecoder& decode_load_store_word_byte( |
| 64 const Instruction insn) const; |
| 65 |
| 66 inline const ClassDecoder& decode_media( |
| 67 const Instruction insn) const; |
| 68 |
| 69 inline const ClassDecoder& decode_misc( |
| 70 const Instruction insn) const; |
| 71 |
| 72 inline const ClassDecoder& decode_misc_hints_simd( |
| 73 const Instruction insn) const; |
| 74 |
| 75 inline const ClassDecoder& decode_msr_and_hints( |
| 76 const Instruction insn) const; |
| 77 |
| 78 inline const ClassDecoder& decode_mult( |
| 79 const Instruction insn) const; |
| 80 |
| 81 inline const ClassDecoder& decode_pack_sat_rev( |
| 82 const Instruction insn) const; |
| 83 |
| 84 inline const ClassDecoder& decode_parallel_add_sub( |
| 85 const Instruction insn) const; |
| 86 |
| 87 inline const ClassDecoder& decode_sat_add_sub( |
| 88 const Instruction insn) const; |
| 89 |
| 90 inline const ClassDecoder& decode_signed_mult( |
| 91 const Instruction insn) const; |
| 92 |
| 93 inline const ClassDecoder& decode_simd_dp( |
| 94 const Instruction insn) const; |
| 95 |
| 96 inline const ClassDecoder& decode_simd_dp_1imm( |
| 97 const Instruction insn) const; |
| 98 |
| 99 inline const ClassDecoder& decode_simd_dp_2misc( |
| 100 const Instruction insn) const; |
| 101 |
| 102 inline const ClassDecoder& decode_simd_dp_2scalar( |
| 103 const Instruction insn) const; |
| 104 |
| 105 inline const ClassDecoder& decode_simd_dp_2shift( |
| 106 const Instruction insn) const; |
| 107 |
| 108 inline const ClassDecoder& decode_simd_dp_3diff( |
| 109 const Instruction insn) const; |
| 110 |
| 111 inline const ClassDecoder& decode_simd_dp_3same( |
| 112 const Instruction insn) const; |
| 113 |
| 114 inline const ClassDecoder& decode_simd_load_store( |
| 115 const Instruction insn) const; |
| 116 |
| 117 inline const ClassDecoder& decode_simd_load_store_l0( |
| 118 const Instruction insn) const; |
| 119 |
| 120 inline const ClassDecoder& decode_simd_load_store_l1( |
| 121 const Instruction insn) const; |
| 122 |
| 123 inline const ClassDecoder& decode_super_cop( |
| 124 const Instruction insn) const; |
| 125 |
| 126 inline const ClassDecoder& decode_sync( |
| 127 const Instruction insn) const; |
| 128 |
| 129 inline const ClassDecoder& decode_unconditional( |
| 130 const Instruction insn) const; |
| 131 |
| 132 // The following fields define the set of class decoders |
| 133 // that can be returned by the API function "decode". They |
| 134 // are created once as instance fields, and then returned |
| 135 // by the table methods above. This speeds up the code since |
| 136 // the class decoders need to only be built once (and reused |
| 137 // for each call to "decode"). |
| 138 |
| 139 const Binary3RegisterShiftedTest Binary3RegisterShiftedTest_instance_; |
| 140 |
| 141 const Binary4RegisterShiftedOp Binary4RegisterShiftedOp_instance_; |
| 142 |
| 143 const Branch Branch_instance_; |
| 144 |
| 145 const Breakpoint Breakpoint_instance_; |
| 146 |
| 147 const BxBlx BxBlx_instance_; |
| 148 |
| 149 const CoprocessorOp CoprocessorOp_instance_; |
| 150 |
| 151 const DataProc DataProc_instance_; |
| 152 |
| 153 const Deprecated Deprecated_instance_; |
| 154 |
| 155 const EffectiveNoOp EffectiveNoOp_instance_; |
| 156 |
| 157 const Forbidden Forbidden_instance_; |
| 158 |
| 159 const ImmediateBic ImmediateBic_instance_; |
| 160 |
| 161 const LoadCoprocessor LoadCoprocessor_instance_; |
| 162 |
| 163 const LoadDoubleExclusive LoadDoubleExclusive_instance_; |
| 164 |
| 165 const LoadDoubleI LoadDoubleI_instance_; |
| 166 |
| 167 const LoadDoubleR LoadDoubleR_instance_; |
| 168 |
| 169 const LoadExclusive LoadExclusive_instance_; |
| 170 |
| 171 const LoadImmediate LoadImmediate_instance_; |
| 172 |
| 173 const LoadMultiple LoadMultiple_instance_; |
| 174 |
| 175 const LoadRegister LoadRegister_instance_; |
| 176 |
| 177 const LongMultiply LongMultiply_instance_; |
| 178 |
| 179 const MoveDoubleFromCoprocessor MoveDoubleFromCoprocessor_instance_; |
| 180 |
| 181 const MoveFromCoprocessor MoveFromCoprocessor_instance_; |
| 182 |
| 183 const MoveToStatusRegister MoveToStatusRegister_instance_; |
| 184 |
| 185 const Multiply Multiply_instance_; |
| 186 |
| 187 const PackSatRev PackSatRev_instance_; |
| 188 |
| 189 const Roadblock Roadblock_instance_; |
| 190 |
| 191 const SatAddSub SatAddSub_instance_; |
| 192 |
| 193 const StoreCoprocessor StoreCoprocessor_instance_; |
| 194 |
| 195 const StoreExclusive StoreExclusive_instance_; |
| 196 |
| 197 const StoreImmediate StoreImmediate_instance_; |
| 198 |
| 199 const StoreRegister StoreRegister_instance_; |
| 200 |
| 201 const Test Test_instance_; |
| 202 |
| 203 const TestImmediate TestImmediate_instance_; |
| 204 |
| 205 const Unary3RegisterShiftedOp Unary3RegisterShiftedOp_instance_; |
| 206 |
| 207 const Undefined Undefined_instance_; |
| 208 |
| 209 const Unpredictable Unpredictable_instance_; |
| 210 |
| 211 const VectorLoad VectorLoad_instance_; |
| 212 |
| 213 const VectorStore VectorStore_instance_; |
| 214 |
| 77 }; | 215 }; |
| 78 | 216 |
| 79 } // namespace | 217 } // namespace nacl_arm_dec |
| 80 #endif // NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_GEN_ARM32_DECODE_H_ | 218 #endif // NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_GEN_ARM32_DECODE_H_ |
| OLD | NEW |