gem5
v24.0.0.0
Loading...
Searching...
No Matches
arch
power
isa.hh
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2009 The Regents of The University of Michigan
3
* Copyright (c) 2009 The University of Edinburgh
4
* Copyright (c) 2021 IBM Corporation
5
* All rights reserved.
6
*
7
* Redistribution and use in source and binary forms, with or without
8
* modification, are permitted provided that the following conditions are
9
* met: redistributions of source code must retain the above copyright
10
* notice, this list of conditions and the following disclaimer;
11
* redistributions in binary form must reproduce the above copyright
12
* notice, this list of conditions and the following disclaimer in the
13
* documentation and/or other materials provided with the distribution;
14
* neither the name of the copyright holders nor the names of its
15
* contributors may be used to endorse or promote products derived from
16
* this software without specific prior written permission.
17
*
18
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
*/
30
31
#ifndef __ARCH_POWER_ISA_HH__
32
#define __ARCH_POWER_ISA_HH__
33
34
#include "
arch/generic/isa.hh
"
35
#include "
arch/power/pcstate.hh
"
36
#include "
arch/power/regs/misc.hh
"
37
#include "
arch/power/types.hh
"
38
#include "
base/logging.hh
"
39
#include "
cpu/reg_class.hh
"
40
#include "
sim/sim_object.hh
"
41
42
namespace
gem5
43
{
44
45
struct
PowerISAParams;
46
class
ThreadContext;
47
class
Checkpoint;
48
class
EventManager;
49
50
namespace
PowerISA
51
{
52
53
class
ISA
:
public
BaseISA
54
{
55
protected
:
56
RegVal
miscRegs
[
NUM_MISCREGS
];
57
58
public
:
59
PCStateBase
*
60
newPCState
(
Addr
new_inst_addr=0)
const override
61
{
62
return
new
PCState
(new_inst_addr);
63
}
64
65
RegVal
66
readMiscRegNoEffect
(
RegIndex
idx)
const override
67
{
68
fatal
(
"Power does not currently have any misc regs defined\n"
);
69
}
70
71
RegVal
72
readMiscReg
(
RegIndex
idx)
override
73
{
74
fatal
(
"Power does not currently have any misc regs defined\n"
);
75
}
76
77
void
78
setMiscRegNoEffect
(
RegIndex
idx,
RegVal
val
)
override
79
{
80
fatal
(
"Power does not currently have any misc regs defined\n"
);
81
}
82
83
void
84
setMiscReg
(
RegIndex
idx,
RegVal
val
)
override
85
{
86
fatal
(
"Power does not currently have any misc regs defined\n"
);
87
}
88
89
bool
90
inUserMode
()
const override
91
{
92
return
false
;
93
}
94
95
void
copyRegsFrom
(
ThreadContext
*src)
override
;
96
97
using
Params
= PowerISAParams;
98
99
ISA
(
const
Params
&
p
);
100
};
101
102
}
// namespace PowerISA
103
}
// namespace gem5
104
105
#endif
// __ARCH_POWER_ISA_HH__
misc.hh
types.hh
gem5::BaseISA
Definition
isa.hh:59
gem5::PCStateBase
Definition
pcstate.hh:59
gem5::PowerISA::ISA
Definition
isa.hh:54
gem5::PowerISA::ISA::miscRegs
RegVal miscRegs[NUM_MISCREGS]
Definition
isa.hh:56
gem5::PowerISA::ISA::copyRegsFrom
void copyRegsFrom(ThreadContext *src) override
Definition
isa.cc:79
gem5::PowerISA::ISA::Params
PowerISAParams Params
Definition
isa.hh:97
gem5::PowerISA::ISA::readMiscReg
RegVal readMiscReg(RegIndex idx) override
Definition
isa.hh:72
gem5::PowerISA::ISA::newPCState
PCStateBase * newPCState(Addr new_inst_addr=0) const override
Definition
isa.hh:60
gem5::PowerISA::ISA::setMiscRegNoEffect
void setMiscRegNoEffect(RegIndex idx, RegVal val) override
Definition
isa.hh:78
gem5::PowerISA::ISA::setMiscReg
void setMiscReg(RegIndex idx, RegVal val) override
Definition
isa.hh:84
gem5::PowerISA::ISA::readMiscRegNoEffect
RegVal readMiscRegNoEffect(RegIndex idx) const override
Definition
isa.hh:66
gem5::PowerISA::ISA::inUserMode
bool inUserMode() const override
Definition
isa.hh:90
gem5::PowerISA::ISA::ISA
ISA(const Params &p)
Definition
isa.cc:65
gem5::ThreadContext
ThreadContext is the external interface to all thread state for anything outside of the CPU.
Definition
guest_abi.test.cc:41
isa.hh
fatal
#define fatal(...)
This implements a cprintf based fatal() function.
Definition
logging.hh:200
logging.hh
gem5::MipsISA::PCState
GenericISA::DelaySlotPCState< 4 > PCState
Definition
pcstate.hh:40
gem5::MipsISA::p
Bitfield< 0 > p
Definition
pra_constants.hh:326
gem5::PowerISA::NUM_MISCREGS
@ NUM_MISCREGS
Definition
misc.hh:45
gem5::X86ISA::val
Bitfield< 63 > val
Definition
misc.hh:804
gem5
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Definition
binary32.hh:36
gem5::RegIndex
uint16_t RegIndex
Definition
types.hh:176
gem5::RegVal
uint64_t RegVal
Definition
types.hh:173
gem5::Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition
types.hh:147
pcstate.hh
reg_class.hh
sim_object.hh
Generated on Tue Jun 18 2024 16:23:57 for gem5 by
doxygen
1.11.0