isa_traits.hh revision 8542
12SN/A/* 29448SAndreas.Sandberg@ARM.com * Copyright (c) 2003-2005 The Regents of The University of Michigan 38733Sgeoffrey.blake@arm.com * Copyright (c) 2007-2008 The Florida State University 48733Sgeoffrey.blake@arm.com * Copyright (c) 2009 The University of Edinburgh 58733Sgeoffrey.blake@arm.com * All rights reserved. 68733Sgeoffrey.blake@arm.com * 78733Sgeoffrey.blake@arm.com * Redistribution and use in source and binary forms, with or without 88733Sgeoffrey.blake@arm.com * modification, are permitted provided that the following conditions are 98733Sgeoffrey.blake@arm.com * met: redistributions of source code must retain the above copyright 108733Sgeoffrey.blake@arm.com * notice, this list of conditions and the following disclaimer; 118733Sgeoffrey.blake@arm.com * redistributions in binary form must reproduce the above copyright 128733Sgeoffrey.blake@arm.com * notice, this list of conditions and the following disclaimer in the 138733Sgeoffrey.blake@arm.com * documentation and/or other materials provided with the distribution; 141762SN/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 272SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 282SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 292SN/A * 302SN/A * Authors: Timothy M. Jones 312SN/A * Gabe Black 322SN/A * Stephen Hines 332SN/A */ 342SN/A 352SN/A#ifndef __ARCH_POWER_ISA_TRAITS_HH__ 362SN/A#define __ARCH_POWER_ISA_TRAITS_HH__ 372SN/A 382SN/A#include "arch/power/types.hh" 392665Ssaidi@eecs.umich.edu#include "base/types.hh" 402665Ssaidi@eecs.umich.edu#include "cpu/static_inst_fwd.hh" 412665Ssaidi@eecs.umich.edu 422665Ssaidi@eecs.umich.edunamespace BigEndianGuest {} 432SN/A 442SN/Anamespace PowerISA 452623SN/A{ 462623SN/A 472SN/Ausing namespace BigEndianGuest; 481354SN/A 496658Snate@binkert.orgStaticInstPtr decodeInst(ExtMachInst); 501717SN/A 518887Sgeoffrey.blake@arm.com// POWER DOES NOT have a delay slot 528229Snate@binkert.org#define ISA_HAS_DELAY_SLOT 0 532683Sktlim@umich.edu 541354SN/Aconst Addr PageShift = 12; 552387SN/Aconst Addr PageBytes = ULL(1) << PageShift; 562387SN/Aconst Addr Page_Mask = ~(PageBytes - 1); 572387SN/Aconst Addr PageOffset = PageBytes - 1; 5856SN/A 598779Sgblack@eecs.umich.educonst Addr PteShift = 3; 605348Ssaidi@eecs.umich.educonst Addr NPtePageShift = PageShift - PteShift; 612SN/Aconst Addr NPtePage = ULL(1) << NPtePageShift; 622SN/Aconst Addr PteMask = NPtePage - 1; 638779Sgblack@eecs.umich.edu 648779Sgblack@eecs.umich.educonst int LogVMPageSize = 12; // 4K bytes 652SN/Aconst int VMPageSize = (1 << LogVMPageSize); 668779Sgblack@eecs.umich.edu 672SN/Aconst int MachineBytes = 4; 684182Sgblack@eecs.umich.edu 694182Sgblack@eecs.umich.edu// This is ori 0, 0, 0 708779Sgblack@eecs.umich.educonst ExtMachInst NoopMachInst = 0x60000000; 718779Sgblack@eecs.umich.edu 724182Sgblack@eecs.umich.edu// Memory accesses can be unaligned 732SN/Aconst bool HasUnalignedMemAcc = true; 742SN/A 752SN/A} // namespace PowerISA 762SN/A 772SN/A#endif // __ARCH_POWER_ISA_TRAITS_HH__ 788737Skoansin.tan@gmail.com