From 8020a657dcd8b84f5535d183bcb9a45975cbc6f6 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Wed, 15 Nov 2023 14:33:03 +0000 Subject: [PATCH] add 2nd maxloc case --- src/openpower/decoder/isa/{maxloc => }/maxloc.py | 4 ++++ 1 file changed, 4 insertions(+) rename src/openpower/decoder/isa/{maxloc => }/maxloc.py (78%) diff --git a/src/openpower/decoder/isa/maxloc/maxloc.py b/src/openpower/decoder/isa/maxloc.py similarity index 78% rename from src/openpower/decoder/isa/maxloc/maxloc.py rename to src/openpower/decoder/isa/maxloc.py index bb260d25..c5185c42 100644 --- a/src/openpower/decoder/isa/maxloc/maxloc.py +++ b/src/openpower/decoder/isa/maxloc.py @@ -21,5 +21,9 @@ if __name__ == '__main__': arr = [5,2,8,1,3,7,9,4] print("search list", arr) result = m2(arr) + print("Index of the maximum value in an array is: %d" % result) + arr = [5,2,8,9,9,7,9,4] + print("search list", arr) + result = m2(arr) print("Index of the maximum value in an array is: %d" % result) -- 2.30.2