misc64.cc revision 10037:5cac77888310
1278Sbinkertn@umich.edu/* 21762Sstever@eecs.umich.edu * Copyright (c) 2011-2013 ARM Limited 3278Sbinkertn@umich.edu * All rights reserved 4278Sbinkertn@umich.edu * 5278Sbinkertn@umich.edu * The license below extends only to copyright in the software and shall 6278Sbinkertn@umich.edu * not be construed as granting a license to any other intellectual 7278Sbinkertn@umich.edu * property including but not limited to intellectual property relating 8278Sbinkertn@umich.edu * to a hardware implementation of the functionality of the software 9278Sbinkertn@umich.edu * licensed hereunder. You may use the software subject to the license 10278Sbinkertn@umich.edu * terms below provided that you ensure that this notice is replicated 11278Sbinkertn@umich.edu * unmodified and in its entirety in all distributions of the software, 12278Sbinkertn@umich.edu * modified or unmodified, in source code or in binary form. 13278Sbinkertn@umich.edu * 14278Sbinkertn@umich.edu * Redistribution and use in source and binary forms, with or without 15278Sbinkertn@umich.edu * modification, are permitted provided that the following conditions are 16278Sbinkertn@umich.edu * met: redistributions of source code must retain the above copyright 17278Sbinkertn@umich.edu * notice, this list of conditions and the following disclaimer; 18278Sbinkertn@umich.edu * redistributions in binary form must reproduce the above copyright 19278Sbinkertn@umich.edu * notice, this list of conditions and the following disclaimer in the 20278Sbinkertn@umich.edu * documentation and/or other materials provided with the distribution; 21278Sbinkertn@umich.edu * neither the name of the copyright holders nor the names of its 22278Sbinkertn@umich.edu * contributors may be used to endorse or promote products derived from 23278Sbinkertn@umich.edu * this software without specific prior written permission. 24278Sbinkertn@umich.edu * 25278Sbinkertn@umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 26278Sbinkertn@umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 272665Ssaidi@eecs.umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 282665Ssaidi@eecs.umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 29278Sbinkertn@umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 30278Sbinkertn@umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 315755Snate@binkert.org * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 325755Snate@binkert.org * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 335755Snate@binkert.org * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 345755Snate@binkert.org * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 355755Snate@binkert.org * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 36287Sbinkertn@umich.edu * 375754Snate@binkert.org * Authors: Gabe Black 385754Snate@binkert.org */ 39275Sbinkertn@umich.edu 40275Sbinkertn@umich.edu#include "arch/arm/insts/misc64.hh" 41275Sbinkertn@umich.edu 422358Sktlim@umich.edustd::string 43275Sbinkertn@umich.eduRegRegImmImmOp64::generateDisassembly(Addr pc, const SymbolTable *symtab) const 44275Sbinkertn@umich.edu{ 45275Sbinkertn@umich.edu std::stringstream ss; 46275Sbinkertn@umich.edu printMnemonic(ss, "", false); 475754Snate@binkert.org printReg(ss, dest); 485754Snate@binkert.org ss << ", "; 495754Snate@binkert.org printReg(ss, op1); 505754Snate@binkert.org ccprintf(ss, ", #%d, #%d", imm1, imm2); 515754Snate@binkert.org return ss.str(); 525754Snate@binkert.org} 535754Snate@binkert.org 545754Snate@binkert.orgstd::string 555754Snate@binkert.orgRegRegRegImmOp64::generateDisassembly( 565754Snate@binkert.org Addr pc, const SymbolTable *symtab) const 575754Snate@binkert.org{ 585754Snate@binkert.org std::stringstream ss; 595754Snate@binkert.org printMnemonic(ss, "", false); 605754Snate@binkert.org printReg(ss, dest); 615754Snate@binkert.org ss << ", "; 625754Snate@binkert.org printReg(ss, op1); 635754Snate@binkert.org ss << ", "; 645754Snate@binkert.org printReg(ss, op2); 655754Snate@binkert.org ccprintf(ss, ", #%d", imm); 665754Snate@binkert.org return ss.str(); 675754Snate@binkert.org} 687517Shestness@cs.utexas.edu 697517Shestness@cs.utexas.edustd::string 707517Shestness@cs.utexas.eduUnknownOp64::generateDisassembly(Addr pc, const SymbolTable *symtab) const 717517Shestness@cs.utexas.edu{ 727517Shestness@cs.utexas.edu return csprintf("%-10s (inst %#08x)", "unknown", machInst); 735754Snate@binkert.org} 745754Snate@binkert.org