types.hh (10905:a6ca6831e775) | types.hh (11168:f98eb2da15a4) |
---|---|
1/* 2 * Copyright (c) 2010 Gabe Black 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 91 unchanged lines hidden (view full) --- 100 101 bool 102 operator != (const PCStateBase &opc) const 103 { 104 return !(*this == opc); 105 } 106 107 void | 1/* 2 * Copyright (c) 2010 Gabe Black 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 91 unchanged lines hidden (view full) --- 100 101 bool 102 operator != (const PCStateBase &opc) const 103 { 104 return !(*this == opc); 105 } 106 107 void |
108 serialize(CheckpointOut &cp) const M5_ATTR_OVERRIDE | 108 serialize(CheckpointOut &cp) const override |
109 { 110 SERIALIZE_SCALAR(_pc); 111 SERIALIZE_SCALAR(_npc); 112 } 113 114 void | 109 { 110 SERIALIZE_SCALAR(_pc); 111 SERIALIZE_SCALAR(_npc); 112 } 113 114 void |
115 unserialize(CheckpointIn &cp) M5_ATTR_OVERRIDE | 115 unserialize(CheckpointIn &cp) override |
116 { 117 UNSERIALIZE_SCALAR(_pc); 118 UNSERIALIZE_SCALAR(_npc); 119 } 120}; 121 122 123/* --- 119 unchanged lines hidden (view full) --- 243 244 bool 245 operator != (const UPCState<MachInst> &opc) const 246 { 247 return !(*this == opc); 248 } 249 250 void | 116 { 117 UNSERIALIZE_SCALAR(_pc); 118 UNSERIALIZE_SCALAR(_npc); 119 } 120}; 121 122 123/* --- 119 unchanged lines hidden (view full) --- 243 244 bool 245 operator != (const UPCState<MachInst> &opc) const 246 { 247 return !(*this == opc); 248 } 249 250 void |
251 serialize(CheckpointOut &cp) const M5_ATTR_OVERRIDE | 251 serialize(CheckpointOut &cp) const override |
252 { 253 Base::serialize(cp); 254 SERIALIZE_SCALAR(_upc); 255 SERIALIZE_SCALAR(_nupc); 256 } 257 258 void | 252 { 253 Base::serialize(cp); 254 SERIALIZE_SCALAR(_upc); 255 SERIALIZE_SCALAR(_nupc); 256 } 257 258 void |
259 unserialize(CheckpointIn &cp) M5_ATTR_OVERRIDE | 259 unserialize(CheckpointIn &cp) override |
260 { 261 Base::unserialize(cp); 262 UNSERIALIZE_SCALAR(_upc); 263 UNSERIALIZE_SCALAR(_nupc); 264 } 265}; 266 267template <class MachInst> --- 56 unchanged lines hidden (view full) --- 324 325 bool 326 operator != (const DelaySlotPCState<MachInst> &opc) const 327 { 328 return !(*this == opc); 329 } 330 331 void | 260 { 261 Base::unserialize(cp); 262 UNSERIALIZE_SCALAR(_upc); 263 UNSERIALIZE_SCALAR(_nupc); 264 } 265}; 266 267template <class MachInst> --- 56 unchanged lines hidden (view full) --- 324 325 bool 326 operator != (const DelaySlotPCState<MachInst> &opc) const 327 { 328 return !(*this == opc); 329 } 330 331 void |
332 serialize(CheckpointOut &cp) const M5_ATTR_OVERRIDE | 332 serialize(CheckpointOut &cp) const override |
333 { 334 Base::serialize(cp); 335 SERIALIZE_SCALAR(_nnpc); 336 } 337 338 void | 333 { 334 Base::serialize(cp); 335 SERIALIZE_SCALAR(_nnpc); 336 } 337 338 void |
339 unserialize(CheckpointIn &cp) M5_ATTR_OVERRIDE | 339 unserialize(CheckpointIn &cp) override |
340 { 341 Base::unserialize(cp); 342 UNSERIALIZE_SCALAR(_nnpc); 343 } 344}; 345 346template <class MachInst> 347std::ostream & --- 73 unchanged lines hidden (view full) --- 421 422 bool 423 operator != (const DelaySlotUPCState<MachInst> &opc) const 424 { 425 return !(*this == opc); 426 } 427 428 void | 340 { 341 Base::unserialize(cp); 342 UNSERIALIZE_SCALAR(_nnpc); 343 } 344}; 345 346template <class MachInst> 347std::ostream & --- 73 unchanged lines hidden (view full) --- 421 422 bool 423 operator != (const DelaySlotUPCState<MachInst> &opc) const 424 { 425 return !(*this == opc); 426 } 427 428 void |
429 serialize(CheckpointOut &cp) const M5_ATTR_OVERRIDE | 429 serialize(CheckpointOut &cp) const override |
430 { 431 Base::serialize(cp); 432 SERIALIZE_SCALAR(_upc); 433 SERIALIZE_SCALAR(_nupc); 434 } 435 436 void | 430 { 431 Base::serialize(cp); 432 SERIALIZE_SCALAR(_upc); 433 SERIALIZE_SCALAR(_nupc); 434 } 435 436 void |
437 unserialize(CheckpointIn &cp) M5_ATTR_OVERRIDE | 437 unserialize(CheckpointIn &cp) override |
438 { 439 Base::unserialize(cp); 440 UNSERIALIZE_SCALAR(_upc); 441 UNSERIALIZE_SCALAR(_nupc); 442 } 443}; 444 445template <class MachInst> 446std::ostream & 447operator<<(std::ostream & os, const DelaySlotUPCState<MachInst> &pc) 448{ 449 ccprintf(os, "(%#x=>%#x=>%#x).(%d=>%d)", 450 pc.pc(), pc.npc(), pc.nnpc(), pc.upc(), pc.nupc()); 451 return os; 452} 453 454} 455 456#endif | 438 { 439 Base::unserialize(cp); 440 UNSERIALIZE_SCALAR(_upc); 441 UNSERIALIZE_SCALAR(_nupc); 442 } 443}; 444 445template <class MachInst> 446std::ostream & 447operator<<(std::ostream & os, const DelaySlotUPCState<MachInst> &pc) 448{ 449 ccprintf(os, "(%#x=>%#x=>%#x).(%d=>%d)", 450 pc.pc(), pc.npc(), pc.nnpc(), pc.upc(), pc.nupc()); 451 return os; 452} 453 454} 455 456#endif |