Deleted Added
sdiff udiff text old ( 5745:6b0f8306704b ) new ( 6179:83693f4b79fd )
full compact
1// -*- mode:c++ -*-
2
3// Copyright (c) 2003-2005 The Regents of The University of Michigan
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

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

60
61 std::string
62 generateDisassembly(Addr pc, const SymbolTable *symtab) const;
63
64 public:
65
66 const StaticInstPtr &eaCompInst() const { return eaCompPtr; }
67 const StaticInstPtr &memAccInst() const { return memAccPtr; }
68 };
69
70 /**
71 * Base class for memory-format instructions using a 32-bit
72 * displacement (i.e. most of them).
73 */
74 class MemoryDisp32 : public Memory
75 {

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

171 /// Constructor.
172 %(class_name)s(ExtMachInst machInst);
173
174 %(BasicExecDeclare)s
175
176 %(InitiateAccDeclare)s
177
178 %(CompleteAccDeclare)s
179 };
180}};
181
182
183def template InitiateAccDeclare {{
184 Fault initiateAcc(%(CPU_exec_context)s *, Trace::InstRecord *) const;
185}};
186
187
188def template CompleteAccDeclare {{
189 Fault completeAcc(PacketPtr, %(CPU_exec_context)s *,
190 Trace::InstRecord *) const;
191}};
192
193
194def template EACompConstructor {{
195 /** TODO: change op_class to AddrGenOp or something (requires
196 * creating new member of OpClass enum in op_class.hh, updating
197 * config files, etc.). */
198 inline %(class_name)s::EAComp::EAComp(ExtMachInst machInst)
199 : %(base_class)s("%(mnemonic)s (EAComp)", machInst, IntAluOp)
200 {
201 %(constructor)s;

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

615 Trace::InstRecord *traceData) const
616 {
617 warn("Misc instruction does not support split access method!");
618
619 return NoFault;
620 }
621}};
622
623// load instructions use Ra as dest, so check for
624// Ra == 31 to detect nops
625def template LoadNopCheckDecode {{
626 {
627 AlphaStaticInst *i = new %(class_name)s(machInst);
628 if (RA == 31) {
629 i = makeNop(i);
630 }

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

688 # corresponding Store template..
689 StoreCondInitiateAcc = StoreInitiateAcc
690
691 memAccExecTemplate = eval(exec_template_base + 'MemAccExecute')
692 fullExecTemplate = eval(exec_template_base + 'Execute')
693 initiateAccTemplate = eval(exec_template_base + 'InitiateAcc')
694 completeAccTemplate = eval(exec_template_base + 'CompleteAcc')
695
696 # (header_output, decoder_output, decode_block, exec_output)
697 return (LoadStoreDeclare.subst(iop),
698 EACompConstructor.subst(ea_iop)
699 + MemAccConstructor.subst(memacc_iop)
700 + LoadStoreConstructor.subst(iop),
701 decode_template.subst(iop),
702 EACompExecute.subst(ea_iop)
703 + memAccExecTemplate.subst(memacc_iop)
704 + fullExecTemplate.subst(iop)
705 + initiateAccTemplate.subst(iop)
706 + completeAccTemplate.subst(iop))
707}};
708
709def format LoadOrNop(memacc_code, ea_code = {{ EA = Rb + disp; }},
710 mem_flags = [], inst_flags = []) {{
711 (header_output, decoder_output, decode_block, exec_output) = \
712 LoadStoreBase(name, Name, ea_code, memacc_code, mem_flags, inst_flags,
713 decode_template = LoadNopCheckDecode,
714 exec_template_base = 'Load')

--- 60 unchanged lines hidden ---