base.isa (3278:986122553077) base.isa (3597:4766c8942c7e)
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

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

184
185 void
186 SparcStaticInst::printReg(std::ostream &os, int reg) const
187 {
188 const int MaxGlobal = 8;
189 const int MaxOutput = 16;
190 const int MaxLocal = 24;
191 const int MaxInput = 32;
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

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

184
185 void
186 SparcStaticInst::printReg(std::ostream &os, int reg) const
187 {
188 const int MaxGlobal = 8;
189 const int MaxOutput = 16;
190 const int MaxLocal = 24;
191 const int MaxInput = 32;
192 const int MaxMicroReg = 33;
192 if (reg == FramePointerReg)
193 ccprintf(os, "%%fp");
194 else if (reg == StackPointerReg)
195 ccprintf(os, "%%sp");
196 else if(reg < MaxGlobal)
197 ccprintf(os, "%%g%d", reg);
198 else if(reg < MaxOutput)
199 ccprintf(os, "%%o%d", reg - MaxGlobal);
200 else if(reg < MaxLocal)
201 ccprintf(os, "%%l%d", reg - MaxOutput);
202 else if(reg < MaxInput)
203 ccprintf(os, "%%i%d", reg - MaxLocal);
193 if (reg == FramePointerReg)
194 ccprintf(os, "%%fp");
195 else if (reg == StackPointerReg)
196 ccprintf(os, "%%sp");
197 else if(reg < MaxGlobal)
198 ccprintf(os, "%%g%d", reg);
199 else if(reg < MaxOutput)
200 ccprintf(os, "%%o%d", reg - MaxGlobal);
201 else if(reg < MaxLocal)
202 ccprintf(os, "%%l%d", reg - MaxOutput);
203 else if(reg < MaxInput)
204 ccprintf(os, "%%i%d", reg - MaxLocal);
205 else if(reg < MaxMicroReg)
206 ccprintf(os, "%%u%d", reg - MaxInput);
204 else {
205 ccprintf(os, "%%f%d", reg - FP_Base_DepTag);
206 }
207 }
208
209 std::string SparcStaticInst::generateDisassembly(Addr pc,
210 const SymbolTable *symtab) const
211 {

--- 73 unchanged lines hidden ---
207 else {
208 ccprintf(os, "%%f%d", reg - FP_Base_DepTag);
209 }
210 }
211
212 std::string SparcStaticInst::generateDisassembly(Addr pc,
213 const SymbolTable *symtab) const
214 {

--- 73 unchanged lines hidden ---