17966Sgblack@eecs.umich.edu/* 28332Snate@binkert.org * Copyright (c) 2011 Advanced Micro Devices, Inc. 37966Sgblack@eecs.umich.edu * All rights reserved. 47966Sgblack@eecs.umich.edu * 57966Sgblack@eecs.umich.edu * The license below extends only to copyright in the software and shall 67966Sgblack@eecs.umich.edu * not be construed as granting a license to any other intellectual 77966Sgblack@eecs.umich.edu * property including but not limited to intellectual property relating 87966Sgblack@eecs.umich.edu * to a hardware implementation of the functionality of the software 97966Sgblack@eecs.umich.edu * licensed hereunder. You may use the software subject to the license 107966Sgblack@eecs.umich.edu * terms below provided that you ensure that this notice is replicated 117966Sgblack@eecs.umich.edu * unmodified and in its entirety in all distributions of the software, 127966Sgblack@eecs.umich.edu * modified or unmodified, in source code or in binary form. 137966Sgblack@eecs.umich.edu * 147966Sgblack@eecs.umich.edu * Redistribution and use in source and binary forms, with or without 157966Sgblack@eecs.umich.edu * modification, are permitted provided that the following conditions are 167966Sgblack@eecs.umich.edu * met: redistributions of source code must retain the above copyright 177966Sgblack@eecs.umich.edu * notice, this list of conditions and the following disclaimer; 187966Sgblack@eecs.umich.edu * redistributions in binary form must reproduce the above copyright 197966Sgblack@eecs.umich.edu * notice, this list of conditions and the following disclaimer in the 207966Sgblack@eecs.umich.edu * documentation and/or other materials provided with the distribution; 217966Sgblack@eecs.umich.edu * neither the name of the copyright holders nor the names of its 227966Sgblack@eecs.umich.edu * contributors may be used to endorse or promote products derived from 237966Sgblack@eecs.umich.edu * this software without specific prior written permission. 247966Sgblack@eecs.umich.edu * 257966Sgblack@eecs.umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 267966Sgblack@eecs.umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 277966Sgblack@eecs.umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 287966Sgblack@eecs.umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 297966Sgblack@eecs.umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 307966Sgblack@eecs.umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 317966Sgblack@eecs.umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 327966Sgblack@eecs.umich.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 337966Sgblack@eecs.umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 347966Sgblack@eecs.umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 357966Sgblack@eecs.umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 367966Sgblack@eecs.umich.edu * 377966Sgblack@eecs.umich.edu * Authors: Gabe Black 387966Sgblack@eecs.umich.edu */ 397966Sgblack@eecs.umich.edu 4011793Sbrandon.potter@amd.com#include "arch/x86/insts/badmicroop.hh" 4111793Sbrandon.potter@amd.com 4214277Sgabeblack@google.com#include "arch/generic/debugfaults.hh" 438961Sgblack@eecs.umich.edu#include "arch/x86/generated/decoder.hh" 447966Sgblack@eecs.umich.edu#include "arch/x86/isa_traits.hh" 457966Sgblack@eecs.umich.edu 4612407Sgabeblack@google.comnamespace { 4712407Sgabeblack@google.com 4812407Sgabeblack@google.comstatic X86ISA::ExtMachInst dummyMachInst; 4912407Sgabeblack@google.com 5012407Sgabeblack@google.com} 5112407Sgabeblack@google.com 527966Sgblack@eecs.umich.edunamespace X86ISA 537966Sgblack@eecs.umich.edu{ 547966Sgblack@eecs.umich.edu 557966Sgblack@eecs.umich.edu// This microop needs to be allocated on the heap even though it could 567966Sgblack@eecs.umich.edu// theoretically be statically allocated. The reference counted pointer would 577966Sgblack@eecs.umich.edu// try to delete the static memory when it was destructed. 5812407Sgabeblack@google.com 597966Sgblack@eecs.umich.educonst StaticInstPtr badMicroop = 6014277Sgabeblack@google.com new X86ISAInst::MicroDebug(dummyMachInst, "panic", "BAD", 617966Sgblack@eecs.umich.edu StaticInst::IsMicroop | StaticInst::IsLastMicroop, 6214277Sgabeblack@google.com new GenericISA::M5PanicFault("Invalid microop!")); 637966Sgblack@eecs.umich.edu 647966Sgblack@eecs.umich.edu} // namespace X86ISA 65