FSGNJN.H
Float Sign Injection Negate (Half)
FSGNJN.H rd, rs1, rs2
Injects the negated sign of rs2 into rs1 (16-bit).
Encoding
Binary Layout
0010010
31:25
rs2
24:20
rs1
19:15
001
14:12
rd
11:7
1010011
6:0
Operands
-
rd
Destination floating-point register -
rs1
Floating-point register (magnitude source) -
rs2
Floating-point register (sign source)
Example
FSGNJN.H ft0, fa0, fa1
Related
More in Zfh
Reference
View in RISC-V Unprivileged ISA Specification ↗
RISC-V ISA Manual
Description
FSGNJN.H writes to rd a half-precision value with the magnitude of rs1 and the negated sign bit of rs2 (FNEG.H when rs1 = rs2). It does not modify the other bits and raises no exception flags, even for NaN inputs.
Operation
F[rd] = {~F[rs2][15], F[rs1][14:0]};