Deleted Added
sdiff udiff text old ( 12732:c8b4f25eea9b ) new ( 12763:37c243ed1112 )
full compact
1/*
2 * Copyright (c) 2010, 2012-2013, 2017 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated

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

65 // Bitfields for moving to/from CPSR
66 Bitfield<7, 2> top6;
67 Bitfield<1, 0> bottom2;
68 EndBitUnion(ITSTATE)
69
70 BitUnion64(ExtMachInst)
71 // Decoder state
72 Bitfield<63, 62> decoderFault; // See DecoderFault
73
74 // ITSTATE bits
75 Bitfield<55, 48> itstate;
76 Bitfield<55, 52> itstateCond;
77 Bitfield<51, 48> itstateMask;
78
79 // FPSCR fields
80 Bitfield<41, 40> fpscrStride;

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

213
214 typedef GenericISA::UPCState<MachInst> Base;
215
216 enum FlagBits {
217 ThumbBit = (1 << 0),
218 JazelleBit = (1 << 1),
219 AArch64Bit = (1 << 2)
220 };
221 uint8_t flags;
222 uint8_t nextFlags;
223 uint8_t _itstate;
224 uint8_t _nextItstate;
225 uint8_t _size;
226 public:
227 PCState() : flags(0), nextFlags(0), _itstate(0), _nextItstate(0),
228 _size(0)
229 {}
230
231 void
232 set(Addr val)
233 {
234 Base::set(val);
235 npc(val + (thumb() ? 2 : 4));
236 }
237
238 PCState(Addr val) : flags(0), nextFlags(0), _itstate(0),
239 _nextItstate(0), _size(0)
240 { set(val); }
241
242 bool
243 thumb() const
244 {
245 return flags & ThumbBit;
246 }
247
248 void
249 thumb(bool val)
250 {

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

467 instNPC(val);
468 }
469
470 bool
471 operator == (const PCState &opc) const
472 {
473 return Base::operator == (opc) &&
474 flags == opc.flags && nextFlags == opc.nextFlags &&
475 _itstate == opc._itstate && _nextItstate == opc._nextItstate;
476 }
477
478 bool
479 operator != (const PCState &opc) const
480 {
481 return !(*this == opc);
482 }
483
484 void
485 serialize(CheckpointOut &cp) const override
486 {
487 Base::serialize(cp);
488 SERIALIZE_SCALAR(flags);
489 SERIALIZE_SCALAR(_size);
490 SERIALIZE_SCALAR(nextFlags);
491 SERIALIZE_SCALAR(_itstate);
492 SERIALIZE_SCALAR(_nextItstate);
493 }
494
495 void
496 unserialize(CheckpointIn &cp) override
497 {
498 Base::unserialize(cp);
499 UNSERIALIZE_SCALAR(flags);
500 UNSERIALIZE_SCALAR(_size);
501 UNSERIALIZE_SCALAR(nextFlags);
502 UNSERIALIZE_SCALAR(_itstate);
503 UNSERIALIZE_SCALAR(_nextItstate);
504 }
505 };
506
507 // Shift types for ARM instructions
508 enum ArmShiftType {
509 LSL = 0,
510 LSR,
511 ASR,

--- 230 unchanged lines hidden ---