isa_traits.hh revision 10318:98771a936b61
1803SN/A/*
21363SN/A * Copyright (c) 2003-2005 The Regents of The University of Michigan
3803SN/A * All rights reserved.
4803SN/A *
5803SN/A * Redistribution and use in source and binary forms, with or without
6803SN/A * modification, are permitted provided that the following conditions are
7803SN/A * met: redistributions of source code must retain the above copyright
8803SN/A * notice, this list of conditions and the following disclaimer;
9803SN/A * redistributions in binary form must reproduce the above copyright
10803SN/A * notice, this list of conditions and the following disclaimer in the
11803SN/A * documentation and/or other materials provided with the distribution;
12803SN/A * neither the name of the copyright holders nor the names of its
13803SN/A * contributors may be used to endorse or promote products derived from
14803SN/A * this software without specific prior written permission.
15803SN/A *
16803SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17803SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18803SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19803SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20803SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21803SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22803SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23803SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24803SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25803SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26803SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
272665SN/A *
282665SN/A * Authors: Gabe Black
292665SN/A *          Ali Saidi
302665SN/A */
31803SN/A
32768SN/A#ifndef __ARCH_SPARC_ISA_TRAITS_HH__
331730SN/A#define __ARCH_SPARC_ISA_TRAITS_HH__
34773SN/A
35768SN/A#include "arch/sparc/sparc_traits.hh"
36768SN/A#include "arch/sparc/types.hh"
37773SN/A#include "base/types.hh"
38773SN/A#include "cpu/static_inst_fwd.hh"
39768SN/A
40768SN/Anamespace BigEndianGuest {}
41768SN/A
42768SN/Anamespace SparcISA
434762Snate@binkert.org{
44768SN/A// This makes sure the big endian versions of certain functions are used.
456658Snate@binkert.orgusing namespace BigEndianGuest;
462542SN/A
473540Sgblack@eecs.umich.edu// SPARC has a delay slot
483540Sgblack@eecs.umich.edu#define ISA_HAS_DELAY_SLOT 1
493540Sgblack@eecs.umich.edu
503540Sgblack@eecs.umich.edu// SPARC NOP (sethi %(hi(0), g0)
513348SN/Aconst MachInst NoopMachInst = 0x01000000;
523348SN/A
532542SN/A// real address virtual mapping
542542SN/A// sort of like alpha super page, but less frequently used
55768SN/Aconst Addr SegKPMEnd  = ULL(0xfffffffc00000000);
56768SN/Aconst Addr SegKPMBase = ULL(0xfffffac000000000);
572107SN/A
582107SN/Aconst Addr PageShift = 13;
59773SN/Aconst Addr PageBytes = ULL(1) << PageShift;
605606Snate@binkert.org
615606Snate@binkert.orgStaticInstPtr decodeInst(ExtMachInst);
625606Snate@binkert.org
631817SN/A/////////// TLB Stuff ////////////
64772SN/Aconst Addr StartVAddrHole = ULL(0x0000800000000000);
65772SN/Aconst Addr EndVAddrHole = ULL(0xFFFF7FFFFFFFFFFF);
664762Snate@binkert.orgconst Addr VAddrAMask = ULL(0xFFFFFFFF);
675606Snate@binkert.orgconst Addr PAddrImplMask = ULL(0x000000FFFFFFFFFF);
685606Snate@binkert.orgconst Addr BytesInPageMask = ULL(0x1FFF);
69768SN/A
703846Shsul@eecs.umich.eduenum InterruptTypes
71909SN/A{
72803SN/A    IT_TRAP_LEVEL_ZERO,
73803SN/A    IT_HINTP,
74803SN/A    IT_INT_VEC,
75771SN/A    IT_CPU_MONDO,
76777SN/A    IT_DEV_MONDO,
77777SN/A    IT_RES_ERROR,
78773SN/A    IT_SOFT_INT,
79773SN/A    NumInterruptTypes
801634SN/A};
811634SN/A
821634SN/A// Memory accesses cannot be unaligned
832539SN/Aconst bool HasUnalignedMemAcc = false;
841634SN/A
851634SN/Aconst bool CurThreadInfoImplemented = false;
862542SN/Aconst int CurThreadInfoReg = -1;
873349SN/A
88768SN/A}
892641SN/A
90768SN/A#endif // __ARCH_SPARC_ISA_TRAITS_HH__
912641SN/A