112289Sgabeblack@google.com/*
212289Sgabeblack@google.com * Copyright (c) 2006-2007 The Regents of The University of Michigan
312289Sgabeblack@google.com * All rights reserved.
412289Sgabeblack@google.com *
512289Sgabeblack@google.com * Redistribution and use in source and binary forms, with or without
612289Sgabeblack@google.com * modification, are permitted provided that the following conditions are
712289Sgabeblack@google.com * met: redistributions of source code must retain the above copyright
812289Sgabeblack@google.com * notice, this list of conditions and the following disclaimer;
912289Sgabeblack@google.com * redistributions in binary form must reproduce the above copyright
1012289Sgabeblack@google.com * notice, this list of conditions and the following disclaimer in the
1112289Sgabeblack@google.com * documentation and/or other materials provided with the distribution;
1212289Sgabeblack@google.com * neither the name of the copyright holders nor the names of its
1312289Sgabeblack@google.com * contributors may be used to endorse or promote products derived from
1412289Sgabeblack@google.com * this software without specific prior written permission.
1512289Sgabeblack@google.com *
1612289Sgabeblack@google.com * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1712289Sgabeblack@google.com * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1812289Sgabeblack@google.com * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1912289Sgabeblack@google.com * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2012289Sgabeblack@google.com * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2112289Sgabeblack@google.com * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2212289Sgabeblack@google.com * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2312289Sgabeblack@google.com * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2412289Sgabeblack@google.com * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2512289Sgabeblack@google.com * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2612289Sgabeblack@google.com * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2712289Sgabeblack@google.com *
2812289Sgabeblack@google.com * Authors: Gabe Black
2912289Sgabeblack@google.com *          Steve Reinhardt
3012289Sgabeblack@google.com */
3112289Sgabeblack@google.com
3212289Sgabeblack@google.com#ifndef __ARCH_SPARC_INSTS_NOP_HH__
3312289Sgabeblack@google.com#define __ARCH_SPARC_INSTS_NOP_HH__
3412289Sgabeblack@google.com
3512289Sgabeblack@google.com#include "arch/sparc/insts/static_inst.hh"
3612289Sgabeblack@google.com
3712289Sgabeblack@google.comnamespace SparcISA
3812289Sgabeblack@google.com{
3912289Sgabeblack@google.com
4012289Sgabeblack@google.com////////////////////////////////////////////////////////////////////
4112289Sgabeblack@google.com//
4212289Sgabeblack@google.com// Nop instruction
4312289Sgabeblack@google.com//
4412289Sgabeblack@google.com
4512289Sgabeblack@google.com/**
4612289Sgabeblack@google.com * Nop class.
4712289Sgabeblack@google.com */
4812289Sgabeblack@google.comclass Nop : public SparcStaticInst
4912289Sgabeblack@google.com{
5012289Sgabeblack@google.com  public:
5112289Sgabeblack@google.com    // Constructor
5212289Sgabeblack@google.com    Nop(const char *mnem, ExtMachInst _machInst, OpClass __opClass) :
5312289Sgabeblack@google.com        SparcStaticInst(mnem, _machInst, __opClass)
5412289Sgabeblack@google.com    {
5512289Sgabeblack@google.com        flags[IsNop] = true;
5612289Sgabeblack@google.com    }
5712289Sgabeblack@google.com
5812289Sgabeblack@google.com    Fault
5912289Sgabeblack@google.com    execute(ExecContext *xc, Trace::InstRecord *traceData) const override
6012289Sgabeblack@google.com    {
6112289Sgabeblack@google.com        return NoFault;
6212289Sgabeblack@google.com    }
6312289Sgabeblack@google.com
6412289Sgabeblack@google.com    std::string
6512289Sgabeblack@google.com    generateDisassembly(Addr pc, const SymbolTable *symtab) const override
6612289Sgabeblack@google.com    {
6712289Sgabeblack@google.com        std::stringstream response;
6812289Sgabeblack@google.com        printMnemonic(response, mnemonic);
6912289Sgabeblack@google.com        return response.str();
7012289Sgabeblack@google.com    }
7112289Sgabeblack@google.com};
7212289Sgabeblack@google.com
7312289Sgabeblack@google.com}
7412289Sgabeblack@google.com
7512289Sgabeblack@google.com#endif // __ARCH_SPARC_INSTS_NOP_HH__
76