Gabe Black has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/49707 )
(
50 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the
submitted one.
)Change subject: arch: Stop using TheISA:: in the ISA parser.
......................................................................
arch: Stop using TheISA:: in the ISA parser.
The ISA description provides us with a namespace to use, so we can use
that instead of TheISA.
Change-Id: If1a13c39a09ab22c7cab1138220fa0162fc2effa
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49707
Maintainer: Gabe Black <[email protected]>
Tested-by: kokoro <[email protected]>
Reviewed-by: Giacomo Travaglini <[email protected]>
---
M src/arch/isa_parser/operand_types.py
1 file changed, 25 insertions(+), 11 deletions(-)
Approvals:
Giacomo Travaglini: Looks good to me, approved
Gabe Black: Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/arch/isa_parser/operand_types.py
b/src/arch/isa_parser/operand_types.py
index 67b8007..41e410b 100755
--- a/src/arch/isa_parser/operand_types.py
+++ b/src/arch/isa_parser/operand_types.py
@@ -76,6 +76,7 @@
}''' % (self.dflt_ctype, self.base_name, code)
def __init__(self, parser, full_name, ext, is_src, is_dest):
+ self.parser = parser
self.full_name = full_name
self.ext = ext
self.is_src = is_src
@@ -311,7 +312,6 @@
def __init__(self, parser, full_name, ext, is_src, is_dest):
Operand.__init__(self, parser, full_name, ext, is_src, is_dest)
self.elemExt = None
- self.parser = parser
def isReg(self):
return 1
@@ -379,8 +379,8 @@
rindex = '%d' % self.dest_reg_idx
c_readw = f'\t\tauto &tmp_d{rindex} = \n' \
- f'\t\t *(TheISA::VecRegContainer *)xc->{func}(\n' \
- f'\t\t this, {rindex});\n'
+ f'\t\t *({self.parser.namespace}::VecRegContainer
*)\n' \
+ f'\t\t xc->{func}(this, {rindex});\n'
if self.elemExt:
c_readw += '\t\tauto %s = tmp_d%s.as<%s>();\n' %
(self.base_name,
rindex, self.parser.operandTypeMap[self.elemExt])
@@ -421,7 +421,8 @@
if self.is_dest and self.is_src:
name += '_merger'
- c_read = f'\t\tTheISA::VecRegContainer tmp_s{rindex};\n' \
+ c_read = f'\t\t{self.parser.namespace}::VecRegContainer ' \
+ f'\t\t tmp_s{rindex};\n' \
f'\t\txc->{func}(this, {rindex}, &tmp_s{rindex});\n'
# If the parser has detected that elements are being access, create
# the appropriate view
@@ -506,10 +507,6 @@
class VecPredRegOperand(Operand):
reg_class = 'VecPredRegClass'
- def __init__(self, parser, full_name, ext, is_src, is_dest):
- Operand.__init__(self, parser, full_name, ext, is_src, is_dest)
- self.parser = parser
-
def isReg(self):
return 1
@@ -542,7 +539,8 @@
else:
rindex = '%d' % self.src_reg_idx
- c_read = f'\t\tTheISA::VecPredRegContainer tmp_s{rindex}; ' \
+ c_read = f'\t\t{self.parser.namespace}::VecPredRegContainer ' \
+ f'\t\t tmp_s{rindex}; ' \
f'xc->{func}(this, {rindex}, &tmp_s{rindex});\n'
if self.ext:
c_read += f'\t\tauto {self.base_name} = ' \
@@ -561,8 +559,8 @@
rindex = '%d' % self.dest_reg_idx
c_readw = f'\t\tauto &tmp_d{rindex} = \n' \
- f'\t\t *(TheISA::VecPredRegContainer *)xc->{func}(\n'
\
- f'\t\t this, {rindex});\n'
+ f'\t\t *({self.parser.namespace}::' \
+ f'VecPredRegContainer *)xc->{func}(this, {rindex});\n'
if self.ext:
c_readw += '\t\tauto %s = tmp_d%s.as<%s>();\n' % (
self.base_name, rindex,
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/49707
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: If1a13c39a09ab22c7cab1138220fa0162fc2effa
Gerrit-Change-Number: 49707
Gerrit-PatchSet: 52
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s