On Thu, Apr 15, 2021 at 9:34 AM Uros Bizjak wrote: > > On Thu, Apr 15, 2021 at 6:26 PM H.J. Lu wrote: > > > > On Thu, Apr 15, 2021 at 9:14 AM Uros Bizjak wrote: > > > > > > On Thu, Apr 15, 2021 at 5:11 PM H.J. Lu wrote: > > > > > > > > Use crc32 target option for CRC32 intrinsics to support CRC32 intrinsics > > > > without enabling SSE vector instructions. > > > > > > There is no CRC32 ISA. crc32 is part of SSE4.2 [1] and current > > > situation reflects that correctly. > > > > CRC32 is similar to POPCNT which was originally in SSE4.2. Now POPCNT > > It is not similar, POPCNT has its own CPUID flag and can be enabled > independently of SSE4.2. > > > is a separate feature which is also enabled by SSE4.2. Enable CRC32 only > > with SSE4.2 makes it impossible to use CRC32 with -mgeneral-regs-only. This > > patch addresses this issue the same way as POPCNT. > > CRC32 doesn't have its own CPUID flag, so PTA_CRC32 is pointless. PTA_CRC32 shouldn't be added. > OTOH, the situation is similar with MONITOR and MWAIT. These are There are no intrinsics for MONITOR nor MWAIT. > enabled with SSE3 and don't use XMM registers. Also somewhat similar > is FISTTP, but there is no intrinsic for this insn. True. Here is the v2 patch without PTA_CRC32. -- H.J.