diff options
author | Korey Sewell <ksewell@umich.edu> | 2009-05-11 19:44:34 -0400 |
---|---|---|
committer | Korey Sewell <ksewell@umich.edu> | 2009-05-11 19:44:34 -0400 |
commit | a63cc2ff5fbba0e42a7aa39bfce6b6e2310fd52a (patch) | |
tree | 0952c5678b449ffd8def645fec2b714c4960df9e /src/mem/ruby/tester/Instruction.cc | |
parent | eea2b02b04a3076969dd607aca739b96d94b6155 (diff) | |
parent | f21e80ec72cf68ad859f18a2886297004ea9f959 (diff) | |
download | gem5-a63cc2ff5fbba0e42a7aa39bfce6b6e2310fd52a.tar.xz |
Merge Ruby Stuff
Diffstat (limited to 'src/mem/ruby/tester/Instruction.cc')
-rw-r--r-- | src/mem/ruby/tester/Instruction.cc | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/src/mem/ruby/tester/Instruction.cc b/src/mem/ruby/tester/Instruction.cc new file mode 100644 index 000000000..1f4d56fc2 --- /dev/null +++ b/src/mem/ruby/tester/Instruction.cc @@ -0,0 +1,51 @@ +/* + * Copyright (c) 1999 by Mark Hill and David Wood for the Wisconsin + * Multifacet Project. ALL RIGHTS RESERVED. + * + * ##HEADER## + * + * This software is furnished under a license and may be used and + * copied only in accordance with the terms of such license and the + * inclusion of the above copyright notice. This software or any + * other copies thereof or any derivative works may not be provided or + * otherwise made available to any other persons. Title to and + * ownership of the software is retained by Mark Hill and David Wood. + * Any use of this software must include the above copyright notice. + * + * THIS SOFTWARE IS PROVIDED "AS IS". THE LICENSOR MAKES NO + * WARRANTIES ABOUT ITS CORRECTNESS OR PERFORMANCE. + * */ + +/* + * $Id: Instruction.C 1.2 05/08/26 00:54:48-05:00 xu@s0-32.cs.wisc.edu $ + * + * Description: + * + */ + +#include "mem/ruby/tester/Instruction.hh" + +Instruction::Instruction(){ + m_opcode = Opcode_NUM_OPCODES; + m_address = Address(physical_address_t(0)); +} + +Instruction::Instruction(Opcode op, Address addr){ + m_opcode = op; + m_address = addr; + assert(addr.getAddress() == 0); +} + +void Instruction::init(Opcode op, Address addr){ + m_opcode = op; + m_address = addr; + //cout << "Instruction(" << op << ", " << m_address << ")" << endl; +} + +Opcode Instruction::getOpcode(){ + return m_opcode; +} + +Address Instruction::getAddress(){ + return m_address; +} |