From: Luke Kenneth Casson Leighton Date: Wed, 1 Dec 2021 12:06:46 +0000 (+0000) Subject: add regspec_decode which takes readmode arg and returns read/write X-Git-Tag: sv_maxu_works-initial~682 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=593fd150d2f6d8bb33a73b05032b386abc10e0c3;p=openpower-isa.git add regspec_decode which takes readmode arg and returns read/write as appropriate --- diff --git a/src/openpower/decoder/power_regspec_map.py b/src/openpower/decoder/power_regspec_map.py index c9b1c074..4a738557 100644 --- a/src/openpower/decoder/power_regspec_map.py +++ b/src/openpower/decoder/power_regspec_map.py @@ -198,3 +198,9 @@ def regspec_decode_write(e, regfile, name): assert False, "regspec not found %s %s" % (regfile, name) + +def regspec_decode(readmode, e, regfile, name): + if readmode: + return regspec_decode_read(e, regfile, name) + return regspec_decode_write(e, regfile, name) +