From: Luke Kenneth Casson Leighton Date: Sun, 24 Sep 2023 10:00:11 +0000 (+0100) Subject: allow intercept on dsrd (rename DSRD) in poly13005-donna.py X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2116ebb3b20d48d3d71ddee864135d086fef2ce8;p=openpower-isa.git allow intercept on dsrd (rename DSRD) in poly13005-donna.py --- diff --git a/src/openpower/decoder/isa/poly1305-donna.py b/src/openpower/decoder/isa/poly1305-donna.py index 8149f590..390c71b5 100644 --- a/src/openpower/decoder/isa/poly1305-donna.py +++ b/src/openpower/decoder/isa/poly1305-donna.py @@ -22,7 +22,7 @@ def _LO(i): return i & mask64 # this function is extracted from bigint_cases.py (should be in a library) # it is a python implementation of dsrd, see pseudocode in # https://libre-soc.org/openpower/isa/svfixedarith/ -def dsrd(lo, hi, sh): +def _DSRD(lo, hi, sh): sh = sh % 64 v = lo << 64 v >>= sh @@ -46,6 +46,7 @@ class Poly1305Donna(object): def ADDLO(self, out, i): return _ADDLO(out, i) def SHR(self, i, shift): return _SHR(i, shift) def LO(self, i): return _LO(i) + def DSRD(self, lo, hi, sh): return _DSRD(lo, hi, sh) @staticmethod def le_bytes_to_num(data):