From: Nathan Binkert Date: Fri, 6 Nov 2009 01:21:25 +0000 (-0800) Subject: isa_parser: allow negative integer literals X-Git-Tag: stable_2012_02_02~1579 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=52ccfde2cdd4558e81e8eaf923c6952b3530ef0b;p=gem5.git isa_parser: allow negative integer literals --- diff --git a/src/arch/isa_parser.py b/src/arch/isa_parser.py index 2db7c6aa6..bd45a8313 100755 --- a/src/arch/isa_parser.py +++ b/src/arch/isa_parser.py @@ -128,7 +128,7 @@ class ISAParser(Grammar): # Integer literal def t_INTLIT(self, t): - r'(0x[\da-fA-F]+)|\d+' + r'-?(0x[\da-fA-F]+)|\d+' try: t.value = int(t.value,0) except ValueError: