amd64: Implement RDRAND, VCVTPH2PS and VCVTPS2PH.
commit472b067e39a11a47ae3fa7cd7d3142558f78969d
authorJulian Seward <jseward@acm.org>
Sun, 17 Mar 2019 20:41:42 +0000 (17 21:41 +0100)
committerJulian Seward <jseward@acm.org>
Sun, 17 Mar 2019 20:43:26 +0000 (17 21:43 +0100)
treeef2db46260ecb6ebeb5d9cd6719159186ed422ae
parent081c34ea477f1512944e704e0b6972604824b9be
amd64: Implement RDRAND, VCVTPH2PS and VCVTPS2PH.

Bug 398870 - Please add support for instruction vcvtps2ph
Bug 353370 - RDRAND amd64->IR: unhandled instruction bytes: 0x48 0xF 0xC7 0xF0

This commit implements:

* amd64 RDRAND instruction, on hosts that have it.

* amd64 VCVTPH2PS and VCVTPS2PH, on hosts that have it.

  The presence/absence of these on the host is now reflected in the CPUID
  results returned to the guest.  So code that tests for these features in
  CPUID and acts accordingly should "just work".

* New test cases, none/tests/amd64/rdrand and none/tests/amd64/f16c.  These
  are built if the host's assembler can handle them, in the usual way.
24 files changed:
VEX/priv/guest_amd64_defs.h
VEX/priv/guest_amd64_helpers.c
VEX/priv/guest_amd64_toIR.c
VEX/priv/host_amd64_defs.c
VEX/priv/host_amd64_defs.h
VEX/priv/host_amd64_isel.c
VEX/priv/ir_defs.c
VEX/priv/main_main.c
VEX/pub/libvex.h
VEX/pub/libvex_ir.h
configure.ac
coregrind/m_machine.c
memcheck/mc_translate.c
memcheck/tests/vbit-test/irops.c
none/tests/amd64/Makefile.am
none/tests/amd64/f16c.c [new file with mode: 0644]
none/tests/amd64/f16c.stderr.exp [new file with mode: 0644]
none/tests/amd64/f16c.stdout.exp [new file with mode: 0644]
none/tests/amd64/f16c.vgtest [new file with mode: 0644]
none/tests/amd64/rdrand.c [new file with mode: 0644]
none/tests/amd64/rdrand.stderr.exp [new file with mode: 0644]
none/tests/amd64/rdrand.stdout.exp [new file with mode: 0644]
none/tests/amd64/rdrand.vgtest [new file with mode: 0644]
tests/x86_amd64_features.c