x86_traits.hh revision 5357
13536SN/A/*
211274Sshingarov@labware.com * Copyright (c) 2007 The Hewlett-Packard Development Company
310595Sgabeblack@google.com * All rights reserved.
412109SRekai.GonzalezAlberquilla@arm.com *
57752SWilliam.Wang@arm.com * Redistribution and use of this software in source and binary forms,
67752SWilliam.Wang@arm.com * with or without modification, are permitted provided that the
77752SWilliam.Wang@arm.com * following conditions are met:
87752SWilliam.Wang@arm.com *
97752SWilliam.Wang@arm.com * The software must be used only for Non-Commercial Use which means any
107752SWilliam.Wang@arm.com * use which is NOT directed to receiving any direct monetary
117752SWilliam.Wang@arm.com * compensation for, or commercial advantage from such use.  Illustrative
127752SWilliam.Wang@arm.com * examples of non-commercial use are academic research, personal study,
137752SWilliam.Wang@arm.com * teaching, education and corporate research & development.
147752SWilliam.Wang@arm.com * Illustrative examples of commercial use are distributing products for
157752SWilliam.Wang@arm.com * commercial advantage and providing services using the software for
163536SN/A * commercial advantage.
173536SN/A *
183536SN/A * If you wish to use this software or functionality therein that may be
193536SN/A * covered by patents for commercial use, please contact:
203536SN/A *     Director of Intellectual Property Licensing
213536SN/A *     Office of Strategy and Technology
223536SN/A *     Hewlett-Packard Company
233536SN/A *     1501 Page Mill Road
243536SN/A *     Palo Alto, California  94304
253536SN/A *
263536SN/A * Redistributions of source code must retain the above copyright notice,
273536SN/A * this list of conditions and the following disclaimer.  Redistributions
283536SN/A * in binary form must reproduce the above copyright notice, this list of
293536SN/A * conditions and the following disclaimer in the documentation and/or
303536SN/A * other materials provided with the distribution.  Neither the name of
313536SN/A * the COPYRIGHT HOLDER(s), HEWLETT-PACKARD COMPANY, nor the names of its
323536SN/A * contributors may be used to endorse or promote products derived from
333536SN/A * this software without specific prior written permission.  No right of
343536SN/A * sublicense is granted herewith.  Derivatives of the software and
353536SN/A * output created using the software may be prepared, but only for
363536SN/A * Non-Commercial Uses.  Derivatives of the software may be shared with
373536SN/A * others provided: (i) the others agree to abide by the list of
383536SN/A * conditions herein which includes the Non-Commercial Use restrictions;
393536SN/A * and (ii) such Derivatives of the software include the above copyright
403536SN/A * notice to acknowledge the contribution from this software where
413536SN/A * applicable, this list of conditions and the disclaimer below.
423536SN/A *
437752SWilliam.Wang@arm.com * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4411274Sshingarov@labware.com * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
453536SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
463536SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
473536SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
488332Snate@binkert.org * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
498332Snate@binkert.org * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
503536SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
513536SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
523536SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
533536SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
543536SN/A *
553536SN/A * Authors: Gabe Black
563536SN/A */
575543SN/A
585543SN/A#include "sim/host.hh"
593536SN/A
603536SN/A#ifndef __ARCH_X86_X86TRAITS_HH__
613536SN/A#define __ARCH_X86_X86TRAITS_HH__
623536SN/A
633536SN/Anamespace X86ISA
643536SN/A{
653536SN/A    const int NumMicroIntRegs = 16;
663536SN/A
673536SN/A    const int NumPseudoIntRegs = 1;
683536SN/A    //1. The condition code bits of the rflags register.
693536SN/A    const int NumImplicitIntRegs = 5;
705543SN/A    //1. The lower part of the result of multiplication.
715543SN/A    //2. The upper part of the result of multiplication.
723536SN/A    //3. The quotient from division
733536SN/A    //4. The remainder from division
743536SN/A    //5. The divisor for division
753536SN/A
763536SN/A    const int NumMMXRegs = 8;
773536SN/A    const int NumXMMRegs = 16;
783536SN/A    const int NumMicroFpRegs = 8;
793536SN/A
803536SN/A    const int NumCRegs = 16;
813536SN/A    const int NumDRegs = 8;
823536SN/A
833536SN/A    const int NumSegments = 6;
843536SN/A    const int NumSysSegments = 4;
853536SN/A
863536SN/A    const Addr IntAddrPrefixMask = ULL(0xffffffff00000000);
873536SN/A    const Addr IntAddrPrefixCPUID = ULL(0x100000000);
885543SN/A    const Addr IntAddrPrefixMSR = ULL(0x200000000);
893536SN/A    const Addr IntAddrPrefixIO = ULL(0x300000000);
903536SN/A
913536SN/A    const Addr PhysAddrPrefixIO = ULL(0x8000000000000000);
923536SN/A    const Addr PhysAddrPrefixPciConfig = ULL(0xC000000000000000);
933536SN/A}
943536SN/A
953536SN/A#endif //__ARCH_X86_X86TRAITS_HH__
963536SN/A