Does FSGNJX.D change the 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.
The result keeps rs1 exponent and significand fields, while the sign bit is the XOR of the rs1 and rs2 signs.
FSGNJX.D only recombines the sign bit of a double-precision floating-point encoding: exponent and significand fields come from rs1, while the sign bit is the XOR of the rs1 and rs2 signs. It performs no floating-point arithmetic, does not round, sets no floating-point exception flags, and does not canonicalize NaNs. 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 D-extension double-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; double-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 D-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.D is a D-extension OP-FP sign-injection instruction. The key points are how funct5/fmt/funct3 identify FSGNJX.D, and that the result only replaces the sign bit without rounding or fflags updates.
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. It is a bit-level sign operation in FP registers and does not perform rounded arithmetic or exception-flag paths.