From: Luke Kenneth Casson Leighton Date: Sun, 25 Sep 2022 12:50:35 +0000 (+0100) Subject: have to sanity-check dz/zz after full qualifier-processing in branch-mode X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=aae4f645c1f07e98fe1c6a3c6b01c74b9d8e3283;p=openpower-isa.git have to sanity-check dz/zz after full qualifier-processing in branch-mode --- diff --git a/src/openpower/sv/trans/svp64.py b/src/openpower/sv/trans/svp64.py index 37fb7566..334f5093 100644 --- a/src/openpower/sv/trans/svp64.py +++ b/src/openpower/sv/trans/svp64.py @@ -1186,13 +1186,15 @@ class SVP64Asm: elif encmode == 'cti': svp64_rm.branch.CTR = 1 svp64_rm.branch.ctr.CTi = 1 - elif encmode in ['dz', 'zz']: - raise AssertionError("no encmode %s, use 'sz'" % encmode) else: raise AssertionError("unknown encmode %s" % encmode) else: raise AssertionError("unknown encmode %s" % encmode) + # sanity check if dz/zz used in branch-mode + if is_bc and dst_zero: + raise AssertionError("dz/zz not supported in branch, use 'sz'") + # check sea *after* all qualifiers are evaluated if sea: assert sv_mode in (None, 0b00, 0b01)