base.isa (2754:e3d023bc752c) | base.isa (2965:82703e01285a) |
---|---|
1// -*- mode:c++ -*- 2 3// Copyright (c) 2006 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 --- 65 unchanged lines hidden (view full) --- 74 } 75 76 std::string MipsStaticInst::generateDisassembly(Addr pc, const SymbolTable *symtab) const 77 { 78 std::stringstream ss; 79 80 ccprintf(ss, "%-10s ", mnemonic); 81 | 1// -*- mode:c++ -*- 2 3// Copyright (c) 2006 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 --- 65 unchanged lines hidden (view full) --- 74 } 75 76 std::string MipsStaticInst::generateDisassembly(Addr pc, const SymbolTable *symtab) const 77 { 78 std::stringstream ss; 79 80 ccprintf(ss, "%-10s ", mnemonic); 81 |
82 if(_numDestRegs > 0){ 83 printReg(ss, _destRegIdx[0]); 84 } | 82 // Need to find standard way to not print 83 // this info. Maybe add bool variable to 84 // class? 85 if (mnemonic != "syscall") { 86 if(_numDestRegs > 0){ 87 printReg(ss, _destRegIdx[0]); 88 } |
85 | 89 |
86 if(_numSrcRegs > 0) { 87 ss << ", "; 88 printReg(ss, _srcRegIdx[0]); 89 } | 90 if(_numSrcRegs > 0) { 91 ss << ", "; 92 printReg(ss, _srcRegIdx[0]); 93 } |
90 | 94 |
91 if(_numSrcRegs > 1) { 92 ss << ", "; 93 printReg(ss, _srcRegIdx[1]); | 95 if(_numSrcRegs > 1) { 96 ss << ", "; 97 printReg(ss, _srcRegIdx[1]); 98 } |
94 } 95 | 99 } 100 |
96 | 101 // Should we define a separate inst. class 102 // just for two insts? |
97 if(mnemonic == "sll" || mnemonic == "sra"){ 98 ccprintf(ss,", %d",SA); 99 } 100 101 return ss.str(); 102 } 103 104}}; 105 | 103 if(mnemonic == "sll" || mnemonic == "sra"){ 104 ccprintf(ss,", %d",SA); 105 } 106 107 return ss.str(); 108 } 109 110}}; 111 |