changeset 82ac95f4d9f0 in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=82ac95f4d9f0
description:
        merge

diffstat:

60 files changed, 1727 insertions(+), 1231 deletions(-)
src/arch/arm/linux/linux.hh                                                     
     |   46 +-
src/arch/x86/floatregs.hh                                                       
     |    2 
src/arch/x86/insts/microfpop.hh                                                 
     |    4 
src/arch/x86/insts/microldstop.hh                                               
     |   15 
src/arch/x86/insts/microregop.cc                                                
     |    2 
src/arch/x86/insts/microregop.hh                                                
     |   10 
src/arch/x86/insts/static_inst.cc                                               
     |    7 
src/arch/x86/insts/static_inst.hh                                               
     |   18 
src/arch/x86/intregs.hh                                                         
     |    9 
src/arch/x86/isa.cc                                                             
     |   22 -
src/arch/x86/isa.hh                                                             
     |   18 
src/arch/x86/isa/includes.isa                                                   
     |    2 
src/arch/x86/isa/insts/general_purpose/compare_and_test/bit_scan.py             
     |    6 
src/arch/x86/isa/insts/general_purpose/control_transfer/interrupts_and_exceptions.py
 |    2 
src/arch/x86/isa/insts/general_purpose/control_transfer/jump.py                 
     |    4 
src/arch/x86/isa/insts/general_purpose/data_transfer/stack_operations.py        
     |    4 
src/arch/x86/isa/insts/general_purpose/system_calls.py                          
     |    4 
src/arch/x86/isa/insts/system/control_registers.py                              
     |   22 -
src/arch/x86/isa/microasm.isa                                                   
     |   49 +-
src/arch/x86/isa/microops/base.isa                                              
     |    2 
src/arch/x86/isa/microops/fpop.isa                                              
     |   17 
src/arch/x86/isa/microops/ldstop.isa                                            
     |   40 -
src/arch/x86/isa/microops/limmop.isa                                            
     |   12 
src/arch/x86/isa/microops/regop.isa                                             
     |   50 +-
src/arch/x86/isa/operands.isa                                                   
     |  133 +++---
src/arch/x86/miscregs.hh                                                        
     |   57 ++
src/mem/ruby/common/Driver.hh                                                   
     |   17 
src/mem/ruby/libruby.cc                                                         
     |   35 +
src/mem/ruby/libruby.hh                                                         
     |   19 
src/mem/ruby/recorder/TraceRecord.cc                                            
     |    5 
src/mem/ruby/recorder/Tracer.cc                                                 
     |    9 
src/mem/ruby/system/CacheMemory.hh                                              
     |   45 ++
src/mem/ruby/system/DMASequencer.cc                                             
     |    5 
src/mem/ruby/system/Sequencer.cc                                                
     |   43 +-
src/mem/ruby/system/System.hh                                                   
     |    2 
src/mem/ruby/tester/DetermGETXGenerator.cc                                      
     |  120 ++++-
src/mem/ruby/tester/DetermGETXGenerator.hh                                      
     |   92 +++-
src/mem/ruby/tester/DetermInvGenerator.cc                                       
     |  102 +++--
src/mem/ruby/tester/DetermInvGenerator.hh                                       
     |   91 ++--
src/mem/ruby/tester/DetermSeriesGETSGenerator.cc                                
     |   91 ++--
src/mem/ruby/tester/DetermSeriesGETSGenerator.hh                                
     |   90 ++--
src/mem/ruby/tester/DeterministicDriver.cc                                      
     |  109 +++--
src/mem/ruby/tester/DeterministicDriver.hh                                      
     |  102 +++--
src/mem/ruby/tester/Driver_Tester.cc                                            
     |   44 --
src/mem/ruby/tester/Driver_Tester.hh                                            
     |   82 ----
src/mem/ruby/tester/EventQueue_Tester.hh                                        
     |  118 -----
src/mem/ruby/tester/Global_Tester.hh                                            
     |   74 ---
src/mem/ruby/tester/RaceyDriver.cc                                              
     |   87 ++--
src/mem/ruby/tester/RaceyDriver.hh                                              
     |   92 ++--
src/mem/ruby/tester/RaceyPseudoThread.cc                                        
     |   67 +--
