FSGNJX.H
Float Sign Injection XOR (Half)
FSGNJX.H rd, rs1, rs2
Injects the XOR of signs of rs1 and rs2 (16-bit).
Encoding
Binary Layout
0010010
31:25
rs2
24:20
rs1
19:15
010
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
FSGNJX.H ft0, fa0, fa1
Related
More in Zfh
Reference
View in RISC-V Unprivileged ISA Specification ↗
RISC-V ISA Manual
Description
FSGNJX.H writes to rd a half-precision value with the magnitude of rs1 and the XOR of the sign bits of rs1 and rs2 (FABS.H when rs1 = rs2). It does not modify the other bits and raises no exception flags, even for NaN inputs.
Operation
F[rd] = {F[rs1][15] ^ F[rs2][15], F[rs1][14:0]};