Chromium Code Reviews| Index: src/trusted/validator_arm/gen/arm32_decode.h |
| =================================================================== |
| --- src/trusted/validator_arm/gen/arm32_decode.h (revision 8275) |
| +++ src/trusted/validator_arm/gen/arm32_decode.h (working copy) |
| @@ -1,3 +1,5 @@ |
| + |
| + |
| /* |
| * Copyright 2012 The Native Client Authors. All rights reserved. |
| * Use of this source code is governed by a BSD-style license that can |
| @@ -4,77 +6,198 @@ |
| * be found in the LICENSE file. |
| */ |
| -/* |
| - * DO NOT EDIT: GENERATED CODE |
| - */ |
| +// DO NOT EDIT: GENERATED CODE |
| + |
| #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_GEN_ARM32_DECODE_H_ |
| #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_GEN_ARM32_DECODE_H_ |
| #include "native_client/src/trusted/validator_arm/decode.h" |
| +#include "native_client/src/trusted/validator_arm/inst_classes.h" |
| namespace nacl_arm_dec { |
| -/* |
| - * Defines a stateless decoder class selector for instructions |
| - */ |
| -/* |
| - * Define the class decoders used by this decoder state. |
| - */ |
| +// Defines a stateless decoder class selector for instructions. |
| class Arm32DecoderState : DecoderState { |
| public: |
| - // Generates an instance of a decoder state. |
| - explicit Arm32DecoderState(); |
| - virtual ~Arm32DecoderState(); |
| - |
| - // Parses the given instruction, returning the decoder to use. |
| - virtual const class ClassDecoder &decode(const Instruction) const; |
| - |
| - // Define the decoders to use in this decoder state |
| + explicit Arm32DecoderState(); |
| + virtual ~Arm32DecoderState(); |
| + |
| + // Parses the given instruction, returning the decoder to use. |
| + virtual const ClassDecoder& decode(const Instruction) const; |
| + |
| + private: |
| + |
| + inline const ClassDecoder& decode_ARMv7( |
|
robertm
2012/04/17 17:12:19
can these be static?
Karl
2012/04/17 19:28:31
The need to refer to the instance fields, which ar
|
| + const Instruction insn) const; |
| + |
| + inline const ClassDecoder& decode_branch_block_xfer( |
| + const Instruction insn) const; |
| + |
| + inline const ClassDecoder& decode_dp_immed( |
| + const Instruction insn) const; |
| + |
| + inline const ClassDecoder& decode_dp_misc( |
| + const Instruction insn) const; |
| + |
| + inline const ClassDecoder& decode_dp_reg( |
| + const Instruction insn) const; |
| + |
| + inline const ClassDecoder& decode_dp_reg_shifted( |
| + const Instruction insn) const; |
| + |
| + inline const ClassDecoder& decode_extra_load_store( |
| + const Instruction insn) const; |
| + |
| + inline const ClassDecoder& decode_half_mult( |
| + const Instruction insn) const; |
| + |
| + inline const ClassDecoder& decode_load_store_word_byte( |
| + const Instruction insn) const; |
| + |
| + inline const ClassDecoder& decode_media( |
| + const Instruction insn) const; |
| + |
| + inline const ClassDecoder& decode_misc( |
| + const Instruction insn) const; |
| + |
| + inline const ClassDecoder& decode_misc_hints_simd( |
| + const Instruction insn) const; |
| + |
| + inline const ClassDecoder& decode_msr_and_hints( |
| + const Instruction insn) const; |
| + |
| + inline const ClassDecoder& decode_mult( |
| + const Instruction insn) const; |
| + |
| + inline const ClassDecoder& decode_pack_sat_rev( |
| + const Instruction insn) const; |
| + |
| + inline const ClassDecoder& decode_parallel_add_sub( |
| + const Instruction insn) const; |
| + |
| + inline const ClassDecoder& decode_sat_add_sub( |
| + const Instruction insn) const; |
| + |
| + inline const ClassDecoder& decode_signed_mult( |
| + const Instruction insn) const; |
| + |
| + inline const ClassDecoder& decode_simd_dp( |
| + const Instruction insn) const; |
| + |
| + inline const ClassDecoder& decode_simd_dp_1imm( |
| + const Instruction insn) const; |
| + |
| + inline const ClassDecoder& decode_simd_dp_2misc( |
| + const Instruction insn) const; |
| + |
| + inline const ClassDecoder& decode_simd_dp_2scalar( |
| + const Instruction insn) const; |
| + |
| + inline const ClassDecoder& decode_simd_dp_2shift( |
| + const Instruction insn) const; |
| + |
| + inline const ClassDecoder& decode_simd_dp_3diff( |
| + const Instruction insn) const; |
| + |
| + inline const ClassDecoder& decode_simd_dp_3same( |
| + const Instruction insn) const; |
| + |
| + inline const ClassDecoder& decode_simd_load_store( |
| + const Instruction insn) const; |
| + |
| + inline const ClassDecoder& decode_simd_load_store_l0( |
| + const Instruction insn) const; |
| + |
| + inline const ClassDecoder& decode_simd_load_store_l1( |
| + const Instruction insn) const; |
| + |
| + inline const ClassDecoder& decode_super_cop( |
| + const Instruction insn) const; |
| + |
| + inline const ClassDecoder& decode_sync( |
| + const Instruction insn) const; |
| + |
| + inline const ClassDecoder& decode_unconditional( |
| + const Instruction insn) const; |
| + |
| + Binary3RegisterShiftedTest Binary3RegisterShiftedTest_instance_; |
|
robertm
2012/04/17 17:12:19
add high level comment about instance variables
Karl
2012/04/17 19:28:31
Done.
|
| + |
| + Binary4RegisterShiftedOp Binary4RegisterShiftedOp_instance_; |
| + |
| + Branch Branch_instance_; |
| + |
| + Breakpoint Breakpoint_instance_; |
| + |
| + BxBlx BxBlx_instance_; |
| + |
| CoprocessorOp CoprocessorOp_instance_; |
| + |
| + DataProc DataProc_instance_; |
| + |
| + Deprecated Deprecated_instance_; |
| + |
| + EffectiveNoOp EffectiveNoOp_instance_; |
| + |
| + Forbidden Forbidden_instance_; |
| + |
| ImmediateBic ImmediateBic_instance_; |
| - LoadMultiple LoadMultiple_instance_; |
| + |
| LoadCoprocessor LoadCoprocessor_instance_; |
| + |
| LoadDoubleExclusive LoadDoubleExclusive_instance_; |
| - Branch Branch_instance_; |
| - Test Test_instance_; |
| - StoreRegister StoreRegister_instance_; |
| + |
| + LoadDoubleI LoadDoubleI_instance_; |
| + |
| + LoadDoubleR LoadDoubleR_instance_; |
| + |
| + LoadExclusive LoadExclusive_instance_; |
| + |
| + LoadImmediate LoadImmediate_instance_; |
| + |
| + LoadMultiple LoadMultiple_instance_; |
| + |
| + LoadRegister LoadRegister_instance_; |
| + |
| + LongMultiply LongMultiply_instance_; |
| + |
| MoveDoubleFromCoprocessor MoveDoubleFromCoprocessor_instance_; |
| - TestImmediate TestImmediate_instance_; |
| - BxBlx BxBlx_instance_; |
| - EffectiveNoOp EffectiveNoOp_instance_; |
| - LongMultiply LongMultiply_instance_; |
| - Binary4RegisterShiftedOp Binary4RegisterShiftedOp_instance_; |
| - Breakpoint Breakpoint_instance_; |
| + |
| + MoveFromCoprocessor MoveFromCoprocessor_instance_; |
| + |
| + MoveToStatusRegister MoveToStatusRegister_instance_; |
| + |
| Multiply Multiply_instance_; |
| + |
| PackSatRev PackSatRev_instance_; |
| - LoadExclusive LoadExclusive_instance_; |
| - VectorStore VectorStore_instance_; |
| - Unary3RegisterShiftedOp Unary3RegisterShiftedOp_instance_; |
| - Undefined Undefined_instance_; |
| - DataProc DataProc_instance_; |
| - Deprecated Deprecated_instance_; |
| - LoadImmediate LoadImmediate_instance_; |
| + |
| + Roadblock Roadblock_instance_; |
| + |
| + SatAddSub SatAddSub_instance_; |
| + |
| StoreCoprocessor StoreCoprocessor_instance_; |
| - Roadblock Roadblock_instance_; |
| - LoadDoubleR LoadDoubleR_instance_; |
| + |
| StoreExclusive StoreExclusive_instance_; |
| + |
| StoreImmediate StoreImmediate_instance_; |
| - MoveFromCoprocessor MoveFromCoprocessor_instance_; |
| - LoadRegister LoadRegister_instance_; |
| - LoadDoubleI LoadDoubleI_instance_; |
| - Binary3RegisterShiftedTest Binary3RegisterShiftedTest_instance_; |
| + |
| + StoreRegister StoreRegister_instance_; |
| + |
| + Test Test_instance_; |
| + |
| + TestImmediate TestImmediate_instance_; |
| + |
| + Unary3RegisterShiftedOp Unary3RegisterShiftedOp_instance_; |
| + |
| + Undefined Undefined_instance_; |
| + |
| Unpredictable Unpredictable_instance_; |
| - Forbidden Forbidden_instance_; |
| + |
| VectorLoad VectorLoad_instance_; |
| - MoveToStatusRegister MoveToStatusRegister_instance_; |
| - SatAddSub SatAddSub_instance_; |
| - |
| - private: |
| - // Don't allow the following! |
| - explicit Arm32DecoderState(const Arm32DecoderState&); |
| - void operator=(const Arm32DecoderState&); |
| + |
| + VectorStore VectorStore_instance_; |
| + |
| }; |
| -} // namespace |
| +} // namespace nacl_arm_dec |
| #endif // NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_GEN_ARM32_DECODE_H_ |