src/mem/ruby/tester/RaceyPseudoThread.hh                                        
     |   49 --
src/mem/ruby/tester/SpecifiedGenerator.cc                                       
     |   79 ++-
src/mem/ruby/tester/SpecifiedGenerator.hh                                       
     |   88 ++--
src/mem/ruby/tester/Tester_Globals.hh                                           
     |   66 +++
src/mem/ruby/tester/main.cc                                                     
     |   79 ++-
src/mem/ruby/tester/main.hh                                                     
     |   84 ++--
src/mem/ruby/tester/test_framework.cc                                           
     |  203 +++++-----
src/mem/ruby/tester/test_framework.hh                                           
     |   84 ++--
src/mem/rubymem.cc                                                              
     |    2 
src/mem/slicc/symbols/StateMachine.cc                                           
     |  126 +++++-

diffs (truncated from 5025 to 300 lines):

diff -r cecc7019b458 -r 82ac95f4d9f0 src/arch/arm/linux/linux.hh
--- a/src/arch/arm/linux/linux.hh       Sat Jul 18 17:03:51 2009 -0500
+++ b/src/arch/arm/linux/linux.hh       Sat Jul 18 17:40:20 2009 -0500
@@ -47,22 +47,22 @@
 
     //@{
     /// open(2) flag values.
-    static const int TGT_O_RDONLY      = 0x00000000;   //!< O_RDONLY
-    static const int TGT_O_WRONLY      = 0x00000001;   //!< O_WRONLY
-    static const int TGT_O_RDWR                = 0x00000002;   //!< O_RDWR
-    static const int TGT_O_CREAT       = 0x00000100;   //!< O_CREAT
-    static const int TGT_O_EXCL                = 0x00000200;   //!< O_EXCL
-    static const int TGT_O_NOCTTY      = 0x00000400;   //!< O_NOCTTY
-    static const int TGT_O_TRUNC       = 0x00001000;   //!< O_TRUNC
-    static const int TGT_O_APPEND      = 0x00002000;   //!< O_APPEND
-    static const int TGT_O_NONBLOCK     = 0x00004000;  //!< O_NONBLOCK
-    static const int TGT_O_SYNC                = 0x00010000;   //!< O_SYNC
-    static const int TGT_FASYNC                = 0x00020000;   //!< FASYNC
-    static const int TGT_O_DIRECT      = 0x00040000;   //!< O_DIRECT
-    static const int TGT_O_LARGEFILE   = 0x00100000;   //!< O_LARGEFILE
-    static const int TGT_O_DIRECTORY   = 0x00200000;   //!< O_DIRECTORY
-    static const int TGT_O_NOFOLLOW    = 0x00400000;   //!< O_NOFOLLOW
-    static const int TGT_O_NOATIME     = 0x01000000;   //!< O_NOATIME
+    static const int TGT_O_RDONLY    = 00000000; //!< O_RDONLY
+    static const int TGT_O_WRONLY    = 00000001; //!< O_WRONLY
+    static const int TGT_O_RDWR      = 00000002; //!< O_RDWR
+    static const int TGT_O_CREAT     = 00000100; //!< O_CREAT
+    static const int TGT_O_EXCL      = 00000200; //!< O_EXCL
+    static const int TGT_O_NOCTTY    = 00000400; //!< O_NOCTTY
+    static const int TGT_O_TRUNC     = 00001000; //!< O_TRUNC
+    static const int TGT_O_APPEND    = 00002000; //!< O_APPEND
+    static const int TGT_O_NONBLOCK  = 00004000; //!< O_NONBLOCK
+    static const int TGT_O_SYNC      = 00010000; //!< O_SYNC
+    static const int TGT_FASYNC      = 00020000; //!< FASYNC
+    static const int TGT_O_DIRECTORY = 00040000; //!< O_DIRECTORY
+    static const int TGT_O_NOFOLLOW  = 00100000; //!< O_NOFOLLOW
+    static const int TGT_O_DIRECT    = 00200000; //!< O_DIRECT
+    static const int TGT_O_LARGEFILE = 00400000; //!< O_LARGEFILE
+    static const int TGT_O_NOATIME   = 01000000; //!< O_NOATIME
     //@}
 
     /// For mmap().
