Deleted Added
sdiff udiff text old ( 9022:bb25e7646c41 ) new ( 9023:e9201a7bce59 )
full compact
1/*
2 * Copyright (c) 2012 Google
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 17 unchanged lines hidden (view full) ---

26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * Authors: Gabe Black
29 */
30
31#ifndef __ARCH_SPARC_DECODER_HH__
32#define __ARCH_SPARC_DECODER_HH__
33
34#include "arch/types.hh"
35#include "cpu/decode_cache.hh"
36#include "cpu/static_inst_fwd.hh"
37
38namespace SparcISA
39{
40
41class Decoder
42{
43 protected:
44 /// A cache of decoded instruction objects.
45 static DecodeCache defaultCache;
46
47 public:
48 StaticInstPtr decodeInst(ExtMachInst mach_inst);
49
50 /// Decode a machine instruction.
51 /// @param mach_inst The binary instruction to decode.
52 /// @retval A pointer to the corresponding StaticInst object.
53 StaticInstPtr
54 decode(ExtMachInst mach_inst, Addr addr)
55 {
56 return defaultCache.decode(this, mach_inst, addr);
57 }
58};
59
60} // namespace SparcISA
61
62#endif // __ARCH_SPARC_DECODER_HH__