From b7e64d86c80eaec5ed30a54b1cb354af4183a6a2 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sun, 2 Oct 2022 12:38:32 +0100 Subject: [PATCH] remove complaints about standard Cray-style Vectors for the past 40 years being able to have VL set to zero dynamically at runtime. it is not appropriate to have complaints about 40-year-old standard canonical behaviour of Cray Vectors in source code comments VL=0 being set dynamically at runtime based on an algorithm input sets the operations to nop because that is expected behaviour. to not have VL=0 would be catastrophically inconvenient: it would require either Illegal-Instruction traps to be raised, or Condition Codes to be set and followed up with instructions to test and branch for the dynamic condition when RA was zero, or to pre-test for RA or CTR pre-being-zero prior to entry into a loop. Data-Dependent Fail-First would become irrevocably damaged as well as it is possible for VL to be set to zero at that time (first test fails) sv.bc would also be irrevocably damaged as it would no longer be possible in VLSET mode to have VL become truncated to zero dynamically based on a Condition Code. in all it is pretty catastrophic to the entire Cray-Vector paradigm and would severely damage SimpleV to disallow VL=0 purely for arbitrary "convenience" --- .../test/algorithms/svp64_utf_8_validation.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/openpower/test/algorithms/svp64_utf_8_validation.py b/src/openpower/test/algorithms/svp64_utf_8_validation.py index afcbde68..933a9fd8 100644 --- a/src/openpower/test/algorithms/svp64_utf_8_validation.py +++ b/src/openpower/test/algorithms/svp64_utf_8_validation.py @@ -256,9 +256,18 @@ def svp64_utf8_validation_asm(): f"bclr 20, 0, 0 # blr", f"final_check:", - # need to set VL to something non-zero otherwise all our scalar - # instructions don't run --- I definitely don't like that ... scalar - # instructions should run regardless of VL. + # need to set VL to 1, here + # https://bugs.libre-soc.org/show_bug.cgi?id=905 + # (SVP64Single is planned for accessing high-regnumbers as Scalars) + # + # setting VL=0 (often set dynamically at runtime in Standard Cray + # Vectors) is the standard canonical way in Cray Vectors to legitimately + # request instructions not to be run at all (nops). + # + # a workaround for not having SVP64Single right now and still get + # at the high register numbers (32-127) is to static-set VL=1 + # the alternative is to move cur_bytes to reg numbers 0-31 but + # 16 regs within the range 0-31 is a lot to ask for. f"setvl 0, 0, 1, 0, 1, 1", # set VL to 1 # check if prev input is incomplete -- 2.30.2