Gabe Black has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/56466 )
Change subject: arch-x86: Get rid of some cruft related to microcode.
......................................................................
arch-x86: Get rid of some cruft related to microcode.
The x86 ISA description file for macroops had an Exec template in it
that wasn't used, and a base class for X86 macroops that can be folded
into the version defined in C++.
Change-Id: Id1b167b7b7e019e9e602fe758a091aa03a012b13
---
M src/arch/x86/insts/macroop.hh
M src/arch/x86/isa/macroop.isa
2 files changed, 24 insertions(+), 41 deletions(-)
diff --git a/src/arch/x86/insts/macroop.hh b/src/arch/x86/insts/macroop.hh
index 36718f7..c0fa53d 100644
--- a/src/arch/x86/insts/macroop.hh
+++ b/src/arch/x86/insts/macroop.hh
@@ -42,6 +42,7 @@
#include "arch/x86/insts/static_inst.hh"
#include "arch/x86/emulenv.hh"
#include "arch/x86/types.hh"
+#include "base/logging.hh"
namespace gem5
{
@@ -84,6 +85,12 @@
return microops[microPC];
}
+ Fault
+ execute(ExecContext *, Trace::InstRecord *) const override
+ {
+ panic("Tried to execute macroop directly!");
+ }
+
std::string
generateDisassembly(Addr pc,
const loader::SymbolTable *symtab) const override
diff --git a/src/arch/x86/isa/macroop.isa b/src/arch/x86/isa/macroop.isa
index 6073756..9b6d682 100644
--- a/src/arch/x86/isa/macroop.isa
+++ b/src/arch/x86/isa/macroop.isa
@@ -35,45 +35,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//////////////////////////////////////////////////////////////////////////////
-//
-// Architecture independent
-//
-
-// Execute method for macroops.
-def template MacroExecPanic {{
- Fault
- execute(ExecContext *, Trace::InstRecord *) const override
- {
- panic("Tried to execute macroop directly!");
- return NoFault;
- }
-}};
-
-output header {{
- // Base class for combinationally generated macroops
- class Macroop : public X86ISA::MacroopBase
- {
- public:
- Macroop(const char *mnem, ExtMachInst _machInst,
- uint32_t _numMicroops, X86ISA::EmulEnv _env)
- : MacroopBase(mnem, _machInst, _numMicroops, _env)
- {}
-
- Fault
- execute(ExecContext *, Trace::InstRecord *) const override
- {
- panic("Tried to execute macroop directly!");
- }
- };
-}};
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// X86 specific
-//
-//////////////////////////////////////////////////////////////////////////////
-
// Basic instruction class declaration template.
def template MacroDeclare {{
GEM5_DEPRECATED_NAMESPACE(X86Macroop, x86_macroop);
@@ -200,7 +161,8 @@
for (label, micropc) in self.labels.items():
declareLabels += "const static uint64_t label_%s = %d;\n" \
% (label, micropc)
- iop = InstObjParams(self.getMnemonic(), self.name, "Macroop",
+ iop = InstObjParams(self.getMnemonic(), self.name,
+ "X86ISA::MacroopBase",
{"code" : "",
"declareLabels" : declareLabels
})
@@ -255,7 +217,8 @@
regSize = '''(%s || (env.base == INTREG_RSP && %s) ?
env.stackSize :
env.dataSize)''' % (useStackSize, memoryInst)
- iop = InstObjParams(self.getMnemonic(), self.name, "Macroop",
+ iop = InstObjParams(self.getMnemonic(), self.name,
+ "X86ISA::MacroopBase",
{"code" : "", "num_microops" : numMicroops,
"alloc_microops" : allocMicroops,
"adjust_env" : self.adjust_env,
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/56466
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Id1b167b7b7e019e9e602fe758a091aa03a012b13
Gerrit-Change-Number: 56466
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s