summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch')
-rwxr-xr-xsrc/arch/isa_parser.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/arch/isa_parser.py b/src/arch/isa_parser.py
index 87e02cb31..aa773ae80 100755
--- a/src/arch/isa_parser.py
+++ b/src/arch/isa_parser.py
@@ -856,7 +856,9 @@ class PCStateOperand(Operand):
ctype = 'TheISA::PCState'
if self.isPCPart():
ctype = self.ctype
- return "%s %s;\n" % (ctype, self.base_name)
+ # Note that initializations in the declarations are solely
+ # to avoid 'uninitialized variable' errors from the compiler.
+ return '%s %s = 0;\n' % (ctype, self.base_name)
def isPCState(self):
return 1