arch,arch-x86: Consolidate the add_microop method.
This was defined in the Micro_Container base class, and then again in each subclass. The base definition was different and less complete than the others, but the others were identical. Replace the base class definition with the definition in the subclasses, and delete the ones in the subclasses. Change-Id: Ib2d1ce72958ec299115efb6efced2bd14c08467c Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/56330 Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com> Maintainer: Gabe Black <gabe.black@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -49,6 +49,8 @@ class Micro_Container(object):
|
||||
self.labels = {}
|
||||
|
||||
def add_microop(self, mnemonic, microop):
|
||||
microop.mnemonic = mnemonic
|
||||
microop.micropc = len(self.microops)
|
||||
self.microops.append(microop)
|
||||
|
||||
def __str__(self):
|
||||
|
||||
@@ -133,10 +133,6 @@ def template MacroConstructor {{
|
||||
let {{
|
||||
from micro_asm import Combinational_Macroop, Rom_Macroop
|
||||
class X86Macroop(Combinational_Macroop):
|
||||
def add_microop(self, mnemonic, microop):
|
||||
microop.mnemonic = mnemonic
|
||||
microop.micropc = len(self.microops)
|
||||
self.microops.append(microop)
|
||||
def setAdjustEnv(self, val):
|
||||
self.adjust_env = val
|
||||
def adjustImm(self, val):
|
||||
|
||||
@@ -41,12 +41,6 @@ let {{
|
||||
from micro_asm import Rom
|
||||
|
||||
class X86MicrocodeRom(Rom):
|
||||
def add_microop(self, mnemonic, microop):
|
||||
microop.mnemonic = mnemonic
|
||||
microop.micropc = len(self.microops)
|
||||
self.microops.append(microop)
|
||||
|
||||
|
||||
def getDeclaration(self):
|
||||
declareLabels = \
|
||||
"GEM5_DEPRECATED_NAMESPACE(RomLabels, rom_labels);\n"
|
||||
|
||||
Reference in New Issue
Block a user