From: Luke Kenneth Casson Leighton Date: Sat, 13 Mar 2021 11:34:14 +0000 (+0000) Subject: add first version setvl pseudocode X-Git-Tag: convert-csv-opcode-to-binary~36 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c04f6115777aaaebb91b0cfb4f47084507a940ef;p=libreriscv.git add first version setvl pseudocode --- diff --git a/openpower/isa/simplev.mdwn b/openpower/isa/simplev.mdwn new file mode 100644 index 000000000..6a158bc20 --- /dev/null +++ b/openpower/isa/simplev.mdwn @@ -0,0 +1,36 @@ +# setvl + +SVL-Form + +* setvl RT, RA, SVi, vs, ms + +Pseudo-code: + + VLimm <- SVi + 1 + + if vs = 1 then + if RA = 0 then + VL <- (RA) + else + VL <- VLimm + else + VL <- SVSTATE[7:13] + + if ms = 1 then + MVL <- VLimm + else + MVL <- SVSTATE[0:6] + + if VL > MVL then + VL = MVL + + SVSTATE[0:6] = MVL + SVSTATE[7:13] = VL + + if RT != 0 then + RT <- VL + +Special Registers Altered: + + CR0 (if Rc=1) +