From: Luke Kenneth Casson Leighton Date: Mon, 30 Aug 2021 12:05:59 +0000 (+0100) Subject: also add pattern-recognition for just X-Git-Tag: xlen-bcd~102 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=73d15d3c4c5550ef85fbd1ea68b9afca2500d0bd;p=openpower-isa.git also add pattern-recognition for just [0] * XLEN have to keep a close eye on this --- diff --git a/src/openpower/decoder/power_pseudo.py b/src/openpower/decoder/power_pseudo.py index ec9bf085..5b251342 100644 --- a/src/openpower/decoder/power_pseudo.py +++ b/src/openpower/decoder/power_pseudo.py @@ -202,7 +202,11 @@ concat_test2 = """ [0]*(XLEN-16) """ -code = concat_test2 +concat_test3 = """ +[0]*XLEN +""" + +code = concat_test3 #code = concat_test1 #code = XLEN_test #code = logictest diff --git a/src/openpower/decoder/pseudo/parser.py b/src/openpower/decoder/pseudo/parser.py index b9779b0d..c93b74cd 100644 --- a/src/openpower/decoder/pseudo/parser.py +++ b/src/openpower/decoder/pseudo/parser.py @@ -190,7 +190,8 @@ def identify_sint_mul_pattern(p): if p[2] != '*': # multiply return False if (not isinstance(p[3], ast.Constant) and # rhs = Num - not isinstance(p[3], ast.BinOp)): # rhs = (XLEN-something) + not isinstance(p[3], ast.BinOp) and # rhs = (XLEN-something) + not isinstance(p[3], ast.Name)): # rhs = XLEN return False if not isinstance(p[1], ast.List): # lhs is a list return False