static_inst.cc (6262:43950710afdc) | static_inst.cc (6263:981fc6fba01a) |
---|---|
1/* Copyright (c) 2007-2008 The Florida State University 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 --- 15 unchanged lines hidden (view full) --- 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 * 27 * Authors: Stephen Hines 28 */ 29 30#include "arch/arm/insts/static_inst.hh" 31#include "base/condcodes.hh" | 1/* Copyright (c) 2007-2008 The Florida State University 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 --- 15 unchanged lines hidden (view full) --- 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 * 27 * Authors: Stephen Hines 28 */ 29 30#include "arch/arm/insts/static_inst.hh" 31#include "base/condcodes.hh" |
32#include "base/loader/symtab.hh" |
|
32 33namespace ArmISA 34{ 35// Shift Rm by an immediate value 36int32_t 37ArmStaticInst::shift_rm_imm(uint32_t base, uint32_t shamt, 38 uint32_t type, uint32_t cfval) const 39{ --- 264 unchanged lines hidden (view full) --- 304 break; 305 default: 306 panic("Unrecognized condition code %d.\n", condCode); 307 } 308 os << suffix << " "; 309 } 310} 311 | 33 34namespace ArmISA 35{ 36// Shift Rm by an immediate value 37int32_t 38ArmStaticInst::shift_rm_imm(uint32_t base, uint32_t shamt, 39 uint32_t type, uint32_t cfval) const 40{ --- 264 unchanged lines hidden (view full) --- 305 break; 306 default: 307 panic("Unrecognized condition code %d.\n", condCode); 308 } 309 os << suffix << " "; 310 } 311} 312 |
313void 314ArmStaticInst::printMemSymbol(std::ostream &os, 315 const SymbolTable *symtab, 316 const std::string &prefix, 317 const Addr addr, 318 const std::string &suffix) const 319{ 320 Addr symbolAddr; 321 std::string symbol; 322 if (symtab && symtab->findNearestSymbol(addr, symbol, symbolAddr)) { 323 ccprintf(os, "%s%s", prefix, symbol); 324 if (symbolAddr != addr) 325 ccprintf(os, "+%d", addr - symbolAddr); 326 ccprintf(os, suffix); 327 } 328} 329 |
|
312std::string 313ArmStaticInst::generateDisassembly(Addr pc, 314 const SymbolTable *symtab) const 315{ 316 std::stringstream ss; 317 printMnemonic(ss); 318 return ss.str(); 319} 320} | 330std::string 331ArmStaticInst::generateDisassembly(Addr pc, 332 const SymbolTable *symtab) const 333{ 334 std::stringstream ss; 335 printMnemonic(ss); 336 return ss.str(); 337} 338} |