types.hh (8435:4adb1148ef73) types.hh (10537:47fe87b0cf97)
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;

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

42
43// The guaranteed interface.
44class PCStateBase
45{
46 protected:
47 Addr _pc;
48 Addr _npc;
49
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;

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

42
43// The guaranteed interface.
44class PCStateBase
45{
46 protected:
47 Addr _pc;
48 Addr _npc;
49
50 PCStateBase() {}
51 PCStateBase(Addr val) { set(val); }
50 PCStateBase() : _pc(0), _npc(0) {}
51 PCStateBase(Addr val) : _pc(0), _npc(0) { set(val); }
52
53 public:
54 /**
55 * Returns the memory address the bytes of this instruction came from.
56 *
57 * @return Memory address of the current instruction's encoding.
58 */
59 Addr

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

201 void
202 set(Addr val)
203 {
204 Base::set(val);
205 upc(0);
206 nupc(1);
207 }
208
52
53 public:
54 /**
55 * Returns the memory address the bytes of this instruction came from.
56 *
57 * @return Memory address of the current instruction's encoding.
58 */
59 Addr

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

201 void
202 set(Addr val)
203 {
204 Base::set(val);
205 upc(0);
206 nupc(1);
207 }
208
209 UPCState() {}
210 UPCState(Addr val) { set(val); }
209 UPCState() : _upc(0), _nupc(0) {}
210 UPCState(Addr val) : _upc(0), _nupc(0) { set(val); }
211
212 bool
213 branching() const
214 {
215 return this->npc() != this->pc() + sizeof(MachInst) ||
216 this->nupc() != this->upc() + 1;
217 }
218

--- 238 unchanged lines hidden ---
211
212 bool
213 branching() const
214 {
215 return this->npc() != this->pc() + sizeof(MachInst) ||
216 this->nupc() != this->upc() + 1;
217 }
218

--- 238 unchanged lines hidden ---