Gabe Black has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/42972 )

Change subject: arch: Don't zero initialize operands in the ISA parser.
......................................................................

arch: Don't zero initialize operands in the ISA parser.

If the operand is a source, it will be initialized by generated code. If
it's a destination and it's read before it's used or not used at all
then that's a bug which needs to be fixed.

Change-Id: I53a6f7068613da670b7a665d25ad112cdb51205b
---
M src/arch/isa_parser/operand_types.py
1 file changed, 1 insertion(+), 3 deletions(-)



diff --git a/src/arch/isa_parser/operand_types.py b/src/arch/isa_parser/operand_types.py
index bed58d7..0ea2f2d 100755
--- a/src/arch/isa_parser/operand_types.py
+++ b/src/arch/isa_parser/operand_types.py
@@ -165,9 +165,7 @@
         return my_flags

     def makeDecl(self):
-        # Note that initializations in the declarations are solely
-        # to avoid 'uninitialized variable' errors from the compiler.
-        return self.ctype + ' ' + self.base_name + ' = 0;\n';
+        return self.ctype + ' ' + self.base_name + ';\n';


 class IntRegOperand(Operand):

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/42972
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: I53a6f7068613da670b7a665d25ad112cdb51205b
Gerrit-Change-Number: 42972
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

Reply via email to