From 593fd150d2f6d8bb33a73b05032b386abc10e0c3 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Wed, 1 Dec 2021 12:06:46 +0000 Subject: [PATCH] add regspec_decode which takes readmode arg and returns read/write as appropriate --- src/openpower/decoder/power_regspec_map.py | 6 ++++++ 1 file changed, 6 insertions(+) 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) + -- 2.30.2