base.isa (2632:1bb2f91485ea) | base.isa (2944:10dcffb2904f) |
---|---|
1// Copyright (c) 2006 The Regents of The University of Michigan 2// All rights reserved. 3// 4// Redistribution and use in source and binary forms, with or without 5// modification, are permitted provided that the following conditions are 6// met: redistributions of source code must retain the above copyright 7// notice, this list of conditions and the following disclaimer; 8// redistributions in binary form must reproduce the above copyright --- 71 unchanged lines hidden (view full) --- 80 MachInst _machInst, OpClass __opClass) 81 : StaticInst(mnem, _machInst, __opClass) 82 { 83 } 84 85 std::string generateDisassembly(Addr pc, 86 const SymbolTable *symtab) const; 87 | 1// Copyright (c) 2006 The Regents of The University of Michigan 2// All rights reserved. 3// 4// Redistribution and use in source and binary forms, with or without 5// modification, are permitted provided that the following conditions are 6// met: redistributions of source code must retain the above copyright 7// notice, this list of conditions and the following disclaimer; 8// redistributions in binary form must reproduce the above copyright --- 71 unchanged lines hidden (view full) --- 80 MachInst _machInst, OpClass __opClass) 81 : StaticInst(mnem, _machInst, __opClass) 82 { 83 } 84 85 std::string generateDisassembly(Addr pc, 86 const SymbolTable *symtab) const; 87 |
88 void printReg(std::ostream &os, int reg) const; | 88 void printReg(std::ostream &os, RegIndex reg) const; 89 void printSrcReg(std::ostream &os, int reg) const; 90 void printDestReg(std::ostream &os, int reg) const; 91 92 void printRegArray(std::ostream &os, 93 const RegIndex indexArray[], int num) const; |
89 }; 90 91 bool passesCondition(uint32_t codes, uint32_t condition); 92 93 inline int64_t sign_ext(uint64_t data, int origWidth) 94 { 95 int shiftAmount = 64 - origWidth; 96 return (((int64_t)data) << shiftAmount) >> shiftAmount; --- 48 unchanged lines hidden (view full) --- 145 146output decoder {{ 147 148 inline void printMnemonic(std::ostream &os, const char * mnemonic) 149 { 150 ccprintf(os, "\t%s ", mnemonic); 151 } 152 | 94 }; 95 96 bool passesCondition(uint32_t codes, uint32_t condition); 97 98 inline int64_t sign_ext(uint64_t data, int origWidth) 99 { 100 int shiftAmount = 64 - origWidth; 101 return (((int64_t)data) << shiftAmount) >> shiftAmount; --- 48 unchanged lines hidden (view full) --- 150 151output decoder {{ 152 153 inline void printMnemonic(std::ostream &os, const char * mnemonic) 154 { 155 ccprintf(os, "\t%s ", mnemonic); 156 } 157 |
158 void SparcStaticInst::printRegArray(std::ostream &os, 159 const RegIndex indexArray[], int num) const 160 { 161 if(num <= 0) 162 return; 163 printReg(os, indexArray[0]); 164 for(int x = 1; x < num; x++) 165 { 166 os << ", "; 167 printReg(os, indexArray[x]); 168 } 169 } 170 |
|
153 void | 171 void |
154 SparcStaticInst::printReg(std::ostream &os, int reg) const | 172 SparcStaticInst::printSrcReg(std::ostream &os, int reg) const |
155 { | 173 { |
174 if(_numSrcRegs > reg) 175 printReg(os, _srcRegIdx[reg]); 176 } 177 178 void 179 SparcStaticInst::printDestReg(std::ostream &os, int reg) const 180 { 181 if(_numDestRegs > reg) 182 printReg(os, _destRegIdx[reg]); 183 } 184 185 void 186 SparcStaticInst::printReg(std::ostream &os, RegIndex reg) const 187 { |
|
156 const int MaxGlobal = 8; 157 const int MaxOutput = 16; 158 const int MaxLocal = 24; 159 const int MaxInput = 32; 160 if (reg == FramePointerReg) 161 ccprintf(os, "%%fp"); 162 else if (reg == StackPointerReg) 163 ccprintf(os, "%%sp"); --- 89 unchanged lines hidden --- | 188 const int MaxGlobal = 8; 189 const int MaxOutput = 16; 190 const int MaxLocal = 24; 191 const int MaxInput = 32; 192 if (reg == FramePointerReg) 193 ccprintf(os, "%%fp"); 194 else if (reg == StackPointerReg) 195 ccprintf(os, "%%sp"); --- 89 unchanged lines hidden --- |