From bdb5b4b57975d52be09d7ce006869b8dab1e843f Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sun, 24 Sep 2023 19:06:28 +0100 Subject: [PATCH] detect if add arg2 is greater than 7 and ignore it for poly1305 tracking. this allows narrowing down of some data for test purposes --- src/openpower/decoder/isa/poly1305-donna.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/openpower/decoder/isa/poly1305-donna.py b/src/openpower/decoder/isa/poly1305-donna.py index d516b5ec..d1472186 100644 --- a/src/openpower/decoder/isa/poly1305-donna.py +++ b/src/openpower/decoder/isa/poly1305-donna.py @@ -45,8 +45,15 @@ def log(p1305, fn, result, args): 0 and say... 7? """ name = fn.__name__[1:] - if name not in ['ADD', 'ADDLO']: # only interested in adds for now + if name in ['ADD', 'ADDLO']: + # rright. the 2nd parameter, if between the values 0 and 7, + # is assumed to be some sort of carry. everything else is ignored + arg1, arg2 = args + if arg2 > 7: + return + else: # only interested in adds for now return + # begin hashing and adding this operation into the intercepts log phash = hash(p1305) info = (name, result, args) key = hash(info) -- 2.30.2