mt.isa (5269:0bdd8bbdc79f) mt.isa (5715:e8c1d4e669a7)
1// -*- mode:c++ -*-
2
3// Copyright (c) 2007 MIPS Technologies, Inc.
4// All rights reserved.
5//
6// Redistribution and use in source and binary forms, with or without
7// modification, are permitted provided that the following conditions are
8// met: redistributions of source code must retain the above copyright

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

191 header_output = BasicDeclare.subst(iop)
192 decoder_output = BasicConstructor.subst(iop)
193 decode_block = BasicDecode.subst(iop)
194 exec_output = MTExecute.subst(iop)
195}};
196
197def format MT_MFTR(code, *flags) {{
198 flags += ('IsNonSpeculative', )
1// -*- mode:c++ -*-
2
3// Copyright (c) 2007 MIPS Technologies, Inc.
4// All rights reserved.
5//
6// Redistribution and use in source and binary forms, with or without
7// modification, are permitted provided that the following conditions are
8// met: redistributions of source code must retain the above copyright

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

191 header_output = BasicDeclare.subst(iop)
192 decoder_output = BasicConstructor.subst(iop)
193 decode_block = BasicDecode.subst(iop)
194 exec_output = MTExecute.subst(iop)
195}};
196
197def format MT_MFTR(code, *flags) {{
198 flags += ('IsNonSpeculative', )
199# code = 'std::cerr << curTick << \": T\" << xc->tcBase()->getThreadNum() << \": Executing MT INST: ' + name + '\" << endl;\n' + code
199# code = 'std::cerr << curTick << \": T\" << xc->tcBase()->threadId() << \": Executing MT INST: ' + name + '\" << endl;\n' + code
200
201 code += 'if (MT_H == 1) {\n'
202 code += 'data = bits(data, top_bit, bottom_bit);\n'
203 code += '}\n'
204 code += 'Rd = data;\n'
205
206 iop = InstObjParams(name, Name, 'MTOp', code, flags)
207 header_output = BasicDeclare.subst(iop)
208 decoder_output = BasicConstructor.subst(iop)
209 decode_block = BasicDecode.subst(iop)
210 exec_output = ThreadRegisterExecute.subst(iop)
211}};
212
213def format MT_MTTR(code, *flags) {{
214 flags += ('IsNonSpeculative', )
200
201 code += 'if (MT_H == 1) {\n'
202 code += 'data = bits(data, top_bit, bottom_bit);\n'
203 code += '}\n'
204 code += 'Rd = data;\n'
205
206 iop = InstObjParams(name, Name, 'MTOp', code, flags)
207 header_output = BasicDeclare.subst(iop)
208 decoder_output = BasicConstructor.subst(iop)
209 decode_block = BasicDecode.subst(iop)
210 exec_output = ThreadRegisterExecute.subst(iop)
211}};
212
213def format MT_MTTR(code, *flags) {{
214 flags += ('IsNonSpeculative', )
215# code = 'std::cerr << curTick << \": T\" << xc->tcBase()->getThreadNum() << \": Executing MT INST: ' + name + '\" << endl;\n' + code
215# code = 'std::cerr << curTick << \": T\" << xc->tcBase()->threadId() << \": Executing MT INST: ' + name + '\" << endl;\n' + code
216 iop = InstObjParams(name, Name, 'MTOp', code, flags)
217 header_output = BasicDeclare.subst(iop)
218 decoder_output = BasicConstructor.subst(iop)
219 decode_block = BasicDecode.subst(iop)
220 exec_output = ThreadRegisterExecute.subst(iop)
221}};
216 iop = InstObjParams(name, Name, 'MTOp', code, flags)
217 header_output = BasicDeclare.subst(iop)
218 decoder_output = BasicConstructor.subst(iop)
219 decode_block = BasicDecode.subst(iop)
220 exec_output = ThreadRegisterExecute.subst(iop)
221}};