Does FSGNJX.H change a NaN payload?
Validly NaN-boxed sources (or format width equal to FLEN) preserve the payload; only the sign follows the XOR rule. An improperly NaN-boxed source in wider FLEN is first replaced with canonical NaN.
FSGNJX.H preserves the half-precision non-sign bits from rs1 and forms the result sign from the XOR of rs1 and rs2 signs.
FSGNJX.H is a floating-point sign-injection instruction in the Zfh format. The result exponent and significand fields come from rs1, while the sign bit is formed from the XOR of rs1 and rs2 signs; it performs no numeric conversion, does not round, sets no fflags, and does not canonicalize NaN payloads. When the format is narrower than FLEN, source upper bits must be all ones; an improperly NaN-boxed source is first treated as a canonical NaN in this format, and narrower results receive upper ones.
Shows the Zfh-extension half-precision OP-FP flow: decode fields, read FP operands, perform FSGNJX semantics, then write rd.
The word is split as an R-type OP-FP instruction; half-precision OP-FP instructions use opcode 1010011.
Sign injection only recombines the floating-point sign bit: exponent and significand fields come from rs1, while the sign bit follows the current instruction rule from rs2 or the rs1/rs2 sign relation; it does not round or canonicalize NaNs.
Sign injection only recombines the floating-point sign bit: exponent and significand fields come from rs1, while the sign bit follows the current instruction rule from rs2 or the rs1/rs2 sign relation; it does not round or canonicalize NaNs.
Assumes required extensions and FS enabled, valid NaN-boxing for narrower sources, and initial fflags=0. Finite inputs use the exact whitelist; signed zeros and infinities are supported. NaN payload bit patterns are covered in static text; textual NaN animation inputs are not supported. Equal sources require one initial value; rd may overlap a source and f0 is writable. Steps are teaching views.
This animation shows only Zfh-extension ISA-visible OP-FP encoding, example numeric results, and fflags relationship; it does not model FPU pipelines, latency, every IEEE 754 corner case, or microarchitecture.
FSGNJX.H is mainly about where the sign bit comes from. It only changes the result-sign rule while keeping rs1 exponent and significand as the non-sign result fields, so it does not round or set exception flags.
Assume required extensions and enabled FP state, valid f11=3.5 and f12=-2 in this format, correct NaN-boxing when narrower than FLEN, and initial fflags=0: f10=-3.5, sign 0 XOR 1=1, with f11 non-sign bits; fflags remains 0.
Assume required extensions and enabled FP state, valid f11=3.5 and f12=-2 in this format, correct NaN-boxing when narrower than FLEN, and initial fflags=0: f10=-3.5, sign 0 XOR 1=1, with f11 non-sign bits; fflags remains 0.
Validly NaN-boxed sources (or format width equal to FLEN) preserve the payload; only the sign follows the XOR rule. An improperly NaN-boxed source in wider FLEN is first replaced with canonical NaN.
No. The FSGNJ family performs sign injection, does not use rm, does not round, and does not set floating-point exception flags.