utility.hh revision 7680:f4eda002333b
12810SN/A/* 212724Snikos.nikoleris@arm.com * Copyright (c) 2003-2005 The Regents of The University of Michigan 38856Sandreas.hansson@arm.com * Copyright (c) 2007-2008 The Florida State University 48856Sandreas.hansson@arm.com * Copyright (c) 2009 The University of Edinburgh 58856Sandreas.hansson@arm.com * All rights reserved. 68856Sandreas.hansson@arm.com * 78856Sandreas.hansson@arm.com * Redistribution and use in source and binary forms, with or without 88856Sandreas.hansson@arm.com * modification, are permitted provided that the following conditions are 98856Sandreas.hansson@arm.com * met: redistributions of source code must retain the above copyright 108856Sandreas.hansson@arm.com * notice, this list of conditions and the following disclaimer; 118856Sandreas.hansson@arm.com * redistributions in binary form must reproduce the above copyright 128856Sandreas.hansson@arm.com * notice, this list of conditions and the following disclaimer in the 138856Sandreas.hansson@arm.com * documentation and/or other materials provided with the distribution; 142810SN/A * neither the name of the copyright holders nor the names of its 152810SN/A * contributors may be used to endorse or promote products derived from 162810SN/A * this software without specific prior written permission. 172810SN/A * 182810SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 192810SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 202810SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 212810SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 222810SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 232810SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 242810SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 252810SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 262810SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 272810SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 282810SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 292810SN/A * 302810SN/A * Authors: Korey Sewell 312810SN/A * Stephen Hines 322810SN/A * Timothy M. Jones 332810SN/A */ 342810SN/A 352810SN/A#ifndef __ARCH_POWER_UTILITY_HH__ 362810SN/A#define __ARCH_POWER_UTILITY_HH__ 372810SN/A 382810SN/A#include "base/types.hh" 392810SN/A#include "cpu/thread_context.hh" 402810SN/A 4112724Snikos.nikoleris@arm.comnamespace PowerISA { 422810SN/A 432810SN/A/** 442810SN/A * Function to ensure ISA semantics about 0 registers. 452810SN/A * @param tc The thread context. 462810SN/A */ 472810SN/Atemplate <class TC> 482810SN/Avoid zeroRegisters(TC *tc); 4911486Snikos.nikoleris@arm.com 5011486Snikos.nikoleris@arm.cominline void 5112724Snikos.nikoleris@arm.comstartupCPU(ThreadContext *tc, int cpuId) 5212724Snikos.nikoleris@arm.com{ 538232Snate@binkert.org tc->activate(0); 5412724Snikos.nikoleris@arm.com} 5513222Sodanrc@yahoo.com.br 5612724Snikos.nikoleris@arm.comvoid 5711486Snikos.nikoleris@arm.comcopyRegs(ThreadContext *src, ThreadContext *dest); 5812724Snikos.nikoleris@arm.com 5912724Snikos.nikoleris@arm.comstatic inline void 6012724Snikos.nikoleris@arm.comcopyMiscRegs(ThreadContext *src, ThreadContext *dest) 6113352Snikos.nikoleris@arm.com{ 6212724Snikos.nikoleris@arm.com} 6312724Snikos.nikoleris@arm.com 6412724Snikos.nikoleris@arm.com} // PowerISA namespace 6512724Snikos.nikoleris@arm.com 662810SN/A#endif // __ARCH_POWER_UTILITY_HH__ 672810SN/A