Go to the documentation of this file.
41 #ifndef __ARCH_ARM_TYPES_HH__
42 #define __ARCH_ARM_TYPES_HH__
48 #include "debug/Decoder.hh"
132 Bitfield<24> prepost;
222 JazelleBit = (1 << 1),
223 AArch64Bit = (1 << 2)
229 uint8_t _nextItstate;
238 PCState() : flags(0), nextFlags(0), _itstate(0), _nextItstate(0),
239 _size(0), _illegalExec(
false), _debugStep(
false),
251 _nextItstate(0), _size(0), _illegalExec(
false),
252 _debugStep(
false), _stepped(
false)
262 illegalExec(
bool val)
294 return flags & ThumbBit;
309 return nextFlags & ThumbBit;
316 nextFlags |= ThumbBit;
318 nextFlags &= ~ThumbBit;
321 void size(uint8_t
s) { _size =
s; }
322 uint8_t size()
const {
return _size; }
327 return ((this->
pc() + this->size()) != this->npc());
334 return flags & JazelleBit;
343 flags &= ~JazelleBit;
349 return nextFlags & JazelleBit;
353 nextJazelle(
bool val)
356 nextFlags |= JazelleBit;
358 nextFlags &= ~JazelleBit;
364 return flags & AArch64Bit;
373 flags &= ~AArch64Bit;
379 return nextFlags & AArch64Bit;
383 nextAArch64(
bool val)
386 nextFlags |= AArch64Bit;
388 nextFlags &= ~AArch64Bit;
411 nextItstate(uint8_t value)
413 _nextItstate = value;
424 _itstate = _nextItstate;
426 }
else if (_itstate) {
427 ITSTATE it = _itstate;
428 uint8_t cond_mask = it.mask;
429 uint8_t thumb_cond = it.cond;
431 thumb_cond, cond_mask);
433 uint8_t new_bit =
bits(cond_mask, 4);
434 cond_mask &=
mask(4);
440 thumb_cond, cond_mask);
442 it.cond = thumb_cond;
458 return pc() + (
thumb() ? 4 : 8);
470 npc(
val &~
mask(nextThumb() ? 1 : 2));
483 bool thumbEE = (
thumb() && jazelle());
487 if (
bits(newPC, 0)) {
488 newPC = newPC & ~
mask(1);
493 if (
bits(newPC, 0)) {
495 newPC = newPC & ~
mask(1);
496 }
else if (!
bits(newPC, 1)) {
513 if (!
thumb() && !jazelle())
523 flags == opc.flags && nextFlags == opc.nextFlags &&
524 _itstate == opc._itstate &&
525 _nextItstate == opc._nextItstate &&
526 _illegalExec == opc._illegalExec &&
527 _debugStep == opc._debugStep &&
528 _stepped == opc._stepped;
534 return !(*
this == opc);
719 return ((OperatingMode64)(uint8_t)
mode).width == 0;
738 bool aarch32 = ((
mode >> 4) & 1) ? true :
false;
755 panic(
"Invalid operating mode: %d",
mode);
813 "Unsupported max. SVE vector length");
Bitfield< 25, 20 > htopcode9_4
constexpr unsigned MaxSveVecLenInBytes
EndBitUnion(CPSR) BitUnion64(AA64DFR0) Bitfield< 43
Bitfield< 15 > ltopcode15
@ EC_PREFETCH_ABORT_CURR_EL
constexpr unsigned VecRegSizeBytes
void replaceBits(T &val, int first, int last, B bit_val)
A convenience function to replace bits first to last of val with bit_val in place.
SubBitUnion(puswl, 24, 20) Bitfield< 24 > prepost
EndSubBitUnion(puswl) Bitfield< 24
static bool operator==(const ExtMachInst &emi1, const ExtMachInst &emi2)
static bool opModeIsT(OperatingMode mode)
Bitfield< 11, 7 > shiftSize
static bool opModeIsH(OperatingMode mode)
Bitfield< 59, 56 > sveLen
DecoderFault
Instruction decoder fault codes in ExtMachInst.
#define UNSERIALIZE_SCALAR(scalar)
Bitfield< 21, 20 > htopcode5_4
Bitfield< 7, 6 > ltopcode7_6
Bitfield< 9, 6 > topcode9_6
Bitfield< 3, 0 > topcode3_0
constexpr unsigned MaxSveVecLenInBits
Bitfield< 22, 21 > htopcode6_5
Bitfield< 11, 0 > immed11_0
Bitfield< 25, 21 > htopcode9_5
void serialize(const ThreadContext &tc, CheckpointOut &cp)
Thread context serialization helpers.
@ EC_TRAPPED_CP15_MCRR_MRRC
Bitfield< 51, 48 > itstateMask
constexpr unsigned MaxSveVecLenInWords
@ EC_SOFTWARE_BREAKPOINT_64
Bitfield< 3, 0 > immedLo3_0
Bitfield< 24, 22 > htopcode8_6
Bitfield< 12, 10 > topcode12_10
@ EC_PREFETCH_ABORT_LOWER_EL
Bitfield< 26, 25 > htopcode10_9
@ EC_TRAPPED_CP10_MRC_VMRS
Bitfield< 11, 9 > topcode11_9
Bitfield< 31, 28 > condCode
void unserialize(ThreadContext &tc, CheckpointIn &cp)
Bitfield< 23, 21 > opcode23_21
@ EC_SOFTWARE_STEP_CURR_EL
Bitfield< 15, 0 > regList
Bitfield< 23, 0 > immed23_0
Bitfield< 12, 11 > topcode12_11
@ EC_SOFTWARE_STEP_LOWER_EL
@ EC_TRAPPED_CP14_LDC_STC
Bitfield< 24, 21 > htopcode8_5
BitUnion8(ITSTATE) Bitfield< 7
@ EC_HW_BREAKPOINT_CURR_EL
@ EC_PREFETCH_ABORT_TO_HYP
Bitfield< 7, 4 > ltopcode7_4
Bitfield< 41, 40 > fpscrStride
Bitfield< 11, 8 > topcode11_8
constexpr unsigned VecPredRegHasPackedRepr
Bitfield< 19, 16 > opcode19_16
Bitfield< 10, 9 > topcode10_9
Bitfield< 15, 13 > topcode15_13
Bitfield< 55, 48 > itstate
static ExceptionLevel opModeToEL(OperatingMode mode)
Bitfield< 39, 37 > fpscrLen
Bitfield< 7, 4 > miscOpcode
Bitfield< 25, 24 > htopcode9_8
Bitfield< 7, 6 > topcode7_6
@ EC_PREFETCH_ABORT_FROM_HYP
Bitfield< 33 > sevenAndFour
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Bitfield< 24, 23 > opcode24_23
constexpr unsigned VecPredRegSizeBits
#define SERIALIZE_SCALAR(scalar)
@ EC_TRAPPED_CP15_MCR_MRC
Bitfield< 24, 23 > htopcode8_7
Bitfield< 24, 21 > opcode
GenericISA::DelaySlotUPCState< MachInst > PCState
Bitfield< 11, 8 > ltcoproc
Bitfield< 11, 8 > immedHi11_8
static bool unknownMode32(OperatingMode mode)
Bitfield< 23, 21 > htopcode7_5
constexpr unsigned MaxSveVecLenInDWords
Bitfield< 10, 8 > topcode10_8
bool operator!=(const RefCountingPtr< T > &l, const RefCountingPtr< T > &r)
Check for inequality of two reference counting pointers.
Bitfield< 15, 12 > opcode15_12
@ UNALIGNED
Unaligned instruction fault.
Bitfield< 11, 8 > ltopcode11_8
static bool unknownMode(OperatingMode mode)
Bitfield< 55, 52 > itstateCond
Bitfield< 61 > illegalExecution
Bitfield< 7, 4 > topcode7_4
std::ostream CheckpointOut
@ EC_TRAPPED_CP14_MCR_MRC
BitUnion64(CNTKCTL) Bitfield< 17 > evntis
@ PANIC
Internal gem5 error.
Bitfield< 7, 5 > topcode7_5
Bitfield< 27, 25 > encoding
Bitfield< 24, 20 > mediaOpcode
Bitfield< 13, 11 > topcode13_11
Bitfield< 7, 0 > immed7_0
Bitfield< 28, 27 > htopcode12_11
#define panic(...)
This implements a cprintf based panic() function.
Bitfield< 23, 20 > opcode23_20
@ EC_HW_BREAKPOINT_LOWER_EL
@ EC_TRAPPED_CP14_MCRR_MRRC
T bits(T val, int first, int last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
Generated on Wed Sep 30 2020 14:02:01 for gem5 by doxygen 1.8.17