hexagon_float: build sfmake/dfmake from bit pattern per V73

This commit is contained in:
Shawn Hoffman
2026-09-10 16:54:20 -04:00
committed by ghidra1
parent 0345ff83cf
commit ce95d4edb3
@@ -438,7 +438,7 @@ define pcodeop sfinvsqrtaPred; # Pe = exponent class bits of the approximation
# 1 1 0 1 0 1 1 0 0 1 i - - - - - P P i i i i i i i i i d d d d d
:sfmake^":neg" Rd5,Uimm16_21_0513 EndPacket is iclass=13 & op2227=0x19 & Uimm16_21_0513 & Rd5 & $(END_PACKET) {
Rd5 = int2float(-Uimm16_21_0513); # TODO: assumed functionality
Rd5 = (1 << 31) | (((127 - 6) << 23) + (zext(Uimm16_21_0513) << 17));
build EndPacket;
}
@@ -448,7 +448,7 @@ define pcodeop sfinvsqrtaPred; # Pe = exponent class bits of the approximation
# 1 1 0 1 0 1 1 0 0 0 i - - - - - P P i i i i i i i i i d d d d d
:sfmake^":pos" Rd5,Uimm16_21_0513 EndPacket is iclass=13 & op2227=0x18 & Uimm16_21_0513 & Rd5 & $(END_PACKET) {
Rd5 = int2float(Uimm16_21_0513); # TODO: assumed functionality
Rd5 = ((127 - 6) << 23) + (zext(Uimm16_21_0513) << 17);
build EndPacket;
}
@@ -628,7 +628,7 @@ define pcodeop sfinvsqrtaPred; # Pe = exponent class bits of the approximation
# 1 1 0 1 1 0 0 1 0 1 i - - - - - P P i i i i i i i i i d d d d d
:dfmake^":neg" Rdd5,Uimm16_21_0513 EndPacket is iclass=13 & op2227=0x25 & Uimm16_21_0513 & Rdd5 & $(END_PACKET) {
Rdd5 = int2float(-Uimm16_21_0513); # TODO: assumed functionality
Rdd5 = (1:8 << 63) | (((1023:8 - 6) << 52) + (zext(Uimm16_21_0513) << 46));
build EndPacket;
}
@@ -638,7 +638,7 @@ define pcodeop sfinvsqrtaPred; # Pe = exponent class bits of the approximation
# 1 1 0 1 1 0 0 1 0 0 i - - - - - P P i i i i i i i i i d d d d d
:dfmake^":pos" Rdd5,Uimm16_21_0513 EndPacket is iclass=13 & op2227=0x24 & Uimm16_21_0513 & Rdd5 & $(END_PACKET) {
Rdd5 = int2float(Uimm16_21_0513); # TODO: assumed functionality
Rdd5 = ((1023:8 - 6) << 52) + (zext(Uimm16_21_0513) << 46);
build EndPacket;
}