isa_traits.hh revision 9329
12023SN/A/*
22023SN/A * Copyright (c) 2003-2005 The Regents of The University of Michigan
32023SN/A * All rights reserved.
42023SN/A *
52023SN/A * Redistribution and use in source and binary forms, with or without
62023SN/A * modification, are permitted provided that the following conditions are
72023SN/A * met: redistributions of source code must retain the above copyright
82023SN/A * notice, this list of conditions and the following disclaimer;
92023SN/A * redistributions in binary form must reproduce the above copyright
102023SN/A * notice, this list of conditions and the following disclaimer in the
112023SN/A * documentation and/or other materials provided with the distribution;
122023SN/A * neither the name of the copyright holders nor the names of its
132023SN/A * contributors may be used to endorse or promote products derived from
142023SN/A * this software without specific prior written permission.
152023SN/A *
162023SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
172023SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
182023SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
192023SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
202023SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
212023SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
222023SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
232023SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
242023SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
252023SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
262023SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
272665Ssaidi@eecs.umich.edu *
282972Sgblack@eecs.umich.edu * Authors: Gabe Black
293804Ssaidi@eecs.umich.edu *          Ali Saidi
302023SN/A */
312023SN/A
322023SN/A#ifndef __ARCH_SPARC_ISA_TRAITS_HH__
332023SN/A#define __ARCH_SPARC_ISA_TRAITS_HH__
342023SN/A
358229Snate@binkert.org#include "arch/sparc/sparc_traits.hh"
362972Sgblack@eecs.umich.edu#include "arch/sparc/types.hh"
376216Snate@binkert.org#include "base/types.hh"
388542Sgblack@eecs.umich.edu#include "cpu/static_inst_fwd.hh"
392023SN/A
402458SN/Anamespace BigEndianGuest {}
412023SN/A
422458SN/Anamespace SparcISA
432458SN/A{
447741Sgblack@eecs.umich.educonst int MachineBytes = 8;
453809Sgblack@eecs.umich.edu
467741Sgblack@eecs.umich.edu// This makes sure the big endian versions of certain functions are used.
477741Sgblack@eecs.umich.eduusing namespace BigEndianGuest;
482972Sgblack@eecs.umich.edu
497741Sgblack@eecs.umich.edu// SPARC has a delay slot
507741Sgblack@eecs.umich.edu#define ISA_HAS_DELAY_SLOT 1
513093Sksewell@umich.edu
527741Sgblack@eecs.umich.edu// SPARC NOP (sethi %(hi(0), g0)
539057SAli.Saidi@ARM.comconst MachInst NoopMachInst = 0x01000000;
542972Sgblack@eecs.umich.edu
557741Sgblack@eecs.umich.edu// 8K. This value is implmentation specific; and should probably
567741Sgblack@eecs.umich.edu// be somewhere else.
577741Sgblack@eecs.umich.educonst int LogVMPageSize = 13;
587741Sgblack@eecs.umich.educonst int VMPageSize = (1 << LogVMPageSize);
592458SN/A
607741Sgblack@eecs.umich.edu// real address virtual mapping
617741Sgblack@eecs.umich.edu// sort of like alpha super page, but less frequently used
627741Sgblack@eecs.umich.educonst Addr SegKPMEnd  = ULL(0xfffffffc00000000);
637741Sgblack@eecs.umich.educonst Addr SegKPMBase = ULL(0xfffffac000000000);
644070Ssaidi@eecs.umich.edu
657741Sgblack@eecs.umich.edu// Why does both the previous set of constants and this one exist?
667741Sgblack@eecs.umich.educonst int PageShift = 13;
677741Sgblack@eecs.umich.educonst int PageBytes = 1ULL << PageShift;
682458SN/A
697741Sgblack@eecs.umich.educonst int BranchPredAddrShiftAmt = 2;
702458SN/A
717741Sgblack@eecs.umich.eduStaticInstPtr decodeInst(ExtMachInst);
722458SN/A
737741Sgblack@eecs.umich.edu/////////// TLB Stuff ////////////
747741Sgblack@eecs.umich.educonst Addr StartVAddrHole = ULL(0x0000800000000000);
757741Sgblack@eecs.umich.educonst Addr EndVAddrHole = ULL(0xFFFF7FFFFFFFFFFF);
767741Sgblack@eecs.umich.educonst Addr VAddrAMask = ULL(0xFFFFFFFF);
777741Sgblack@eecs.umich.educonst Addr PAddrImplMask = ULL(0x000000FFFFFFFFFF);
787741Sgblack@eecs.umich.educonst Addr BytesInPageMask = ULL(0x1FFF);
793804Ssaidi@eecs.umich.edu
807741Sgblack@eecs.umich.eduenum InterruptTypes
817741Sgblack@eecs.umich.edu{
827741Sgblack@eecs.umich.edu    IT_TRAP_LEVEL_ZERO,
837741Sgblack@eecs.umich.edu    IT_HINTP,
847741Sgblack@eecs.umich.edu    IT_INT_VEC,
857741Sgblack@eecs.umich.edu    IT_CPU_MONDO,
867741Sgblack@eecs.umich.edu    IT_DEV_MONDO,
877741Sgblack@eecs.umich.edu    IT_RES_ERROR,
887741Sgblack@eecs.umich.edu    IT_SOFT_INT,
897741Sgblack@eecs.umich.edu    NumInterruptTypes
907741Sgblack@eecs.umich.edu};
914103Ssaidi@eecs.umich.edu
926974Stjones1@inf.ed.ac.uk// Memory accesses cannot be unaligned
936974Stjones1@inf.ed.ac.ukconst bool HasUnalignedMemAcc = false;
949329Sdam.sunwoo@arm.com
959329Sdam.sunwoo@arm.comconst bool CurThreadInfoImplemented = false;
969329Sdam.sunwoo@arm.comconst int CurThreadInfoReg = -1;
979329Sdam.sunwoo@arm.com
982458SN/A}
992458SN/A
1002023SN/A#endif // __ARCH_SPARC_ISA_TRAITS_HH__
101