capa icon indicating copy to clipboard operation
capa copied to clipboard

emit number(0) for insn like "xor eax, eax"

Open v1bh475u opened this issue 9 months ago • 12 comments

closes #2622

Checklist

  • [ ] No CHANGELOG update needed
  • [ ] No new tests needed
  • [X] No documentation update needed

v1bh475u avatar Mar 21 '25 10:03 v1bh475u

@williballenthin , I have tested binexport2 for arch64 but could not find any binary with arm architecture. However, I am confident that it will work. But let know me if there is any present in the database. We should add a test for that too.

v1bh475u avatar Mar 21 '25 20:03 v1bh475u

I think we could emit these features from the 'extract_insn_nzxor_characteristic_features' functions to avoid duplicate code.

mr-tz avatar Mar 24 '25 08:03 mr-tz

I think we could emit these features from the 'extract_insn_nzxor_characteristic_features' functions to avoid duplicate code.

I think the extract_insn_nzxor_charateristic_features is its own particular route and we should try to emit these features from it. Instead, what we can do is abstract away their logic into new helper functions and use them in place of raw checking. Shall I change to that?

v1bh475u avatar Mar 24 '25 11:03 v1bh475u

Interesting idea, can you show these changes for the vivisect extractor as an example?

Pro of the suggestion is a better separation, con is slightly more code.

mr-tz avatar Mar 25 '25 09:03 mr-tz

@mr-tz , can you please review the example implementation? If you approve this, I can do the same for other backends too.

v1bh475u avatar Mar 25 '25 10:03 v1bh475u

@mr-tz , can you please review the example implementation? If you approve this, I can do the same for other backends too.

@mr-tz ?

v1bh475u avatar Mar 26 '25 15:03 v1bh475u

Reason: The previous commit contained a logical bug, fixed in this commit.

v1bh475u avatar Mar 27 '25 15:03 v1bh475u

@williballenthin & @mr-tz , I have implemented the requested changes. Please review them whenever you are free. Also, please run the tests for binary ninja backend and let know me if you run into any issue.

v1bh475u avatar Mar 31 '25 19:03 v1bh475u

@mr-tz @williballenthin, I've made the requested changes. Please review whenever you are free.

v1bh475u avatar Apr 02 '25 12:04 v1bh475u

Done with the changes

v1bh475u avatar Apr 02 '25 19:04 v1bh475u

@mr-tz @williballenthin, can you please take a look at the changes that I have made whenever you are free and tell me if there is a need for further modifications?

v1bh475u avatar Apr 10 '25 15:04 v1bh475u

@mr-tz @williballenthin, can you please take a look at the changes that I have made whenever you are free and tell me if there is a need for further modifications?

@mr-tz @williballenthin @mike-hunhoff ?

v1bh475u avatar Jun 13 '25 07:06 v1bh475u