@@ -70,13 +70,13 @@
 
     //@{
     /// For getsysinfo().
-    static const unsigned GSI_PLATFORM_NAME = 103;  //!< platform name as 
string
-    static const unsigned GSI_CPU_INFO = 59;   //!< CPU information
-    static const unsigned GSI_PROC_TYPE = 60;  //!< get proc_type
-    static const unsigned GSI_MAX_CPU = 30;         //!< max # cpu's on this 
machine
-    static const unsigned GSI_CPUS_IN_BOX = 55;        //!< number of CPUs in 
system
-    static const unsigned GSI_PHYSMEM = 19;            //!< Physical memory in 
KB
-    static const unsigned GSI_CLK_TCK = 42;            //!< clock freq in Hz
+    static const unsigned GSI_PLATFORM_NAME = 103; //!< platform name as string
+    static const unsigned GSI_CPU_INFO = 59;       //!< CPU information
+    static const unsigned GSI_PROC_TYPE = 60;      //!< get proc_type
+    static const unsigned GSI_MAX_CPU = 30;        //!< max # cpu's on this 
machine
+    static const unsigned GSI_CPUS_IN_BOX = 55;    //!< number of CPUs in 
system
+    static const unsigned GSI_PHYSMEM = 19;        //!< Physical memory in KB
+    static const unsigned GSI_CLK_TCK = 42;        //!< clock freq in Hz
     //@}
 
     //@{
diff -r cecc7019b458 -r 82ac95f4d9f0 src/arch/x86/floatregs.hh
--- a/src/arch/x86/floatregs.hh Sat Jul 18 17:03:51 2009 -0500
+++ b/src/arch/x86/floatregs.hh Sat Jul 18 17:40:20 2009 -0500
@@ -166,7 +166,7 @@
     static inline FloatRegIndex
     FLOATREG_STACK(int index, int top)
     {
-        return (FloatRegIndex)(NUM_FLOATREGS + ((top + index + 8) % 8));
+        return FLOATREG_FPR((top + index + 8) % 8);
     }
 };
 
diff -r cecc7019b458 -r 82ac95f4d9f0 src/arch/x86/insts/microfpop.hh
--- a/src/arch/x86/insts/microfpop.hh   Sat Jul 18 17:03:51 2009 -0500
+++ b/src/arch/x86/insts/microfpop.hh   Sat Jul 18 17:40:20 2009 -0500
@@ -80,13 +80,13 @@
                 const char *mnem, const char *_instMnem,
                 bool isMicro, bool isDelayed,
                 bool isFirst, bool isLast,
-                RegIndex _src1, RegIndex _src2, RegIndex _dest,
+                InstRegIndex _src1, InstRegIndex _src2, InstRegIndex _dest,
                 uint8_t _dataSize, int8_t _spm,
                 OpClass __opClass) :
             X86MicroopBase(_machInst, mnem, _instMnem,
                     isMicro, isDelayed, isFirst, isLast,
                     __opClass),
