From 2116ebb3b20d48d3d71ddee864135d086fef2ce8 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sun, 24 Sep 2023 11:00:11 +0100 Subject: [PATCH] allow intercept on dsrd (rename DSRD) in poly13005-donna.py --- src/openpower/decoder/isa/poly1305-donna.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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): -- 2.30.2