decoder.hh (9375:ecfd5607d5e9) decoder.hh (9377:6f294e7a93d1)
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;

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

30
31#ifndef __ARCH_SPARC_DECODER_HH__
32#define __ARCH_SPARC_DECODER_HH__
33
34#include "arch/generic/decode_cache.hh"
35#include "arch/sparc/registers.hh"
36#include "arch/types.hh"
37#include "cpu/static_inst.hh"
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;

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

30
31#ifndef __ARCH_SPARC_DECODER_HH__
32#define __ARCH_SPARC_DECODER_HH__
33
34#include "arch/generic/decode_cache.hh"
35#include "arch/sparc/registers.hh"
36#include "arch/types.hh"
37#include "cpu/static_inst.hh"
38#include "cpu/thread_context.hh"
39
38
40class ThreadContext;
41
42namespace SparcISA
43{
44
45class Decoder
46{
47 protected:
39namespace SparcISA
40{
41
42class Decoder
43{
44 protected:
48 ThreadContext * tc;
49 // The extended machine instruction being generated
50 ExtMachInst emi;
51 bool instDone;
52 MiscReg asi;
53
54 public:
45 // The extended machine instruction being generated
46 ExtMachInst emi;
47 bool instDone;
48 MiscReg asi;
49
50 public:
55 Decoder(ThreadContext * _tc) : tc(_tc), instDone(false), asi(0)
51 Decoder() : instDone(false), asi(0)
56 {}
57
52 {}
53
58 ThreadContext *
59 getTC()
60 {
61 return tc;
62 }
63
64 void
65 setTC(ThreadContext * _tc)
66 {
67 tc = _tc;
68 }
69
70 void process() {}
71
72 void
73 reset()
74 {
75 instDone = false;
76 }
77

--- 67 unchanged lines hidden ---
54 void process() {}
55
56 void
57 reset()
58 {
59 instDone = false;
60 }
61

--- 67 unchanged lines hidden ---