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

auto-sync BitCastStdArray.py: Transform to `union` instead #2257

Closed kazarmy closed 10 months ago

kazarmy commented 10 months ago

This pr transforms bit_cast<std::array<...>>(...) into a union instead because as per #2237 the current transform violates C strict aliasing rules thus causing optimization issues.


git grep 'bit_cast.*<.*array' in llvm-capstone's llvm/lib/Target subtree was used to find transform targets.

kabeor commented 10 months ago

Cool