From 337e23fe6be79e021293d0b19881dce96a20eea1 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