types.hh revision 5004
12597SN/A/* 22754Sksewell@umich.edu * Copyright (c) 2006 The Regents of The University of Michigan 32597SN/A * All rights reserved. 42597SN/A * 52597SN/A * Redistribution and use in source and binary forms, with or without 62597SN/A * modification, are permitted provided that the following conditions are 72597SN/A * met: redistributions of source code must retain the above copyright 82597SN/A * notice, this list of conditions and the following disclaimer; 92597SN/A * redistributions in binary form must reproduce the above copyright 102597SN/A * notice, this list of conditions and the following disclaimer in the 112597SN/A * documentation and/or other materials provided with the distribution; 122597SN/A * neither the name of the copyright holders nor the names of its 132597SN/A * contributors may be used to endorse or promote products derived from 142597SN/A * this software without specific prior written permission. 152597SN/A * 162597SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 172597SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 182597SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 192597SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 202597SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 212597SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 222597SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 232597SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 242597SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 252597SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 262597SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 272665Ssaidi@eecs.umich.edu * 282665Ssaidi@eecs.umich.edu * Authors: Korey Sewell 292597SN/A */ 302597SN/A 312597SN/A#ifndef __ARCH_MIPS_TYPES_HH__ 322597SN/A#define __ARCH_MIPS_TYPES_HH__ 332597SN/A 345004Sgblack@eecs.umich.edu#include "mem/types.hh" 352597SN/A#include "sim/host.hh" 362597SN/A 372597SN/Anamespace MipsISA 382597SN/A{ 392597SN/A typedef uint32_t MachInst; 402597SN/A typedef uint64_t ExtMachInst; 412597SN/A typedef uint8_t RegIndex; 422597SN/A 432597SN/A typedef uint32_t IntReg; 444040Ssaidi@eecs.umich.edu typedef uint64_t LargestRead; 454040Ssaidi@eecs.umich.edu 462597SN/A 472597SN/A // floating point register file entry type 482597SN/A typedef uint32_t FloatReg32; 492597SN/A typedef uint64_t FloatReg64; 502597SN/A typedef uint64_t FloatRegBits; 512597SN/A 522754Sksewell@umich.edu typedef double FloatRegVal; 532754Sksewell@umich.edu typedef double FloatReg; 542754Sksewell@umich.edu 552597SN/A // cop-0/cop-1 system control register 562597SN/A typedef uint64_t MiscReg; 572597SN/A 582597SN/A typedef union { 592597SN/A IntReg intreg; 602597SN/A FloatReg fpreg; 612597SN/A MiscReg ctrlreg; 622597SN/A } AnyReg; 632597SN/A 642972Sgblack@eecs.umich.edu typedef int RegContextParam; 652972Sgblack@eecs.umich.edu typedef int RegContextVal; 662972Sgblack@eecs.umich.edu 672597SN/A //used in FP convert & round function 682597SN/A enum ConvertType{ 692597SN/A SINGLE_TO_DOUBLE, 702597SN/A SINGLE_TO_WORD, 712597SN/A SINGLE_TO_LONG, 722597SN/A 732597SN/A DOUBLE_TO_SINGLE, 742597SN/A DOUBLE_TO_WORD, 752597SN/A DOUBLE_TO_LONG, 762597SN/A 772597SN/A LONG_TO_SINGLE, 782597SN/A LONG_TO_DOUBLE, 792597SN/A LONG_TO_WORD, 802607SN/A LONG_TO_PS, 812597SN/A 822597SN/A WORD_TO_SINGLE, 832597SN/A WORD_TO_DOUBLE, 842597SN/A WORD_TO_LONG, 852607SN/A WORD_TO_PS, 862597SN/A 872607SN/A PL_TO_SINGLE, 882607SN/A PU_TO_SINGLE 892597SN/A }; 902597SN/A 912597SN/A //used in FP convert & round function 922597SN/A enum RoundMode{ 932597SN/A RND_ZERO, 942597SN/A RND_DOWN, 952597SN/A RND_UP, 962597SN/A RND_NEAREST 975004Sgblack@eecs.umich.edu }; 985004Sgblack@eecs.umich.edu 995004Sgblack@eecs.umich.edu typedef ::PageTable<> PageTable; 1002597SN/A 1012597SN/A} // namespace MipsISA 1022597SN/A 1032597SN/A#endif 104