$(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS))
$(call cc-option-add,CFLAGS,CC,-Wnested-externs)
-$(call as-option-add,CFLAGS,CC,"rdrand %eax",-DHAVE_AS_RDRAND)
-$(call as-option-add,CFLAGS,CC,"rdseed %eax",-DHAVE_AS_RDSEED)
$(call as-option-add,CFLAGS,CC,".equ \"x\"$(comma)1",-DHAVE_AS_QUOTED_SYM)
$(call as-option-add,CFLAGS,CC,"movdiri %rax$(comma)(%rax)",-DHAVE_AS_MOVDIR)
$(call as-option-add,CFLAGS,CC,"enqcmd (%rax)$(comma)%rax",-DHAVE_AS_ENQCMD)
return X86EMUL_UNRECOGNIZED;
case 6: /* rdrand */
-#ifdef HAVE_AS_RDRAND
generate_exception_if(s->vex.pfx >= vex_f3, X86_EXC_UD);
host_and_vcpu_must_have(rdrand);
*dst = s->ea;
: "=r" (dst->val), ASM_FLAG_OUT("=@ccc", "=qm") (carry) );
break;
default:
-# ifdef __x86_64__
+#ifdef __x86_64__
asm ( "rdrand %k0" ASM_FLAG_OUT(, "; setc %1")
: "=r" (dst->val), ASM_FLAG_OUT("=@ccc", "=qm") (carry) );
break;
case 8:
-# endif
+#endif
asm ( "rdrand %0" ASM_FLAG_OUT(, "; setc %1")
: "=r" (dst->val), ASM_FLAG_OUT("=@ccc", "=qm") (carry) );
break;
if ( carry )
regs->eflags |= X86_EFLAGS_CF;
break;
-#else
- return X86EMUL_UNIMPLEMENTED;
-#endif
case 7: /* rdseed / rdpid */
if ( s->vex.pfx == vex_f3 ) /* rdpid */
dst->bytes = 4;
break;
}
-#ifdef HAVE_AS_RDSEED
+
generate_exception_if(s->vex.pfx >= vex_f3, X86_EXC_UD);
host_and_vcpu_must_have(rdseed);
*dst = s->ea;
: "=r" (dst->val), ASM_FLAG_OUT("=@ccc", "=qm") (carry) );
break;
default:
-# ifdef __x86_64__
+#ifdef __x86_64__
asm ( "rdseed %k0" ASM_FLAG_OUT(, "; setc %1")
: "=r" (dst->val), ASM_FLAG_OUT("=@ccc", "=qm") (carry) );
break;
case 8:
-# endif
+#endif
asm ( "rdseed %0" ASM_FLAG_OUT(, "; setc %1")
: "=r" (dst->val), ASM_FLAG_OUT("=@ccc", "=qm") (carry) );
break;
if ( carry )
regs->eflags |= X86_EFLAGS_CF;
break;
-#endif
}
}
else