isa_traits.hh revision 8542
12329SN/A/*
29428SAndreas.Sandberg@ARM.com * Copyright (c) 2003-2005 The Regents of The University of Michigan
39428SAndreas.Sandberg@ARM.com * Copyright (c) 2007-2008 The Florida State University
49428SAndreas.Sandberg@ARM.com * Copyright (c) 2009 The University of Edinburgh
59428SAndreas.Sandberg@ARM.com * All rights reserved.
69428SAndreas.Sandberg@ARM.com *
79428SAndreas.Sandberg@ARM.com * Redistribution and use in source and binary forms, with or without
89428SAndreas.Sandberg@ARM.com * modification, are permitted provided that the following conditions are
99428SAndreas.Sandberg@ARM.com * met: redistributions of source code must retain the above copyright
109428SAndreas.Sandberg@ARM.com * notice, this list of conditions and the following disclaimer;
119428SAndreas.Sandberg@ARM.com * redistributions in binary form must reproduce the above copyright
129428SAndreas.Sandberg@ARM.com * notice, this list of conditions and the following disclaimer in the
139428SAndreas.Sandberg@ARM.com * documentation and/or other materials provided with the distribution;
142329SN/A * neither the name of the copyright holders nor the names of its
152329SN/A * contributors may be used to endorse or promote products derived from
162329SN/A * this software without specific prior written permission.
172329SN/A *
182329SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
192329SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
202329SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
212329SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
222329SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
232329SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
242329SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
252329SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
262329SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
272329SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
282329SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
292329SN/A *
302329SN/A * Authors: Timothy M. Jones
312329SN/A *          Gabe Black
322329SN/A *          Stephen Hines
332329SN/A */
342329SN/A
352329SN/A#ifndef __ARCH_POWER_ISA_TRAITS_HH__
362329SN/A#define __ARCH_POWER_ISA_TRAITS_HH__
372329SN/A
382329SN/A#include "arch/power/types.hh"
392689Sktlim@umich.edu#include "base/types.hh"
402689Sktlim@umich.edu#include "cpu/static_inst_fwd.hh"
412329SN/A
422292SN/Anamespace BigEndianGuest {}
432292SN/A
442292SN/Anamespace PowerISA
452292SN/A{
462362SN/A
472362SN/Ausing namespace BigEndianGuest;
482680Sktlim@umich.edu
492292SN/AStaticInstPtr decodeInst(ExtMachInst);
508793Sgblack@eecs.umich.edu
512362SN/A// POWER DOES NOT have a delay slot
522292SN/A#define ISA_HAS_DELAY_SLOT 0
538777Sgblack@eecs.umich.edu
542292SN/Aconst Addr PageShift = 12;
558777Sgblack@eecs.umich.educonst Addr PageBytes = ULL(1) << PageShift;
568777Sgblack@eecs.umich.educonst Addr Page_Mask = ~(PageBytes - 1);
572292SN/Aconst Addr PageOffset = PageBytes - 1;
582292SN/A
592292SN/Aconst Addr PteShift = 3;
602329SN/Aconst Addr NPtePageShift = PageShift - PteShift;
612329SN/Aconst Addr NPtePage = ULL(1) << NPtePageShift;
622329SN/Aconst Addr PteMask = NPtePage - 1;
632680Sktlim@umich.edu
642680Sktlim@umich.educonst int LogVMPageSize = 12;  // 4K bytes
652329SN/Aconst int VMPageSize = (1 << LogVMPageSize);
662329SN/A
672292SN/Aconst int MachineBytes = 4;
682292SN/A
692680Sktlim@umich.edu// This is ori 0, 0, 0
702733Sktlim@umich.educonst ExtMachInst NoopMachInst = 0x60000000;
712292SN/A
722292SN/A// Memory accesses can be unaligned
732348SN/Aconst bool HasUnalignedMemAcc = true;
742733Sktlim@umich.edu
752292SN/A} // namespace PowerISA
769382SAli.Saidi@ARM.com
779382SAli.Saidi@ARM.com#endif // __ARCH_POWER_ISA_TRAITS_HH__
789382SAli.Saidi@ARM.com