types.hh (8075:dc266f3bcae4) | types.hh (8146:18368caa8489) |
---|---|
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; | 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; |
|
206 bool forcedItStateValid; 207 public: 208 PCState() : flags(0), nextFlags(0), forcedItStateValue(0), forcedItStateValid(false) 209 {} 210 211 void 212 set(Addr val) 213 { --- 29 unchanged lines hidden (view full) --- 243 nextThumb(bool val) 244 { 245 if (val) 246 nextFlags |= ThumbBit; 247 else 248 nextFlags &= ~ThumbBit; 249 } 250 | 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 |
|
251 bool | 255 bool |
256 branching() const 257 { 258 return ((this->pc() + this->size()) != this->npc()); 259 } 260 261 262 bool |
|
252 jazelle() const 253 { 254 return flags & JazelleBit; 255 } 256 257 void 258 jazelle(bool val) 259 { --- 127 unchanged lines hidden (view full) --- 387 flags == opc.flags && nextFlags == opc.nextFlags; 388 } 389 390 void 391 serialize(std::ostream &os) 392 { 393 Base::serialize(os); 394 SERIALIZE_SCALAR(flags); | 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); |
|
395 SERIALIZE_SCALAR(nextFlags); 396 SERIALIZE_SCALAR(forcedItStateValue); 397 SERIALIZE_SCALAR(forcedItStateValid); 398 } 399 400 void 401 unserialize(Checkpoint *cp, const std::string §ion) 402 { 403 Base::unserialize(cp, section); 404 UNSERIALIZE_SCALAR(flags); | 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); |
|
405 UNSERIALIZE_SCALAR(nextFlags); 406 UNSERIALIZE_SCALAR(forcedItStateValue); 407 UNSERIALIZE_SCALAR(forcedItStateValid); 408 } 409 }; 410 411 // Shift types for ARM instructions 412 enum ArmShiftType { --- 90 unchanged lines hidden --- | 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 --- |