-            src1(_src1), src2(_src2), dest(_dest),
+            src1(_src1.idx), src2(_src2.idx), dest(_dest.idx),
             dataSize(_dataSize), spm(_spm)
         {}
 /*
diff -r cecc7019b458 -r 82ac95f4d9f0 src/arch/x86/insts/microldstop.hh
--- a/src/arch/x86/insts/microldstop.hh Sat Jul 18 17:03:51 2009 -0500
+++ b/src/arch/x86/insts/microldstop.hh Sat Jul 18 17:40:20 2009 -0500
@@ -93,20 +93,21 @@
         LdStOp(ExtMachInst _machInst,
                 const char * mnem, const char * _instMnem,
                 bool isMicro, bool isDelayed, bool isFirst, bool isLast,
-                uint8_t _scale, RegIndex _index, RegIndex _base,
-                uint64_t _disp, uint8_t _segment,
-                RegIndex _data,
+                uint8_t _scale, InstRegIndex _index, InstRegIndex _base,
+                uint64_t _disp, InstRegIndex _segment,
+                InstRegIndex _data,
                 uint8_t _dataSize, uint8_t _addressSize,
                 Request::FlagsType _memFlags,
                 OpClass __opClass) :
         X86MicroopBase(machInst, mnem, _instMnem,
                 isMicro, isDelayed, isFirst, isLast, __opClass),
-                scale(_scale), index(_index), base(_base),
-                disp(_disp), segment(_segment),
-                data(_data),
+                scale(_scale), index(_index.idx), base(_base.idx),
+                disp(_disp), segment(_segment.idx),
+                data(_data.idx),
                 dataSize(_dataSize), addressSize(_addressSize),
-                memFlags(_memFlags | _segment)
+                memFlags(_memFlags | _segment.idx)
         {
+            assert(_segment.idx < NUM_SEGMENTREGS);
             foldOBit = (dataSize == 1 && !_machInst.rex.present) ? 1 << 6 : 0;
             foldABit =
                 (addressSize == 1 && !_machInst.rex.present) ? 1 << 6 : 0;
diff -r cecc7019b458 -r 82ac95f4d9f0 src/arch/x86/insts/microregop.cc
--- a/src/arch/x86/insts/microregop.cc  Sat Jul 18 17:03:51 2009 -0500
+++ b/src/arch/x86/insts/microregop.cc  Sat Jul 18 17:40:20 2009 -0500
@@ -67,7 +67,7 @@
             bool subtract) const
     {
         DPRINTF(X86, "flagMask = %#x\n", flagMask);
-        if (_destRegIdx[0] & (1 << 6)) {
+        if (_destRegIdx[0] & IntFoldBit) {
             _dest >>= 8;
         }
         uint64_t flags = oldFlags & ~flagMask;
diff -r cecc7019b458 -r 82ac95f4d9f0 src/arch/x86/insts/microregop.hh
--- a/src/arch/x86/insts/microregop.hh  Sat Jul 18 17:03:51 2009 -0500
+++ b/src/arch/x86/insts/microregop.hh  Sat Jul 18 17:40:20 2009 -0500
@@ -79,13 +79,13 @@
                 const char *mnem, const char *_instMnem,
                 bool isMicro, bool isDelayed,
                 bool isFirst, bool isLast,
-                RegIndex _src1, RegIndex _dest,
+                InstRegIndex _src1, InstRegIndex _dest,
                 uint8_t _dataSize, uint16_t _ext,
                 OpClass __opClass) :
             X86MicroopBase(_machInst, mnem, _instMnem,
                     isMicro, isDelayed, isFirst, isLast,
                     __opClass),
-            src1(_src1), dest(_dest),
+            src1(_src1.idx), dest(_dest.idx),
             dataSize(_dataSize), ext(_ext)
         {
             foldOBit = (dataSize == 1 && !_machInst.rex.present) ? 1 << 6 : 0;
@@ -107,14 +107,14 @@
                 const char *mnem, const char *_instMnem,
                 bool isMicro, bool isDelayed,
                 bool isFirst, bool isLast,
-                RegIndex _src1, RegIndex _src2, RegIndex _dest,
+                InstRegIndex _src1, InstRegIndex _src2, InstRegIndex _dest,
                 uint8_t _dataSize, uint16_t _ext,
                 OpClass __opClass) :
             RegOpBase(_machInst, mnem, _instMnem,
                     isMicro, isDelayed, isFirst, isLast,
                     _src1, _dest, _dataSize, _ext,
                     __opClass),
-            src2(_src2)
+            src2(_src2.idx)
         {
         }
 
@@ -132,7 +132,7 @@
                 const char * mnem, const char *_instMnem,
                 bool isMicro, bool isDelayed,
                 bool isFirst, bool isLast,
-                RegIndex _src1, uint8_t _imm8, RegIndex _dest,
+                InstRegIndex _src1, uint8_t _imm8, InstRegIndex _dest,
                 uint8_t _dataSize, uint16_t _ext,
                 OpClass __opClass) :
             RegOpBase(_machInst, mnem, _instMnem,
diff -r cecc7019b458 -r 82ac95f4d9f0 src/arch/x86/insts/static_inst.cc
--- a/src/arch/x86/insts/static_inst.cc Sat Jul 18 17:03:51 2009 -0500
+++ b/src/arch/x86/insts/static_inst.cc Sat Jul 18 17:40:20 2009 -0500
@@ -149,14 +149,11 @@
 
         if (reg < FP_Base_DepTag) {
             const char * suffix = "";
-            bool fold = reg & (1 << 6);
-            reg &= ~(1 << 6);
+            bool fold = reg & IntFoldBit;
+            reg &= ~IntFoldBit;
 
             if(fold)
-            {
                 suffix = "h";
-                reg -= 4;
-            }
             else if(reg < 8 && size == 1)
                 suffix = "l";
 
diff -r cecc7019b458 -r 82ac95f4d9f0 src/arch/x86/insts/static_inst.hh
--- a/src/arch/x86/insts/static_inst.hh Sat Jul 18 17:03:51 2009 -0500
+++ b/src/arch/x86/insts/static_inst.hh Sat Jul 18 17:40:20 2009 -0500
@@ -64,6 +64,18 @@
 namespace X86ISA
 {
     /**
+     * Class for register indices passed to instruction constructors. Using a
+     * wrapper struct for these lets take advantage of the compiler's type
+     * checking.
+     */
+    struct InstRegIndex
+    {
+        RegIndex idx;
+        explicit InstRegIndex(RegIndex _idx) : idx(_idx)
+        {}
+    };
+
+    /**
      * Base class for all X86 static instructions.
      */
 
