Browse Source
Implement ptwrite instruction defined in Intel64 and IA-32 Architectures Software Developer’s Manual, June 2016. gas/ * config/tc-i386.c (cpu_arch): Add .ptwrite. * doc/c-i386.texi: Document ptwrite and .ptwrite. * testsuite/gas/i386/i386.exp: Run ptwrite, ptwrite-intel, x86-64-ptwrite and x86-64-ptwrite-intel. * testsuite/gas/i386/ptwrite-intel.d: New file. * testsuite/gas/i386/ptwrite.d: Likewise. * testsuite/gas/i386/ptwrite.s: Likewise. * testsuite/gas/i386/x86-64-ptwrite-intel.d: Likewise. * testsuite/gas/i386/x86-64-ptwrite.d: Likewise. * testsuite/gas/i386/x86-64-ptwrite.s: Likewise. opcodes/ * i386-dis.c (PREFIX_MOD_0_0FAE_REG_4): New. (PREFIX_MOD_3_0FAE_REG_4): Likewise. (prefix_table): Add PREFIX_MOD_0_0FAE_REG_4 and PREFIX_MOD_3_0FAE_REG_4. (mod_table): Use PREFIX_MOD_0_0FAE_REG_4 and PREFIX_MOD_3_0FAE_REG_4. * i386-gen.c (cpu_flag_init): Add CPU_PTWRITE_FLAGS. (cpu_flags): Add CpuPTWRITE. * i386-opc.h (CpuPTWRITE): New. (i386_cpu_flags): Add cpuptwrite. * i386-opc.tbl: Add ptwrite instruction. * i386-init.h: Regenerated. * i386-tbl.h: Likewise.binutils-2_28-branch
17 changed files with 5524 additions and 5329 deletions
@ -0,0 +1,18 @@ |
|||
#as: |
|||
#objdump: -dw -Mintel |
|||
#name: i386 PTWRITE insns (Intel disassembly) |
|||
#source: ptwrite.s |
|||
|
|||
.*: +file format .* |
|||
|
|||
|
|||
Disassembly of section \.text: |
|||
|
|||
0+ <_start>: |
|||
+[a-f0-9]+: f3 0f ae e1 ptwrite ecx |
|||
+[a-f0-9]+: f3 0f ae e1 ptwrite ecx |
|||
+[a-f0-9]+: f3 0f ae 21 ptwrite DWORD PTR \[ecx\] |
|||
+[a-f0-9]+: f3 0f ae 21 ptwrite DWORD PTR \[ecx\] |
|||
+[a-f0-9]+: f3 0f ae e1 ptwrite ecx |
|||
+[a-f0-9]+: f3 0f ae 21 ptwrite DWORD PTR \[ecx\] |
|||
#pass |
|||
@ -0,0 +1,18 @@ |
|||
#as: |
|||
#objdump: -dw |
|||
#name: i386 PTWRITE insns |
|||
#source: ptwrite.s |
|||
|
|||
.*: +file format .* |
|||
|
|||
|
|||
Disassembly of section \.text: |
|||
|
|||
0+ <_start>: |
|||
+[a-f0-9]+: f3 0f ae e1 ptwrite %ecx |
|||
+[a-f0-9]+: f3 0f ae e1 ptwrite %ecx |
|||
+[a-f0-9]+: f3 0f ae 21 ptwritel \(%ecx\) |
|||
+[a-f0-9]+: f3 0f ae 21 ptwritel \(%ecx\) |
|||
+[a-f0-9]+: f3 0f ae e1 ptwrite %ecx |
|||
+[a-f0-9]+: f3 0f ae 21 ptwritel \(%ecx\) |
|||
#pass |
|||
@ -0,0 +1,12 @@ |
|||
# Check 32bit PTWRITE instructions |
|||
|
|||
.text |
|||
_start: |
|||
ptwrite %ecx |
|||
ptwritel %ecx |
|||
ptwrite (%ecx) |
|||
ptwritel (%ecx) |
|||
|
|||
.intel_syntax noprefix |
|||
ptwrite ecx |
|||
ptwrite DWORD PTR [ecx] |
|||
@ -0,0 +1,23 @@ |
|||
#as: |
|||
#objdump: -dw -Mintel |
|||
#name: x86_64 PTWRITE insns (Intel disassembly) |
|||
#source: x86-64-ptwrite.s |
|||
|
|||
.*: +file format .* |
|||
|
|||
|
|||
Disassembly of section \.text: |
|||
|
|||
0+ <_start>: |
|||
+[a-f0-9]+: f3 0f ae e1 ptwrite ecx |
|||
+[a-f0-9]+: f3 0f ae e1 ptwrite ecx |
|||
+[a-f0-9]+: f3 48 0f ae e1 ptwrite rcx |
|||
+[a-f0-9]+: f3 48 0f ae e1 ptwrite rcx |
|||
+[a-f0-9]+: f3 0f ae 21 ptwrite DWORD PTR \[rcx\] |
|||
+[a-f0-9]+: f3 0f ae 21 ptwrite DWORD PTR \[rcx\] |
|||
+[a-f0-9]+: f3 48 0f ae 21 ptwrite QWORD PTR \[rcx\] |
|||
+[a-f0-9]+: f3 0f ae e1 ptwrite ecx |
|||
+[a-f0-9]+: f3 48 0f ae e1 ptwrite rcx |
|||
+[a-f0-9]+: f3 0f ae 21 ptwrite DWORD PTR \[rcx\] |
|||
+[a-f0-9]+: f3 48 0f ae 21 ptwrite QWORD PTR \[rcx\] |
|||
#pass |
|||
@ -0,0 +1,23 @@ |
|||
#as: |
|||
#objdump: -dw |
|||
#name: x86_64 PTWRITE insns |
|||
#source: x86-64-ptwrite.s |
|||
|
|||
.*: +file format .* |
|||
|
|||
|
|||
Disassembly of section \.text: |
|||
|
|||
0+ <_start>: |
|||
+[a-f0-9]+: f3 0f ae e1 ptwrite %ecx |
|||
+[a-f0-9]+: f3 0f ae e1 ptwrite %ecx |
|||
+[a-f0-9]+: f3 48 0f ae e1 ptwrite %rcx |
|||
+[a-f0-9]+: f3 48 0f ae e1 ptwrite %rcx |
|||
+[a-f0-9]+: f3 0f ae 21 ptwritel \(%rcx\) |
|||
+[a-f0-9]+: f3 0f ae 21 ptwritel \(%rcx\) |
|||
+[a-f0-9]+: f3 48 0f ae 21 ptwriteq \(%rcx\) |
|||
+[a-f0-9]+: f3 0f ae e1 ptwrite %ecx |
|||
+[a-f0-9]+: f3 48 0f ae e1 ptwrite %rcx |
|||
+[a-f0-9]+: f3 0f ae 21 ptwritel \(%rcx\) |
|||
+[a-f0-9]+: f3 48 0f ae 21 ptwriteq \(%rcx\) |
|||
#pass |
|||
@ -0,0 +1,17 @@ |
|||
# Check 64bit PTWRITE instructions |
|||
|
|||
.text |
|||
_start: |
|||
ptwrite %ecx |
|||
ptwritel %ecx |
|||
ptwrite %rcx |
|||
ptwriteq %rcx |
|||
ptwrite (%rcx) |
|||
ptwritel (%rcx) |
|||
ptwriteq (%rcx) |
|||
|
|||
.intel_syntax noprefix |
|||
ptwrite ecx |
|||
ptwrite rcx |
|||
ptwrite DWORD PTR [rcx] |
|||
ptwrite QWORD PTR [rcx] |
|||
File diff suppressed because it is too large
File diff suppressed because it is too large
Loading…
Reference in new issue