Gabe Black has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/56468 )
Change subject: arch: Make ucasmlib a namespace package.
......................................................................
arch: Make ucasmlib a namespace package.
This will let the ISAs define their own ucasmlib directories which will
let them extend the base microcode assembler to add their own
implementations/libraries of microops by setting the python path. The
implementations will live in the existing arch directories which will (I
hope) keep the organization of the source tree clean.
Change-Id: Ic5d25e11e22735ba65725cc360da133ca8758f57
---
M src/arch/micro_asm_test.py
R src/arch/ucasmlib/containers.py
M src/arch/x86/isa/macroop.isa
M src/arch/x86/isa/rom.isa
4 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/src/arch/micro_asm_test.py b/src/arch/micro_asm_test.py
index d34f988..55f7b8e 100755
--- a/src/arch/micro_asm_test.py
+++ b/src/arch/micro_asm_test.py
@@ -24,7 +24,7 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-from ucasmlib import Macroop, Rom
+from ucasmlib.containers import Macroop, Rom
from ucasmlib.assembler import MicroAssembler
class Bah(object):
diff --git a/src/arch/ucasmlib/__init__.py b/src/arch/ucasmlib/containers.py
similarity index 100%
rename from src/arch/ucasmlib/__init__.py
rename to src/arch/ucasmlib/containers.py
diff --git a/src/arch/x86/isa/macroop.isa b/src/arch/x86/isa/macroop.isa
index 59d7958..bc5effc 100644
--- a/src/arch/x86/isa/macroop.isa
+++ b/src/arch/x86/isa/macroop.isa
@@ -92,7 +92,7 @@
}};
let {{
- from ucasmlib import Macroop
+ from ucasmlib.containers import Macroop
class X86Macroop(Macroop):
def setAdjustEnv(self, val):
self.adjust_env = val
diff --git a/src/arch/x86/isa/rom.isa b/src/arch/x86/isa/rom.isa
index 289efc8..58fd83c 100644
--- a/src/arch/x86/isa/rom.isa
+++ b/src/arch/x86/isa/rom.isa
@@ -25,7 +25,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
let {{
- from ucasmlib import Rom
+ from ucasmlib.containers import Rom
class X86MicrocodeRom(Rom):
def getDeclaration(self):
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/56468
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: Ic5d25e11e22735ba65725cc360da133ca8758f57
Gerrit-Change-Number: 56468
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <gabe.bl...@gmail.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s