Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / native_client / src / trusted / validator_arm / decode.h
1 /*
2  * Copyright 2012 The Native Client Authors. All rights reserved.
3  * Use of this source code is governed by a BSD-style license that can be
4  * found in the LICENSE file.
5  */
6
7 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_V2_DECODE_H
8 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_V2_DECODE_H
9
10 #include "native_client/src/trusted/validator_arm/model.h"
11 #include "native_client/src/trusted/validator_arm/inst_classes.h"
12
13 namespace nacl_arm_dec {
14
15 // Models a arm instruction parser that returns the decoder to use
16 // to decode an instruction.
17 struct DecoderState {
18   explicit DecoderState() {}
19   virtual ~DecoderState() {}
20
21   // Parses the given instruction, returning the decoder to use.
22   virtual const class ClassDecoder &decode(const Instruction) const = 0;
23 };
24
25 }  // namespace
26
27 #endif  // NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_V2_DECODE_H