summaryrefslogtreecommitdiff
path: root/src/arch/isa_parser.py
diff options
context:
space:
mode:
authorSteve Reinhardt <steve.reinhardt@amd.com>2016-02-06 17:21:20 -0800
committerSteve Reinhardt <steve.reinhardt@amd.com>2016-02-06 17:21:20 -0800
commitf5343df1e1999e66c39b95085b77b547e7d94262 (patch)
tree87c16b2fd80e22d4402833604182bd3f72411464 /src/arch/isa_parser.py
parent92b750d5efb56359e3c95ca6bc093ab4b6395aa1 (diff)
downloadgem5-f5343df1e1999e66c39b95085b77b547e7d94262.tar.xz
arch: get rid of dummy var init
MemOperand variables were being initialized to 0 "to avoid 'uninitialized variable' errors" but these no longer seem to be a problem (with the exception of one use case in POWER that is arguably broken and easily fixed here). Getting rid of the initialization is necessary to set up a subsequent patch which extends memory operands to possibly not be scalars, making the '= 0' initialization no longer feasible.
Diffstat (limited to 'src/arch/isa_parser.py')
-rwxr-xr-xsrc/arch/isa_parser.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/arch/isa_parser.py b/src/arch/isa_parser.py
index 20df0a7db..cbc8651d1 100755
--- a/src/arch/isa_parser.py
+++ b/src/arch/isa_parser.py
@@ -790,10 +790,8 @@ class MemOperand(Operand):
return ''
def makeDecl(self):
- # Note that initializations in the declarations are solely
- # to avoid 'uninitialized variable' errors from the compiler.
# Declare memory data variable.
- return '%s %s = 0;\n' % (self.ctype, self.base_name)
+ return '%s %s;\n' % (self.ctype, self.base_name)
def makeRead(self, predRead):
if self.read_code != None: