types.hh revision 2754:e3d023bc752c
110749Smatt.evans@arm.com/*
210749Smatt.evans@arm.com * Copyright (c) 2006 The Regents of The University of Michigan
310749Smatt.evans@arm.com * All rights reserved.
410749Smatt.evans@arm.com *
510749Smatt.evans@arm.com * Redistribution and use in source and binary forms, with or without
610749Smatt.evans@arm.com * modification, are permitted provided that the following conditions are
710749Smatt.evans@arm.com * met: redistributions of source code must retain the above copyright
810749Smatt.evans@arm.com * notice, this list of conditions and the following disclaimer;
910749Smatt.evans@arm.com * redistributions in binary form must reproduce the above copyright
1010749Smatt.evans@arm.com * notice, this list of conditions and the following disclaimer in the
1110749Smatt.evans@arm.com * documentation and/or other materials provided with the distribution;
1210749Smatt.evans@arm.com * neither the name of the copyright holders nor the names of its
1310749Smatt.evans@arm.com * contributors may be used to endorse or promote products derived from
1410749Smatt.evans@arm.com * this software without specific prior written permission.
1510749Smatt.evans@arm.com *
1610749Smatt.evans@arm.com * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1710749Smatt.evans@arm.com * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1810749Smatt.evans@arm.com * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1910749Smatt.evans@arm.com * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2010749Smatt.evans@arm.com * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2110749Smatt.evans@arm.com * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2210749Smatt.evans@arm.com * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2310749Smatt.evans@arm.com * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2410749Smatt.evans@arm.com * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2510749Smatt.evans@arm.com * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2610749Smatt.evans@arm.com * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2710749Smatt.evans@arm.com *
2810749Smatt.evans@arm.com * Authors: Korey Sewell
2910749Smatt.evans@arm.com */
3010749Smatt.evans@arm.com
3110749Smatt.evans@arm.com#ifndef __ARCH_MIPS_TYPES_HH__
3210749Smatt.evans@arm.com#define __ARCH_MIPS_TYPES_HH__
3310749Smatt.evans@arm.com
3410749Smatt.evans@arm.com#include "sim/host.hh"
3510749Smatt.evans@arm.com
3610749Smatt.evans@arm.comnamespace MipsISA
3710749Smatt.evans@arm.com{
3810749Smatt.evans@arm.com    typedef uint32_t MachInst;
3910749Smatt.evans@arm.com    typedef uint64_t ExtMachInst;
4010749Smatt.evans@arm.com    typedef uint8_t  RegIndex;
4110749Smatt.evans@arm.com
4210749Smatt.evans@arm.com    typedef uint32_t IntReg;
4310749Smatt.evans@arm.com
4410749Smatt.evans@arm.com    // floating point register file entry type
4510749Smatt.evans@arm.com    typedef uint32_t FloatReg32;
4610749Smatt.evans@arm.com    typedef uint64_t FloatReg64;
4710749Smatt.evans@arm.com    typedef uint64_t FloatRegBits;
4810749Smatt.evans@arm.com
4910749Smatt.evans@arm.com    typedef double FloatRegVal;
5010749Smatt.evans@arm.com    typedef double FloatReg;
5110749Smatt.evans@arm.com
5210749Smatt.evans@arm.com    // cop-0/cop-1 system control register
5310749Smatt.evans@arm.com    typedef uint64_t MiscReg;
5410749Smatt.evans@arm.com
5510749Smatt.evans@arm.com    typedef union {
5610749Smatt.evans@arm.com        IntReg   intreg;
5710749Smatt.evans@arm.com        FloatReg fpreg;
5810749Smatt.evans@arm.com        MiscReg  ctrlreg;
5910749Smatt.evans@arm.com    } AnyReg;
6010749Smatt.evans@arm.com
6110749Smatt.evans@arm.com    //used in FP convert & round function
6210749Smatt.evans@arm.com    enum ConvertType{
6310749Smatt.evans@arm.com        SINGLE_TO_DOUBLE,
6410749Smatt.evans@arm.com        SINGLE_TO_WORD,
6510749Smatt.evans@arm.com        SINGLE_TO_LONG,
6610749Smatt.evans@arm.com
6710749Smatt.evans@arm.com        DOUBLE_TO_SINGLE,
6810749Smatt.evans@arm.com        DOUBLE_TO_WORD,
6910749Smatt.evans@arm.com        DOUBLE_TO_LONG,
7010749Smatt.evans@arm.com
7110749Smatt.evans@arm.com        LONG_TO_SINGLE,
7210749Smatt.evans@arm.com        LONG_TO_DOUBLE,
7310749Smatt.evans@arm.com        LONG_TO_WORD,
7410749Smatt.evans@arm.com        LONG_TO_PS,
7510749Smatt.evans@arm.com
7610749Smatt.evans@arm.com        WORD_TO_SINGLE,
7710749Smatt.evans@arm.com        WORD_TO_DOUBLE,
7810749Smatt.evans@arm.com        WORD_TO_LONG,
7910749Smatt.evans@arm.com        WORD_TO_PS,
8010749Smatt.evans@arm.com
8110749Smatt.evans@arm.com        PL_TO_SINGLE,
8210749Smatt.evans@arm.com        PU_TO_SINGLE
8310749Smatt.evans@arm.com    };
8410749Smatt.evans@arm.com
8510749Smatt.evans@arm.com    //used in FP convert & round function
8610749Smatt.evans@arm.com    enum RoundMode{
8710749Smatt.evans@arm.com        RND_ZERO,
8810749Smatt.evans@arm.com        RND_DOWN,
8910749Smatt.evans@arm.com        RND_UP,
9010749Smatt.evans@arm.com        RND_NEAREST
9110749Smatt.evans@arm.com   };
9210749Smatt.evans@arm.com
9310749Smatt.evans@arm.com} // namespace MipsISA
9410749Smatt.evans@arm.com
9510749Smatt.evans@arm.com#endif
9610749Smatt.evans@arm.com