capstone-engine / capstone

Capstone disassembly/disassembler framework for ARM, ARM64 (ARMv8), Alpha, BPF, Ethereum VM, HPPA, LoongArch, M68K, M680X, Mips, MOS65XX, PPC, RISC-V(rv32G/rv64G), SH, Sparc, SystemZ, TMS320C64X, TriCore, Webassembly, XCore and X86.
http://www.capstone-engine.org
7.61k stars 1.56k forks source link

Use `union` in `AArch64_AM_isSVEMaskOfIdenticalElements` type punning fix #2238

Closed kazarmy closed 10 months ago

kazarmy commented 10 months ago

This minor edit improves on #2237 by using union instead of memcpy thus dropping the dependence on memcpy and string.h. It also appears faster. It has been tested by the Rizin CI in rizinorg/rizin#4086.

Apparently it's possible for the translator to use this form instead of the form in #2237.

XVilka commented 10 months ago

@Rot127 what do you think?

XVilka commented 10 months ago

@kabeor could you please merge this one too?

kabeor commented 10 months ago

Thanks!