From: lkcl Date: Mon, 9 Aug 2021 10:07:26 +0000 (+0100) Subject: (no commit message) X-Git-Tag: DRAFT_SVP64_0_1~460 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b47b250a9504550b967dbd792527dab5a449768c;p=libreriscv.git --- diff --git a/openpower/sv/branches.mdwn b/openpower/sv/branches.mdwn index e7315fa2d..447c33a41 100644 --- a/openpower/sv/branches.mdwn +++ b/openpower/sv/branches.mdwn @@ -269,6 +269,20 @@ if svstep_mode then SVSTATE.srcstep = new_srcstep ``` +v3.0B branch pseudocode: + +``` +if (mode_is_64bit) then M <- 0 +else M <- 32 +if ¬BO[2] then CTR <- CTR - 1 +ctr_ok <- BO[2] | ((CTR[M:63] != 0) ^ BO[3]) +cond_ok <- BO[0] | ¬(CR[BI+32] ^ BO[1]) +if ctr_ok & cond_ok then + if AA then NIA <-iea EXTS(BD || 0b00) + else NIA <-iea CIA + EXTS(BD || 0b00) +if LK then LR <-iea CIA + 4 +``` + # Example Shader code ```