decoder.hh (9374:227a38f9d98c) 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;

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

34#include <cassert>
35
36#include "arch/arm/miscregs.hh"
37#include "arch/arm/types.hh"
38#include "arch/generic/decode_cache.hh"
39#include "base/types.hh"
40#include "cpu/static_inst.hh"
41
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;

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

34#include <cassert>
35
36#include "arch/arm/miscregs.hh"
37#include "arch/arm/types.hh"
38#include "arch/generic/decode_cache.hh"
39#include "base/types.hh"
40#include "cpu/static_inst.hh"
41
42class ThreadContext;
43
44namespace ArmISA
45{
46
47class Decoder
48{
49 protected:
42namespace ArmISA
43{
44
45class Decoder
46{
47 protected:
50 ThreadContext * tc;
51 //The extended machine instruction being generated
52 ExtMachInst emi;
53 MachInst data;
54 bool bigThumb;
55 bool instDone;
56 bool outOfBytes;
57 int offset;
58 bool foundIt;

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

67 bigThumb = false;
68 offset = 0;
69 emi = 0;
70 instDone = false;
71 outOfBytes = true;
72 foundIt = false;
73 }
74
48 //The extended machine instruction being generated
49 ExtMachInst emi;
50 MachInst data;
51 bool bigThumb;
52 bool instDone;
53 bool outOfBytes;
54 int offset;
55 bool foundIt;

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

64 bigThumb = false;
65 offset = 0;
66 emi = 0;
67 instDone = false;
68 outOfBytes = true;
69 foundIt = false;
70 }
71
75 Decoder(ThreadContext * _tc) : tc(_tc), data(0),
76 fpscrLen(0), fpscrStride(0)
72 Decoder() : data(0), fpscrLen(0), fpscrStride(0)
77 {
78 reset();
79 }
80
73 {
74 reset();
75 }
76
81 ThreadContext * getTC()
82 {
83 return tc;
84 }
85
86 void
87 setTC(ThreadContext * _tc)
88 {
89 tc = _tc;
90 }
91
92 void process();
93
94 //Use this to give data to the decoder. This should be used
95 //when there is control flow.
96 void moreBytes(const PCState &pc, Addr fetchPC, MachInst inst);
97
98 //Use this to give data to the decoder. This should be used
99 //when instructions are executed in order.

--- 73 unchanged lines hidden ---
77 void process();
78
79 //Use this to give data to the decoder. This should be used
80 //when there is control flow.
81 void moreBytes(const PCState &pc, Addr fetchPC, MachInst inst);
82
83 //Use this to give data to the decoder. This should be used
84 //when instructions are executed in order.

--- 73 unchanged lines hidden ---