We have a user reporting a crash under Apple's Clang 7.0.2. The code is: __asm__ volatile( #if BOOL_X64 || BOOL_X32 ".byte 0x48, 0x0f, 0xc7, 0xf0;\n" // rdrand rax #else ".byte 0x0f, 0xc7, 0xf0;\n" // rdrand eax #endif "setc %1; " : "=a" (val), "=qm" (rc) : : "cc" );
The byte instructions are the op-codes for 'rdrand' instruction. Apple Clang was late to provide them, so we have an implementation regardless of downlevel compilers. They are also available for downlevel GCC compilers in a hosted environment where the iron provides a modern CPU. The same user reports adding EAX or RAX as a clobber clears the issue. Does Clang's Integrated Assembler need Output Operands listed as Clobbered? Thanks in advance. _______________________________________________ cfe-users mailing list cfe-users@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users