112288Sgabeblack@google.com/* 212288Sgabeblack@google.com * Copyright (c) 2006-2007 The Regents of The University of Michigan 312288Sgabeblack@google.com * All rights reserved. 412288Sgabeblack@google.com * 512288Sgabeblack@google.com * Redistribution and use in source and binary forms, with or without 612288Sgabeblack@google.com * modification, are permitted provided that the following conditions are 712288Sgabeblack@google.com * met: redistributions of source code must retain the above copyright 812288Sgabeblack@google.com * notice, this list of conditions and the following disclaimer; 912288Sgabeblack@google.com * redistributions in binary form must reproduce the above copyright 1012288Sgabeblack@google.com * notice, this list of conditions and the following disclaimer in the 1112288Sgabeblack@google.com * documentation and/or other materials provided with the distribution; 1212288Sgabeblack@google.com * neither the name of the copyright holders nor the names of its 1312288Sgabeblack@google.com * contributors may be used to endorse or promote products derived from 1412288Sgabeblack@google.com * this software without specific prior written permission. 1512288Sgabeblack@google.com * 1612288Sgabeblack@google.com * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1712288Sgabeblack@google.com * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1812288Sgabeblack@google.com * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1912288Sgabeblack@google.com * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 2012288Sgabeblack@google.com * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2112288Sgabeblack@google.com * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 2212288Sgabeblack@google.com * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2312288Sgabeblack@google.com * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2412288Sgabeblack@google.com * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2512288Sgabeblack@google.com * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 2612288Sgabeblack@google.com * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2712288Sgabeblack@google.com * 2812288Sgabeblack@google.com * Authors: Gabe Black 2912288Sgabeblack@google.com * Steve Reinhardt 3012288Sgabeblack@google.com */ 3112288Sgabeblack@google.com 3212288Sgabeblack@google.com#include "arch/sparc/insts/trap.hh" 3312288Sgabeblack@google.com 3412288Sgabeblack@google.comnamespace SparcISA 3512288Sgabeblack@google.com{ 3612288Sgabeblack@google.com 3712288Sgabeblack@google.comstd::string 3812288Sgabeblack@google.comTrap::generateDisassembly(Addr pc, const SymbolTable *symtab) const 3912288Sgabeblack@google.com{ 4012288Sgabeblack@google.com std::stringstream response; 4112288Sgabeblack@google.com 4212288Sgabeblack@google.com printMnemonic(response, mnemonic); 4312288Sgabeblack@google.com ccprintf(response, " "); 4412288Sgabeblack@google.com printReg(response, _srcRegIdx[0]); 4512288Sgabeblack@google.com ccprintf(response, ", 0x%x", trapNum); 4612288Sgabeblack@google.com ccprintf(response, ", or "); 4712288Sgabeblack@google.com printReg(response, _srcRegIdx[1]); 4812288Sgabeblack@google.com return response.str(); 4912288Sgabeblack@google.com} 5012288Sgabeblack@google.com 5112288Sgabeblack@google.com} 52