@@ -96,7 +108,7 @@
         inline uint64_t merge(uint64_t into, uint64_t val, int size) const
         {
             X86IntReg reg = into;
-            if(_destRegIdx[0] & (1 << 6))
+            if(_destRegIdx[0] & IntFoldBit)
             {
                 reg.H = val;
                 return reg;
@@ -127,7 +139,7 @@
         {
             X86IntReg reg = from;
             DPRINTF(X86, "Picking with size %d\n", size);
-            if(_srcRegIdx[idx] & (1 << 6))
+            if(_srcRegIdx[idx] & IntFoldBit)
                 return reg.H;
             switch(size)
             {
@@ -148,7 +160,7 @@
         {
             X86IntReg reg = from;
             DPRINTF(X86, "Picking with size %d\n", size);
-            if(_srcRegIdx[idx] & (1 << 6))
+            if(_srcRegIdx[idx] & IntFoldBit)
                 return reg.SH;
             switch(size)
             {
diff -r cecc7019b458 -r 82ac95f4d9f0 src/arch/x86/intregs.hh
--- a/src/arch/x86/intregs.hh   Sat Jul 18 17:03:51 2009 -0500
+++ b/src/arch/x86/intregs.hh   Sat Jul 18 17:40:20 2009 -0500
@@ -60,6 +60,8 @@
 
 #include "arch/x86/x86_traits.hh"
 #include "base/bitunion.hh"
+#include "base/misc.hh"
+#include "sim/core.hh"
 
 namespace X86ISA
 {
@@ -165,6 +167,9 @@
         NUM_INTREGS
     };
 
+    // This needs to be large enough to miss all the other bits of an index.
+    static const IntRegIndex IntFoldBit = (IntRegIndex)(1 << 6);
+
     inline static IntRegIndex
     INTREG_MICRO(int index)
     {
@@ -187,7 +192,9 @@
     inline static IntRegIndex
     INTREG_FOLDED(int index, int foldBit)
     {
-        return (IntRegIndex)(((index & 0x1C) == 4 ? foldBit : 0) | index);
+        if ((index & 0x1C) == 4 && foldBit)
+            index = (index - 4) | foldBit;
+        return (IntRegIndex)index;
     }
 };
 
diff -r cecc7019b458 -r 82ac95f4d9f0 src/arch/x86/isa.cc
--- a/src/arch/x86/isa.cc       Sat Jul 18 17:03:51 2009 -0500
+++ b/src/arch/x86/isa.cc       Sat Jul 18 17:40:20 2009 -0500
@@ -28,7 +28,6 @@
  * Authors: Gabe Black
  */
 
-#include "arch/x86/floatregs.hh"
 #include "arch/x86/isa.hh"
 #include "arch/x86/tlb.hh"
 #include "cpu/base.hh"
@@ -355,25 +354,4 @@
     UNSERIALIZE_ARRAY(regVal, NumMiscRegs);
 }
 
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to