Closed rhighs closed 1 year ago
Patch coverage: 97.29
% and project coverage change: +2.89
:tada:
Comparison is base (
68cff85
) 56.25% compared to head (ceadf9f
) 59.14%.
:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
This PR brings the implementation of the various opcodes for multiplications in arm-mode, I decided to keep the already present
ArmModeInstruction::Multiply
type and extending it a little with aArmModeMultiplyKind
to allow for a basic way of differentiating the opcodes.Overflows are checked using
u64|u32::overflowing_mul(op1, op2)
which conveniently returns a tuple containing the mul result and whether an overflow occurred. I chose this way as it clearly shows the intent of what's happening there, perhaps we could only use such function when theS
flag is set, otherwise there's really no point in using that. (It might bring extra overhead for no reason, but you guys tell me if that's any good to keep it like so).Other than that, I don't really have anything important here to address. The opcodes are quite similar to each other, and it's not guaranteed we're gonna need them all, but still I brought them as it required little effort to do so.
As for the testing side I tried to test the most common case for each one, some need to check for condition flags, some don't and so on...
Looking forward to improve this as much as we can! :v: