From 8729a6f6a5148fb4dcb280a95dc0bdc35f02b96e Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 13 Jan 2012 22:19:32 +0000 Subject: Add vmfunc gas/ 2012-01-13 H.J. Lu * config/tc-i386.c (cpu_arch): Add ".vmfunc". * doc/c-i386.texi: Document vmfunc. gas/testsuite/ 2012-01-13 H.J. Lu * gas/i386/i386.exp: Run vmfunc and x86-64-vmfunc. * gas/i386/vmfunc.d: New. * gas/i386/vmfunc.s: Likewise. * gas/i386/x86-64-vmfunc.d: Likewise. opcodes/ 2012-01-13 H.J. Lu * i386-dis.c (mod_table): Add vmfunc. * i386-gen.c (cpu_flag_init): Add CPU_VMFUNC_FLAGS. (cpu_flags): CpuVMFUNC. * i386-opc.h (CpuVMFUNC): New. (i386_cpu_flags): Add cpuvmfunc. * i386-opc.tbl: Add vmfunc. * i386-init.h: Regenerated. * i386-tbl.h: Likewise. --- gas/ChangeLog | 6 ++++++ gas/config/tc-i386.c | 2 ++ gas/doc/c-i386.texi | 3 ++- gas/testsuite/ChangeLog | 8 ++++++++ gas/testsuite/gas/i386/i386.exp | 2 ++ gas/testsuite/gas/i386/vmfunc.d | 11 +++++++++++ gas/testsuite/gas/i386/vmfunc.s | 6 ++++++ gas/testsuite/gas/i386/x86-64-vmfunc.d | 12 ++++++++++++ 8 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 gas/testsuite/gas/i386/vmfunc.d create mode 100644 gas/testsuite/gas/i386/vmfunc.s create mode 100644 gas/testsuite/gas/i386/x86-64-vmfunc.d (limited to 'gas') diff --git a/gas/ChangeLog b/gas/ChangeLog index 5c3c60a..36d114a 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2012-01-13 H.J. Lu + + * config/tc-i386.c (cpu_arch): Add ".vmfunc". + + * doc/c-i386.texi: Document vmfunc. + 2012-01-13 Tristan Gingold * config/obj-macho.c (obj_mach_o_reorder_section_relocs): New. diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 219bef4..9e83a4d 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -689,6 +689,8 @@ static const arch_entry cpu_arch[] = CPU_ANY_AVX_FLAGS, 0, 1 }, { STRING_COMMA_LEN (".vmx"), PROCESSOR_UNKNOWN, CPU_VMX_FLAGS, 0, 0 }, + { STRING_COMMA_LEN (".vmfunc"), PROCESSOR_UNKNOWN, + CPU_VMFUNC_FLAGS, 0, 0 }, { STRING_COMMA_LEN (".smx"), PROCESSOR_UNKNOWN, CPU_SMX_FLAGS, 0, 0 }, { STRING_COMMA_LEN (".xsave"), PROCESSOR_UNKNOWN, diff --git a/gas/doc/c-i386.texi b/gas/doc/c-i386.texi index 30745b4..57f9146 100644 --- a/gas/doc/c-i386.texi +++ b/gas/doc/c-i386.texi @@ -145,6 +145,7 @@ accept various extension mnemonics. For example, @code{avx2}, @code{noavx}, @code{vmx}, +@code{vmfunc}, @code{smx}, @code{xsave}, @code{xsaveopt}, @@ -1014,7 +1015,7 @@ supported on the CPU specified. The choices for @var{cpu_type} are: @item @samp{.clflush} @tab @samp{.movbe} @tab @samp{.xsave} @tab @samp{.xsaveopt} @item @samp{.aes} @tab @samp{.pclmul} @tab @samp{.fma} @tab @samp{.fsgsbase} @item @samp{.rdrnd} @tab @samp{.f16c} @tab @samp{.avx2} @tab @samp{.bmi2} -@item @samp{.lzcnt} @tab @samp{.invpcid} +@item @samp{.lzcnt} @tab @samp{.invpcid} @tab @samp{.vmfunc} @item @samp{.3dnow} @tab @samp{.3dnowa} @tab @samp{.sse4a} @tab @samp{.sse5} @item @samp{.syscall} @tab @samp{.rdtscp} @tab @samp{.svme} @tab @samp{.abm} @item @samp{.lwp} @tab @samp{.fma4} @tab @samp{.xop} diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index ea80694..e96c7bd 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2012-01-13 H.J. Lu + + * gas/i386/i386.exp: Run vmfunc and x86-64-vmfunc. + + * gas/i386/vmfunc.d: New. + * gas/i386/vmfunc.s: Likewise. + * gas/i386/x86-64-vmfunc.d: Likewise. + 2012-01-13 Iain Sandoe * gas/all/redef2.d: Skip for Darwin. diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp index e38cd27..df37d2f 100644 --- a/gas/testsuite/gas/i386/i386.exp +++ b/gas/testsuite/gas/i386/i386.exp @@ -54,6 +54,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_32_check]] run_dump_test "disp-intel" run_dump_test "disp32" run_dump_test "vmx" + run_dump_test "vmfunc" run_dump_test "smx" run_dump_test "suffix" run_dump_test "immed32" @@ -302,6 +303,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t run_dump_test "svme64" run_dump_test "x86-64-amdfam10" run_dump_test "x86-64-vmx" + run_dump_test "x86-64-vmfunc" run_dump_test "immed64" run_dump_test "x86-64-sse3" run_dump_test "x86-64-crx" diff --git a/gas/testsuite/gas/i386/vmfunc.d b/gas/testsuite/gas/i386/vmfunc.d new file mode 100644 index 0000000..dd6998d --- /dev/null +++ b/gas/testsuite/gas/i386/vmfunc.d @@ -0,0 +1,11 @@ +#objdump: -dw +#name: i386 VMFUNC + +.*: +file format .* + +Disassembly of section .text: + +0+ : +[ ]*[a-f0-9]+: 0f 01 d4 vmfunc +[ ]*[a-f0-9]+: 90 nop +#pass diff --git a/gas/testsuite/gas/i386/vmfunc.s b/gas/testsuite/gas/i386/vmfunc.s new file mode 100644 index 0000000..6718bd0 --- /dev/null +++ b/gas/testsuite/gas/i386/vmfunc.s @@ -0,0 +1,6 @@ +# VMFUNC Instructions + + .text +foo: + vmfunc + nop diff --git a/gas/testsuite/gas/i386/x86-64-vmfunc.d b/gas/testsuite/gas/i386/x86-64-vmfunc.d new file mode 100644 index 0000000..2af8761 --- /dev/null +++ b/gas/testsuite/gas/i386/x86-64-vmfunc.d @@ -0,0 +1,12 @@ +#source: vmfunc.s +#objdump: -dw +#name: 64bit VMFUNC + +.*: +file format .* + +Disassembly of section .text: + +0+ : +[ ]*[a-f0-9]+: 0f 01 d4 vmfunc +[ ]*[a-f0-9]+: 90 nop +#pass -- cgit v1.1