Open udiboy1209 opened 1 year ago
You seem to have a pretty good grasp on the situation - there is presently not such a specialization helper, but one could be written. None of us on the angr team have the cycles to implement this, but if you were do to it, we would gladly accept the pull request.
I am trying to get a symbolic expression from an ARM64 code performing floating point compares. The function takes single
float
argument in regs0
which I have initialized asFPS('x', FLOAT)
.For the ARM64 insns:
The IRSB is:
This code essentially converts the value generated by
CmpF32
toNZCV
bits (refmk_convert_IRCmpF64Result_to_NZCV
inguest_arm64_toIR.c
) Whens0
is a symbolic variable, this whole computation stays as is in the constraint added to this IRSB's state. I am looking for a way to simplify this constraint. In other cases, there is a specialization helper which converts some instances ofarm64g_calculate_condition
toCmp*
.Is there a way where something similar can be done for floating-point compares too like the one above? I understand this is not just a simple replacement of the
arm64g_calculate_condition
function but one needs to look back to find theCmpF32
.