isa.hh revision 6334
16313Sgblack@eecs.umich.edu/* 26313Sgblack@eecs.umich.edu * Copyright (c) 2009 The Regents of The University of Michigan 36313Sgblack@eecs.umich.edu * All rights reserved. 46313Sgblack@eecs.umich.edu * 56313Sgblack@eecs.umich.edu * Redistribution and use in source and binary forms, with or without 66313Sgblack@eecs.umich.edu * modification, are permitted provided that the following conditions are 76313Sgblack@eecs.umich.edu * met: redistributions of source code must retain the above copyright 86313Sgblack@eecs.umich.edu * notice, this list of conditions and the following disclaimer; 96313Sgblack@eecs.umich.edu * redistributions in binary form must reproduce the above copyright 106313Sgblack@eecs.umich.edu * notice, this list of conditions and the following disclaimer in the 116313Sgblack@eecs.umich.edu * documentation and/or other materials provided with the distribution; 126313Sgblack@eecs.umich.edu * neither the name of the copyright holders nor the names of its 136313Sgblack@eecs.umich.edu * contributors may be used to endorse or promote products derived from 146313Sgblack@eecs.umich.edu * this software without specific prior written permission. 156313Sgblack@eecs.umich.edu * 166313Sgblack@eecs.umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 176313Sgblack@eecs.umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 186313Sgblack@eecs.umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 196313Sgblack@eecs.umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 206313Sgblack@eecs.umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 216313Sgblack@eecs.umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 226313Sgblack@eecs.umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 236313Sgblack@eecs.umich.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 246313Sgblack@eecs.umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 256313Sgblack@eecs.umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 266313Sgblack@eecs.umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 276313Sgblack@eecs.umich.edu * 286313Sgblack@eecs.umich.edu * Authors: Gabe Black 296313Sgblack@eecs.umich.edu */ 306313Sgblack@eecs.umich.edu 316313Sgblack@eecs.umich.edu#ifndef __ARCH_ARM_ISA_HH__ 326313Sgblack@eecs.umich.edu#define __ARCH_MRM_ISA_HH__ 336313Sgblack@eecs.umich.edu 346333Sgblack@eecs.umich.edu#include "arch/arm/registers.hh" 356313Sgblack@eecs.umich.edu#include "arch/arm/types.hh" 366313Sgblack@eecs.umich.edu 376333Sgblack@eecs.umich.educlass ThreadContext; 386313Sgblack@eecs.umich.educlass Checkpoint; 396313Sgblack@eecs.umich.educlass EventManager; 406313Sgblack@eecs.umich.edu 416313Sgblack@eecs.umich.edunamespace ArmISA 426313Sgblack@eecs.umich.edu{ 436313Sgblack@eecs.umich.edu class ISA 446313Sgblack@eecs.umich.edu { 456313Sgblack@eecs.umich.edu protected: 466333Sgblack@eecs.umich.edu MiscReg miscRegs[NumMiscRegs]; 476313Sgblack@eecs.umich.edu 486313Sgblack@eecs.umich.edu public: 496333Sgblack@eecs.umich.edu void clear() 506333Sgblack@eecs.umich.edu { 516333Sgblack@eecs.umich.edu // Unknown startup state currently 526333Sgblack@eecs.umich.edu } 536313Sgblack@eecs.umich.edu 546333Sgblack@eecs.umich.edu MiscReg 556333Sgblack@eecs.umich.edu readMiscRegNoEffect(int misc_reg) 566333Sgblack@eecs.umich.edu { 576333Sgblack@eecs.umich.edu assert(misc_reg < NumMiscRegs); 586333Sgblack@eecs.umich.edu return miscRegs[misc_reg]; 596333Sgblack@eecs.umich.edu } 606313Sgblack@eecs.umich.edu 616333Sgblack@eecs.umich.edu MiscReg 626333Sgblack@eecs.umich.edu readMiscReg(int misc_reg, ThreadContext *tc) 636333Sgblack@eecs.umich.edu { 646333Sgblack@eecs.umich.edu assert(misc_reg < NumMiscRegs); 656333Sgblack@eecs.umich.edu return miscRegs[misc_reg]; 666333Sgblack@eecs.umich.edu } 676333Sgblack@eecs.umich.edu 686333Sgblack@eecs.umich.edu void 696333Sgblack@eecs.umich.edu setMiscRegNoEffect(int misc_reg, const MiscReg &val) 706333Sgblack@eecs.umich.edu { 716333Sgblack@eecs.umich.edu assert(misc_reg < NumMiscRegs); 726333Sgblack@eecs.umich.edu miscRegs[misc_reg] = val; 736333Sgblack@eecs.umich.edu } 746333Sgblack@eecs.umich.edu 756333Sgblack@eecs.umich.edu void 766333Sgblack@eecs.umich.edu setMiscReg(int misc_reg, const MiscReg &val, ThreadContext *tc) 776333Sgblack@eecs.umich.edu { 786333Sgblack@eecs.umich.edu assert(misc_reg < NumMiscRegs); 796333Sgblack@eecs.umich.edu miscRegs[misc_reg] = val; 806333Sgblack@eecs.umich.edu } 816313Sgblack@eecs.umich.edu 826313Sgblack@eecs.umich.edu int 836313Sgblack@eecs.umich.edu flattenIntIndex(int reg) 846313Sgblack@eecs.umich.edu { 856313Sgblack@eecs.umich.edu return reg; 866313Sgblack@eecs.umich.edu } 876313Sgblack@eecs.umich.edu 886313Sgblack@eecs.umich.edu int 896313Sgblack@eecs.umich.edu flattenFloatIndex(int reg) 906313Sgblack@eecs.umich.edu { 916313Sgblack@eecs.umich.edu return reg; 926313Sgblack@eecs.umich.edu } 936313Sgblack@eecs.umich.edu 946333Sgblack@eecs.umich.edu void serialize(std::ostream &os) 956333Sgblack@eecs.umich.edu {} 966333Sgblack@eecs.umich.edu void unserialize(Checkpoint *cp, const std::string §ion) 976333Sgblack@eecs.umich.edu {} 986313Sgblack@eecs.umich.edu 996313Sgblack@eecs.umich.edu ISA() 1006313Sgblack@eecs.umich.edu { 1016313Sgblack@eecs.umich.edu clear(); 1026313Sgblack@eecs.umich.edu } 1036313Sgblack@eecs.umich.edu }; 1046313Sgblack@eecs.umich.edu} 1056313Sgblack@eecs.umich.edu 1066313Sgblack@eecs.umich.edu#endif 107