isa_traits.hh revision 6974
12SN/A/* 21762SN/A * Copyright (c) 2003-2005 The Regents of The University of Michigan 32SN/A * Copyright (c) 2007-2008 The Florida State University 42SN/A * Copyright (c) 2009 The University of Edinburgh 52SN/A * All rights reserved. 62SN/A * 72SN/A * Redistribution and use in source and binary forms, with or without 82SN/A * modification, are permitted provided that the following conditions are 92SN/A * met: redistributions of source code must retain the above copyright 102SN/A * notice, this list of conditions and the following disclaimer; 112SN/A * redistributions in binary form must reproduce the above copyright 122SN/A * notice, this list of conditions and the following disclaimer in the 132SN/A * documentation and/or other materials provided with the distribution; 142SN/A * neither the name of the copyright holders nor the names of its 152SN/A * contributors may be used to endorse or promote products derived from 162SN/A * this software without specific prior written permission. 172SN/A * 182SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 192SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 202SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 212SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 222SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 232SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 242SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 252SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 262SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 272665Ssaidi@eecs.umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 282665Ssaidi@eecs.umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 292665Ssaidi@eecs.umich.edu * 302665Ssaidi@eecs.umich.edu * Authors: Timothy M. Jones 312SN/A * Gabe Black 322SN/A * Stephen Hines 332623SN/A */ 342623SN/A 352SN/A#ifndef __ARCH_POWER_ISA_TRAITS_HH__ 364182Sgblack@eecs.umich.edu#define __ARCH_POWER_ISA_TRAITS_HH__ 371354SN/A 381858SN/A#include "arch/power/types.hh" 391717SN/A#include "base/types.hh" 402683Sktlim@umich.edu 411354SN/Anamespace BigEndianGuest {}; 421354SN/A 432387SN/Aclass StaticInstPtr; 442387SN/A 452387SN/Anamespace PowerISA 4656SN/A{ 472SN/A 482SN/Ausing namespace BigEndianGuest; 491858SN/A 502SN/AStaticInstPtr decodeInst(ExtMachInst); 513453Sgblack@eecs.umich.edu 523453Sgblack@eecs.umich.edu// POWER DOES NOT have a delay slot 533453Sgblack@eecs.umich.edu#define ISA_HAS_DELAY_SLOT 0 543453Sgblack@eecs.umich.edu 553453Sgblack@eecs.umich.educonst Addr PageShift = 12; 562462SN/Aconst Addr PageBytes = ULL(1) << PageShift; 572SN/Aconst Addr Page_Mask = ~(PageBytes - 1); 58715SN/Aconst Addr PageOffset = PageBytes - 1; 59715SN/A 60715SN/Aconst Addr PteShift = 3; 61715SN/Aconst Addr NPtePageShift = PageShift - PteShift; 622SN/Aconst Addr NPtePage = ULL(1) << NPtePageShift; 632SN/Aconst Addr PteMask = NPtePage - 1; 643960Sgblack@eecs.umich.edu 653960Sgblack@eecs.umich.educonst int LogVMPageSize = 12; // 4K bytes 663960Sgblack@eecs.umich.educonst int VMPageSize = (1 << LogVMPageSize); 674182Sgblack@eecs.umich.edu 684182Sgblack@eecs.umich.educonst int MachineBytes = 4; 694182Sgblack@eecs.umich.edu 704182Sgblack@eecs.umich.edu// This is ori 0, 0, 0 712680Sktlim@umich.educonst ExtMachInst NoopMachInst = 0x60000000; 72237SN/A 732SN/A// Memory accesses can be unaligned 742SN/Aconst bool HasUnalignedMemAcc = true; 752SN/A 762SN/A} // PowerISA namespace 772SN/A 782420SN/A#endif // __ARCH_POWER_ISA_TRAITS_HH__ 792623SN/A