Make SW prefetch flag a parameter again, and add code to make
authorSteve Reinhardt <stever@eecs.umich.edu>
Thu, 26 Feb 2004 15:05:36 +0000 (07:05 -0800)
committerSteve Reinhardt <stever@eecs.umich.edu>
Thu, 26 Feb 2004 15:05:36 +0000 (07:05 -0800)
it actually do something on FullCPU.  Still disabled, as it
causes detailed-boot to hang when you turn it on.

arch/alpha/isa_desc:
    Add EAComp and MemAcc pseudo-instructions to prefetch StaticInst.
cpu/simple_cpu/simple_cpu.hh:
    Changed prefetch() return type from Fault to void.

--HG--
extra : convert_revision : c7cb42682bfea6af117c87d4dfdb06176b6fe6b7

arch/alpha/isa_desc
cpu/simple_cpu/simple_cpu.hh

index 75b2f4138ccd5d082bd1ddf63e2000d198d5a5c7..6a95b4e04289b40a1538476fa8b6bed38e3a8514 100644 (file)
@@ -1000,10 +1000,50 @@ def template PrefetchDeclare {{
      */
     class %(class_name)s : public %(base_class)s
     {
+      protected:
+
+       /**
+        * "Fake" effective address computation class for "%(mnemonic)s".
+        */
+       class EAComp : public EACompBase
+       {
+         public:
+           /// Constructor
+           EAComp(MachInst machInst)
+               : EACompBase(machInst)
+           {
+               %(ea_constructor)s;
+           }
+       };
+
+       /**
+        * "Fake" memory access instruction class for "%(mnemonic)s".
+        */
+       class MemAcc : public MemAccBase
+       {
+         public:
+           /// Constructor
+           MemAcc(MachInst machInst)
+               : MemAccBase(machInst, %(op_class)s)
+           {
+               %(memacc_constructor)s;
+           }
+       };
+
+       /// Pointer to EAComp object.
+       StaticInstPtr<AlphaISA> eaCompPtr;
+       /// Pointer to MemAcc object.
+       StaticInstPtr<AlphaISA> memAccPtr;
+
       public:
+
+       StaticInstPtr<AlphaISA> eaCompInst() { return eaCompPtr; }
+       StaticInstPtr<AlphaISA> memAccInst() { return memAccPtr; }
+
        /// Constructor
        %(class_name)s(MachInst machInst)
-            : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s)
+            : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s),
+              eaCompPtr(new EAComp(machInst)), memAccPtr(new MemAcc(machInst))
        {
            %(constructor)s;
        }
index 4a9872e75d22a0bb53ee28cee13ce3e4a55ae813..2b881509c892eb4309c8e14f7f2c80414e9a5a2e 100644 (file)
@@ -237,10 +237,9 @@ class SimpleCPU : public BaseCPU
     Fault write(T data, Addr addr, unsigned flags,
                         uint64_t *res);
 
-    Fault prefetch(Addr addr, unsigned flags)
+    void prefetch(Addr addr, unsigned flags)
     {
         // need to do this...
-        return No_Fault;
     }
 
     void writeHint(Addr addr, int size)