x86_traits.hh revision 5149:356e00996637
12568SN/A/*
29786Sandreas.hansson@arm.com * Copyright (c) 2007 The Hewlett-Packard Development Company
38713Sandreas.hansson@arm.com * All rights reserved.
48713Sandreas.hansson@arm.com *
58713Sandreas.hansson@arm.com * Redistribution and use of this software in source and binary forms,
68713Sandreas.hansson@arm.com * with or without modification, are permitted provided that the
78713Sandreas.hansson@arm.com * following conditions are met:
88713Sandreas.hansson@arm.com *
98713Sandreas.hansson@arm.com * The software must be used only for Non-Commercial Use which means any
108713Sandreas.hansson@arm.com * use which is NOT directed to receiving any direct monetary
118713Sandreas.hansson@arm.com * compensation for, or commercial advantage from such use.  Illustrative
128713Sandreas.hansson@arm.com * examples of non-commercial use are academic research, personal study,
138713Sandreas.hansson@arm.com * teaching, education and corporate research & development.
142568SN/A * Illustrative examples of commercial use are distributing products for
152568SN/A * commercial advantage and providing services using the software for
162568SN/A * commercial advantage.
172568SN/A *
182568SN/A * If you wish to use this software or functionality therein that may be
192568SN/A * covered by patents for commercial use, please contact:
202568SN/A *     Director of Intellectual Property Licensing
212568SN/A *     Office of Strategy and Technology
222568SN/A *     Hewlett-Packard Company
232568SN/A *     1501 Page Mill Road
242568SN/A *     Palo Alto, California  94304
252568SN/A *
262568SN/A * Redistributions of source code must retain the above copyright notice,
272568SN/A * this list of conditions and the following disclaimer.  Redistributions
282568SN/A * in binary form must reproduce the above copyright notice, this list of
292568SN/A * conditions and the following disclaimer in the documentation and/or
302568SN/A * other materials provided with the distribution.  Neither the name of
312568SN/A * the COPYRIGHT HOLDER(s), HEWLETT-PACKARD COMPANY, nor the names of its
322568SN/A * contributors may be used to endorse or promote products derived from
332568SN/A * this software without specific prior written permission.  No right of
342568SN/A * sublicense is granted herewith.  Derivatives of the software and
352568SN/A * output created using the software may be prepared, but only for
362568SN/A * Non-Commercial Uses.  Derivatives of the software may be shared with
372568SN/A * others provided: (i) the others agree to abide by the list of
382568SN/A * conditions herein which includes the Non-Commercial Use restrictions;
392665Ssaidi@eecs.umich.edu * and (ii) such Derivatives of the software include the above copyright
402665Ssaidi@eecs.umich.edu * notice to acknowledge the contribution from this software where
412665Ssaidi@eecs.umich.edu * applicable, this list of conditions and the disclaimer below.
428713Sandreas.hansson@arm.com *
432568SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
442568SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
452568SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
462982Sstever@eecs.umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
4710405Sandreas.hansson@arm.com * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
488713Sandreas.hansson@arm.com * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
492568SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
502568SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
512568SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
529164Sandreas.hansson@arm.com * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
532568SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
544762Snate@binkert.org *
552568SN/A * Authors: Gabe Black
569164Sandreas.hansson@arm.com */
579164Sandreas.hansson@arm.com
588851Sandreas.hansson@arm.com#include "sim/host.hh"
599180Sandreas.hansson@arm.com
609235Sandreas.hansson@arm.com#ifndef __ARCH_X86_X86TRAITS_HH__
619164Sandreas.hansson@arm.com#define __ARCH_X86_X86TRAITS_HH__
629164Sandreas.hansson@arm.com
639164Sandreas.hansson@arm.comnamespace X86ISA
648851Sandreas.hansson@arm.com{
658713Sandreas.hansson@arm.com    const int NumMicroIntRegs = 16;
668713Sandreas.hansson@arm.com
678713Sandreas.hansson@arm.com    const int NumPseudoIntRegs = 1;
689164Sandreas.hansson@arm.com    //1. The condition code bits of the rflags register.
699164Sandreas.hansson@arm.com    const int NumImplicitIntRegs = 5;
708851Sandreas.hansson@arm.com    //1. The lower part of the result of multiplication.
719180Sandreas.hansson@arm.com    //2. The upper part of the result of multiplication.
729164Sandreas.hansson@arm.com    //3. The quotient from division
739164Sandreas.hansson@arm.com    //4. The remainder from division
742643Sstever@eecs.umich.edu    //5. The divisor for division
752643Sstever@eecs.umich.edu
762643Sstever@eecs.umich.edu    const int NumMMXRegs = 8;
774435Ssaidi@eecs.umich.edu    const int NumXMMRegs = 16;
785034Smilesck@eecs.umich.edu    const int NumMicroFpRegs = 8;
799180Sandreas.hansson@arm.com
809180Sandreas.hansson@arm.com    const int NumCRegs = 16;
819180Sandreas.hansson@arm.com    const int NumDRegs = 8;
829180Sandreas.hansson@arm.com
832643Sstever@eecs.umich.edu    const int NumSegments = 6;
842643Sstever@eecs.umich.edu    const int NumSysSegments = 4;
852643Sstever@eecs.umich.edu
869294Sandreas.hansson@arm.com    const Addr IntAddrPrefixMask = ULL(0xffffffff00000000);
879294Sandreas.hansson@arm.com    const Addr IntAddrPrefixCPUID = ULL(0x100000000);
888922Swilliam.wang@arm.com    const Addr IntAddrPrefixMSR = ULL(0x200000000);
898922Swilliam.wang@arm.com}
908922Swilliam.wang@arm.com
918922Swilliam.wang@arm.com#endif //__ARCH_X86_X86TRAITS_HH__
928922Swilliam.wang@arm.com