From 9da904332fea61eb1fc629f49b5f7a31a6ceb333 Mon Sep 17 00:00:00 2001 From: lkcl Date: Sat, 2 Apr 2022 12:59:33 +0100 Subject: [PATCH] --- openpower/sv/branches.mdwn | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/openpower/sv/branches.mdwn b/openpower/sv/branches.mdwn index b5411a95b..aa8d79343 100644 --- a/openpower/sv/branches.mdwn +++ b/openpower/sv/branches.mdwn @@ -514,7 +514,7 @@ for srcstep in range(VL): else if not SVRMmode.sz: # inverted CTR test skip mode if ¬BO[2] & CTRtest & ¬CTI then - CTR = CTR - 1 + CTR = CTR - 1 continue else testbit = SVRMmode.SNZ @@ -541,6 +541,14 @@ for srcstep in range(VL): break if SVCRf.scalar: break +# loop finally done, now test if branch (and update LR) +lr_ok <- SVRMmode.LRu +if cond_ok then + if AA then NIA <-iea EXTS(BD || 0b00) + else NIA <-iea CIA + EXTS(BD || 0b00) + lr_ok <- 0b1 +if LK & lr_ok then LR <-iea CIA + 4 + ``` Pseudocode for Vertical-First Mode: -- 2.30.2