1/* 2 * Copyright (c) 2010 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 --- 189 unchanged lines hidden (view full) --- 198 199 enum FlagBits { 200 ThumbBit = (1 << 0), 201 JazelleBit = (1 << 1) 202 }; 203 uint8_t flags; 204 uint8_t nextFlags; 205 uint8_t forcedItStateValue; |
206 uint8_t _size; |
207 bool forcedItStateValid; 208 public: 209 PCState() : flags(0), nextFlags(0), forcedItStateValue(0), forcedItStateValid(false) 210 {} 211 212 void 213 set(Addr val) 214 { --- 29 unchanged lines hidden (view full) --- 244 nextThumb(bool val) 245 { 246 if (val) 247 nextFlags |= ThumbBit; 248 else 249 nextFlags &= ~ThumbBit; 250 } 251 |
252 void size(uint8_t s) { _size = s; } 253 uint8_t size() const { return _size; } 254 |
255 bool |
256 branching() const 257 { 258 return ((this->pc() + this->size()) != this->npc()); 259 } 260 261 262 bool |
263 jazelle() const 264 { 265 return flags & JazelleBit; 266 } 267 268 void 269 jazelle(bool val) 270 { --- 127 unchanged lines hidden (view full) --- 398 flags == opc.flags && nextFlags == opc.nextFlags; 399 } 400 401 void 402 serialize(std::ostream &os) 403 { 404 Base::serialize(os); 405 SERIALIZE_SCALAR(flags); |
406 SERIALIZE_SCALAR(_size); |
407 SERIALIZE_SCALAR(nextFlags); 408 SERIALIZE_SCALAR(forcedItStateValue); 409 SERIALIZE_SCALAR(forcedItStateValid); 410 } 411 412 void 413 unserialize(Checkpoint *cp, const std::string §ion) 414 { 415 Base::unserialize(cp, section); 416 UNSERIALIZE_SCALAR(flags); |
417 UNSERIALIZE_SCALAR(_size); |
418 UNSERIALIZE_SCALAR(nextFlags); 419 UNSERIALIZE_SCALAR(forcedItStateValue); 420 UNSERIALIZE_SCALAR(forcedItStateValid); 421 } 422 }; 423 424 // Shift types for ARM instructions 425 enum ArmShiftType { --- 90 unchanged lines hidden --- |