Added in the extended twin load format
authorGabe Black <gblack@eecs.umich.edu>
Sun, 17 Dec 2006 16:15:37 +0000 (11:15 -0500)
committerGabe Black <gblack@eecs.umich.edu>
Sun, 17 Dec 2006 16:15:37 +0000 (11:15 -0500)
src/arch/sparc/isa/decoder.isa:
    Added the extended twin load instructions
src/arch/sparc/isa/formats/mem/blockmem.isa:
    Added stuff to implement the extended twin loads. This created alot of duplication which I'll deal with later.

--HG--
extra : convert_revision : 5d8bdaacbfe83d21d3a396ce30ace90aeefc54d8

src/arch/sparc/isa/decoder.isa
src/arch/sparc/isa/formats/mem/blockmem.isa

index 01fe32ef709e7bd22e8cc52a4b7d71baeb87ce25..bbc6a8c4bcc1d567329ebd292392da4754d3b625 100644 (file)
@@ -1126,6 +1126,18 @@ decode OP default Unknown::unknown()
                     0x15: FailUnimpl::lddfa_real_io();
                     //ASI_REAL_IO_LITTLE
                     0x1D: FailUnimpl::lddfa_real_io_l();
+                    //ASI_LDTX_REAL
+                    0x26: TwinLoad::ldtx_real(
+                        {{RdTwin.udw = Mem.udw}}, {{EXT_ASI}});
+                    //ASI_LDTX_N
+                    0x27: TwinLoad::ldtx_n(
+                        {{RdTwin.udw = Mem.udw}}, {{EXT_ASI}});
+                    //ASI_LDTX_REAL_L
+                    0x2E: TwinLoad::ldtx_real_l(
+                        {{RdTwin.udw = Mem.udw}}, {{EXT_ASI}});
+                    //ASI_LDTX_N_L
+                    0x2F: TwinLoad::ldtx_n_l(
+                        {{RdTwin.udw = Mem.udw}}, {{EXT_ASI}});
                     //ASI_PRIMARY
                     0x80: FailUnimpl::lddfa_p();
                     //ASI_PRIMARY_LITTLE
index fcd61a5b487e565d62e75f99f458a75afffabb29..8bbbdc1dad24d19a3af75405abcbfc29c1422db2 100644 (file)
@@ -208,6 +208,64 @@ output decoder {{
 
 }};
 
+output decoder {{
+        std::string TwinMemMicro::generateDisassembly(Addr pc,
+                const SymbolTable *symtab) const
+        {
+            std::stringstream response;
+            bool load = flags[IsLoad];
+            bool save = flags[IsStore];
+
+            printMnemonic(response, mnemonic);
+            if(save)
+            {
+                printReg(response, _srcRegIdx[0]);
+                ccprintf(response, ", ");
+            }
+            ccprintf(response, "[ ");
+            printReg(response, _srcRegIdx[!save ? 0 : 1]);
+            ccprintf(response, " + ");
+            printReg(response, _srcRegIdx[!save ? 1 : 2]);
+            ccprintf(response, " ]");
+            if(load)
+            {
+                ccprintf(response, ", ");
+                printReg(response, _destRegIdx[0]);
+            }
+
+            return response.str();
+        }
+
+        std::string TwinMemImmMicro::generateDisassembly(Addr pc,
+                const SymbolTable *symtab) const
+        {
+            std::stringstream response;
+            bool load = flags[IsLoad];
+            bool save = flags[IsStore];
+
+            printMnemonic(response, mnemonic);
+            if(save)
+            {
+                printReg(response, _srcRegIdx[1]);
+                ccprintf(response, ", ");
+            }
+            ccprintf(response, "[ ");
+            printReg(response, _srcRegIdx[0]);
+            if(imm >= 0)
+                ccprintf(response, " + 0x%x ]", imm);
+            else
+                ccprintf(response, " + -0x%x ]", -imm);
+            if(load)
+            {
+                ccprintf(response, ", ");
+                printReg(response, _destRegIdx[0]);
+            }
+
+            return response.str();
+        }
+
+}};
+
 def template BlockMemDeclare {{
         /**
          * Static instruction class for a block memory operation
@@ -447,7 +505,7 @@ let {{
             decoder_output += BlockMemMicroConstructor.subst(iop)
             decoder_output += BlockMemMicroConstructor.subst(iop_imm)
             exec_output += doDualSplitExecute(
-                    pcedCode, addrCalcReg, addrCalcImm, execute, faultCode,
+                    pcedCode, addrCalcReg, addrCalcImm, LoadExecute, faultCode,
                     makeMicroName(name, microPc),
                     makeMicroName(name + "Imm", microPc),
                     makeMicroName(Name, microPc),