Deleted Added
sdiff udiff text old ( 3278:986122553077 ) new ( 3597:4766c8942c7e )
full compact
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 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);
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 ---