registers.hh revision 13556
12100SN/A/*
22100SN/A * Copyright (c) 2013 ARM Limited
35268Sksewell@umich.edu * All rights reserved
45268Sksewell@umich.edu *
55268Sksewell@umich.edu * The license below extends only to copyright in the software and shall
65268Sksewell@umich.edu * not be construed as granting a license to any other intellectual
75268Sksewell@umich.edu * property including but not limited to intellectual property relating
85268Sksewell@umich.edu * to a hardware implementation of the functionality of the software
95268Sksewell@umich.edu * licensed hereunder.  You may use the software subject to the license
105268Sksewell@umich.edu * terms below provided that you ensure that this notice is replicated
115268Sksewell@umich.edu * unmodified and in its entirety in all distributions of the software,
125268Sksewell@umich.edu * modified or unmodified, in source code or in binary form.
135268Sksewell@umich.edu *
145268Sksewell@umich.edu * Redistribution and use in source and binary forms, with or without
155268Sksewell@umich.edu * modification, are permitted provided that the following conditions are
165268Sksewell@umich.edu * met: redistributions of source code must retain the above copyright
175268Sksewell@umich.edu * notice, this list of conditions and the following disclaimer;
185268Sksewell@umich.edu * redistributions in binary form must reproduce the above copyright
195268Sksewell@umich.edu * notice, this list of conditions and the following disclaimer in the
205268Sksewell@umich.edu * documentation and/or other materials provided with the distribution;
215268Sksewell@umich.edu * neither the name of the copyright holders nor the names of its
225268Sksewell@umich.edu * contributors may be used to endorse or promote products derived from
235268Sksewell@umich.edu * this software without specific prior written permission.
245268Sksewell@umich.edu *
255268Sksewell@umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
265268Sksewell@umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
275268Sksewell@umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
285268Sksewell@umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
295268Sksewell@umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
305268Sksewell@umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
315268Sksewell@umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
322706Sksewell@umich.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
332100SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
342124SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
352124SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
362124SN/A *
372124SN/A * Authors: Andreas Hansson
382124SN/A */
392124SN/A
402124SN/A#ifndef __ARCH_NULL_REGISTERS_HH__
412124SN/A#define __ARCH_NULL_REGISTERS_HH__
422124SN/A
432124SN/A#include "arch/generic/vec_reg.hh"
442124SN/A#include "arch/types.hh"
452124SN/A#include "base/types.hh"
462124SN/A
472124SN/Anamespace NullISA {
482124SN/A
492124SN/Atypedef RegVal IntReg;
503953Sstever@eecs.umich.edutypedef RegVal FloatRegBits;
513953Sstever@eecs.umich.edutypedef FloatRegVal FloatReg;
523953Sstever@eecs.umich.edutypedef uint8_t CCReg;
533953Sstever@eecs.umich.edutypedef RegVal MiscReg;
543953Sstever@eecs.umich.educonst RegIndex ZeroReg = 0;
553953Sstever@eecs.umich.edu
563953Sstever@eecs.umich.edu// dummy typedefs since we don't have vector regs
573953Sstever@eecs.umich.educonstexpr unsigned NumVecElemPerVecReg = 2;
583953Sstever@eecs.umich.eduusing VecElem = uint32_t;
593953Sstever@eecs.umich.eduusing VecReg = ::VecRegT<VecElem, NumVecElemPerVecReg, false>;
603953Sstever@eecs.umich.eduusing ConstVecReg = ::VecRegT<VecElem, NumVecElemPerVecReg, true>;
613953Sstever@eecs.umich.eduusing VecRegContainer = VecReg::Container;
622124SN/A// This has to be one to prevent warnings that are treated as errors
632124SN/Aconstexpr unsigned NumVecRegs = 1;
642124SN/A
652124SN/A}
662124SN/A
672124SN/A#endif // __ARCH_NULL_REGISTERS_HH__
682124SN/A