[libre-riscv-dev] FP reciprocal sqrt extension proposal

lkcl luke.leighton at gmail.com
Sun Aug 4 06:33:48 BST 2019



On Thursday, July 11, 2019 at 11:45:38 AM UTC+1, Jacob Lifshay wrote:
 

> For the encoding, I think using an encoding similar to both the 
> fsqrt.* and fdiv.* encodings is a good idea, since frsqrt is similar 
> to both fdiv and fsqrt; Therefore, as an initial proposal, I think 
> using a funct7 value of 0111100 and the rest of the instruction 
> identical to fsqrt is a good idea, since, as far as I'm aware, that 
> doesn't conflict with anything currently. 
>

ah! rats, i just started looking at the RV32/64G instruction set listings, 
chap 25 V20190621-draft, and hadn't noticed that FSQRT.S is 
funct7=0b0101100 where rs2=00000, FSQRT.D is funct7=0b0101101 and FSQRT.Q 
is funct7=0b0101111

so correspondingly:
FRSQRT.S would need to be funct7=0b011100
FRSQRT.D would need to be funct7=0b011101
FRSQRT.Q would need to be funct7=0b011111

also: where would FSQRT.H go, and likewise FRSQRT.H?  *checks table 11.3* 
section 11.6.... ok so those would be:

FRSQRT.H would need to be funct7=0b011110 and
FSQRT.H would need to be funct7=0b0101110

so the first 2 bits of funct7 select S/D/H/Q, the other 5 select the 
"function type".





More information about the libre-riscv-dev mailing list