registers.hh (9920:028e4da64b42) registers.hh (9921:ee049bfce978)
1/*
2 * Copyright (c) 2007 The Hewlett-Packard Development Company
3 * Copyright (c) 2013 Advanced Micro Devices, Inc.
4 * All rights reserved.
5 *
6 * The license below extends only to copyright in the software and shall
7 * not be construed as granting a license to any other intellectual
8 * property including but not limited to intellectual property relating

--- 29 unchanged lines hidden (view full) ---

38 * Authors: Gabe Black
39 */
40
41#ifndef __ARCH_X86_REGISTERS_HH__
42#define __ARCH_X86_REGISTERS_HH__
43
44#include "arch/x86/generated/max_inst_regs.hh"
45#include "arch/x86/regs/int.hh"
1/*
2 * Copyright (c) 2007 The Hewlett-Packard Development Company
3 * Copyright (c) 2013 Advanced Micro Devices, Inc.
4 * All rights reserved.
5 *
6 * The license below extends only to copyright in the software and shall
7 * not be construed as granting a license to any other intellectual
8 * property including but not limited to intellectual property relating

--- 29 unchanged lines hidden (view full) ---

38 * Authors: Gabe Black
39 */
40
41#ifndef __ARCH_X86_REGISTERS_HH__
42#define __ARCH_X86_REGISTERS_HH__
43
44#include "arch/x86/generated/max_inst_regs.hh"
45#include "arch/x86/regs/int.hh"
46#include "arch/x86/regs/ccr.hh"
46#include "arch/x86/regs/misc.hh"
47#include "arch/x86/x86_traits.hh"
48
49namespace X86ISA
50{
51using X86ISAInst::MaxInstSrcRegs;
52using X86ISAInst::MaxInstDestRegs;
53using X86ISAInst::MaxMiscDestRegs;
54const int NumMiscRegs = NUM_MISCREGS;
55
56const int NumIntArchRegs = NUM_INTREGS;
47#include "arch/x86/regs/misc.hh"
48#include "arch/x86/x86_traits.hh"
49
50namespace X86ISA
51{
52using X86ISAInst::MaxInstSrcRegs;
53using X86ISAInst::MaxInstDestRegs;
54using X86ISAInst::MaxMiscDestRegs;
55const int NumMiscRegs = NUM_MISCREGS;
56
57const int NumIntArchRegs = NUM_INTREGS;
57const int NumIntRegs =
58 NumIntArchRegs + NumMicroIntRegs +
59 NumPseudoIntRegs + NumImplicitIntRegs;
60const int NumCCRegs = 0;
58const int NumIntRegs = NumIntArchRegs + NumMicroIntRegs + NumImplicitIntRegs;
59const int NumCCRegs = NUM_CCREGS;
61
60
61#define ISA_HAS_CC_REGS
62
62// Each 128 bit xmm register is broken into two effective 64 bit registers.
63// Add 8 for the indices that are mapped over the fp stack
64const int NumFloatRegs =
65 NumMMXRegs + 2 * NumXMMRegs + NumMicroFpRegs + 8;
66
67// These enumerate all the registers for dependence tracking.
68enum DependenceTags {
69 // FP_Reg_Base must be large enough to be bigger than any integer
70 // register index which has the IntFoldBit (1 << 6) set. To be safe
71 // we just start at (1 << 7) == 128.
72 FP_Reg_Base = 128,
73 CC_Reg_Base = FP_Reg_Base + NumFloatRegs,
63// Each 128 bit xmm register is broken into two effective 64 bit registers.
64// Add 8 for the indices that are mapped over the fp stack
65const int NumFloatRegs =
66 NumMMXRegs + 2 * NumXMMRegs + NumMicroFpRegs + 8;
67
68// These enumerate all the registers for dependence tracking.
69enum DependenceTags {
70 // FP_Reg_Base must be large enough to be bigger than any integer
71 // register index which has the IntFoldBit (1 << 6) set. To be safe
72 // we just start at (1 << 7) == 128.
73 FP_Reg_Base = 128,
74 CC_Reg_Base = FP_Reg_Base + NumFloatRegs,
74 Misc_Reg_Base = CC_Reg_Base + NumCCRegs, // NumCCRegs == 0
75 Misc_Reg_Base = CC_Reg_Base + NumCCRegs,
75 Max_Reg_Index = Misc_Reg_Base + NumMiscRegs
76};
77
78// semantically meaningful register indices
79//There is no such register in X86
80const int ZeroReg = NUM_INTREGS;
81const int StackPointerReg = INTREG_RSP;
82//X86 doesn't seem to have a link register

--- 14 unchanged lines hidden (view full) ---

97//These floating point types are correct for mmx, but not
98//technically for x87 (80 bits) or at all for xmm (128 bits)
99typedef double FloatReg;
100typedef uint64_t FloatRegBits;
101typedef union
102{
103 IntReg intReg;
104 FloatReg fpReg;
76 Max_Reg_Index = Misc_Reg_Base + NumMiscRegs
77};
78
79// semantically meaningful register indices
80//There is no such register in X86
81const int ZeroReg = NUM_INTREGS;
82const int StackPointerReg = INTREG_RSP;
83//X86 doesn't seem to have a link register

--- 14 unchanged lines hidden (view full) ---

98//These floating point types are correct for mmx, but not
99//technically for x87 (80 bits) or at all for xmm (128 bits)
100typedef double FloatReg;
101typedef uint64_t FloatRegBits;
102typedef union
103{
104 IntReg intReg;
105 FloatReg fpReg;
106 CCReg ccReg;
105 MiscReg ctrlReg;
106} AnyReg;
107
108typedef uint16_t RegIndex;
109
110} // namespace X86ISA
111
112#endif // __ARCH_X86_REGFILE_HH__
107 MiscReg ctrlReg;
108} AnyReg;
109
110typedef uint16_t RegIndex;
111
112} // namespace X86ISA
113
114#endif // __ARCH_X86_REGFILE_HH__