diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2007-03-03 17:18:29 +0000 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2007-03-03 17:18:29 +0000 |
commit | 0150515ac3177eca8ff4b37fd85171098cc1709a (patch) | |
tree | e0ddc502adec98838308670b1be61de5db1d6c2c /src/arch/x86 | |
parent | 10871b734256677208388aad2bb3d8c4f8afac07 (diff) | |
download | gem5-0150515ac3177eca8ff4b37fd85171098cc1709a.tar.xz |
Filled in with basic x86 information. Some things are missing, wrong, or non-sensical in x86.
--HG--
extra : convert_revision : bba78db3667e214c95bb127872d3fdf546619703
Diffstat (limited to 'src/arch/x86')
-rw-r--r-- | src/arch/x86/isa_traits.hh | 53 |
1 files changed, 52 insertions, 1 deletions
diff --git a/src/arch/x86/isa_traits.hh b/src/arch/x86/isa_traits.hh index 8430e5821..2f4febd9b 100644 --- a/src/arch/x86/isa_traits.hh +++ b/src/arch/x86/isa_traits.hh @@ -58,10 +58,61 @@ #ifndef __ARCH_X86_ISATRAITS_HH__ #define __ARCH_X86_ISATRAITS_HH__ -#error X86 is not yet supported! +namespace LittleEndianGuest {} namespace X86ISA { + //This makes sure the little endian version of certain functions + //are used. + using namespace LittleEndianGuest; + + // X86 does not have a delay slot +#define ISA_HAS_DELAY_SLOT 0 + + // X86 NOP (XCHG rAX, rAX) + //XXX This needs to be set to an intermediate instruction struct + //which encodes this instruction + + // These enumerate all the registers for dependence tracking. + enum DependenceTags { + //The number of microcode registers needs to be added to this + FP_Base_DepTag = 16, + Ctrl_Base_DepTag = + FP_Base_DepTag + + //mmx/x87 registers + 8 + + //xmm registers + 16 + }; + + // semantically meaningful register indices + //There is no such register in X86 + const int ZeroReg = 0; + const int StackPointerReg = 4; //RSP + //X86 doesn't seem to have a link register + const int ReturnAddressReg = 0; + const int ReturnValueReg = 0; //RAX + const int FramePointerReg = 5; //RBP + const int ArgumentReg0 = 7; //RDI + const int ArgumentReg1 = 6; //RSI + const int ArgumentReg2 = 2; //RDX + const int ArgumentReg3 = 1; //RCX + const int ArgumentReg4 = 8; //R8W + const int ArgumentReg5 = 9; //R9W + + // Some OS syscalls use a second register (rdx) to return a second + // value + const int SyscallPseudoReturnReg = 2; //RDX + + //XXX These numbers are bogus + const int MaxInstSrcRegs = 10; + const int MaxInstDestRegs = 10; + + //4k. This value is not constant on x86. + const int LogVmPageSize = 12; + const int VMPageSize = (1 << LogVmPageSize); + + const int BranchPredAddrShiftAmt = 0; }; #endif // __ARCH_X86_ISATRAITS_HH__ |