Browse Source
PPX functionality for PUSH/POP is not implemented in this patch
and will be implemented separately.
gas/ChangeLog:
2023-12-28 Zewei Mo <zewei.mo@intel.com>
H.J. Lu <hongjiu.lu@intel.com>
Lili Cui <lili.cui@intel.com>
* config/tc-i386.c: (enum i386_error):
New unsupported_rsp_register and invalid_src_register_set.
(md_assemble): Add handler for unsupported_rsp_register and
invalid_src_register_set.
(check_APX_operands): Add invalid check for push2/pop2.
(match_template): Handle check_APX_operands.
* testsuite/gas/i386/i386.exp: Add apx-push2pop2 tests.
* testsuite/gas/i386/x86-64.exp: Ditto.
* testsuite/gas/i386/x86-64-apx-push2pop2.d: New test.
* testsuite/gas/i386/x86-64-apx-push2pop2.s: Ditto.
* testsuite/gas/i386/x86-64-apx-push2pop2-intel.d: Ditto.
* testsuite/gas/i386/x86-64-apx-push2pop2-inval.l: Ditto.
* testsuite/gas/i386/x86-64-apx-push2pop2-inval.s: Ditto.
* testsuite/gas/i386/apx-push2pop2-inval.s: Ditto.
* testsuite/gas/i386/apx-push2pop2-inval.d: Ditto.
* testsuite/gas/i386/x86-64-apx-evex-promoted-bad.d: Added bad
testcases for POP2.
* testsuite/gas/i386/x86-64-apx-evex-promoted-bad.s: Ditto.
opcodes/ChangeLog:
* i386-dis-evex-reg.h: Add REG_EVEX_MAP4_8F.
* i386-dis-evex-w.h: Add EVEX_W_MAP4_8F_R_0 and EVEX_W_MAP4_FF_R_6
* i386-dis-evex.h: Add REG_EVEX_MAP4_8F.
* i386-dis.c (PUSH2_POP2_Fixup): Add special handling for PUSH2/POP2.
(get_valid_dis386): Add handler for vector length and address_mode for
APX-Push2/Pop2 insn.
(nd): define nd as b for EVEX-promoted instrutions.
(OP_VEX): Add handler of 64-bit vvvv register for APX-Push2/Pop2 insn.
* i386-gen.c: Add Push2Pop2 bitfield.
* i386-opc.h: Regenerated.
* i386-opc.tbl: Regenerated.
binutils-2_42-branch
committed by
Cui, Lili
19 changed files with 2291 additions and 1960 deletions
@ -0,0 +1,5 @@ |
|||
.* Assembler messages: |
|||
.*:6: Error: `push2' is only supported in 64-bit mode |
|||
.*:7: Error: `push2p' is only supported in 64-bit mode |
|||
.*:8: Error: `pop2' is only supported in 64-bit mode |
|||
.*:9: Error: `pop2p' is only supported in 64-bit mode |
|||
@ -0,0 +1,9 @@ |
|||
# Check 32bit APX-PUSH2/POP2 instructions |
|||
|
|||
.allow_index_reg |
|||
.text |
|||
_start: |
|||
push2 %rax, %rbx |
|||
push2p %rax, %rbx |
|||
pop2 %rax, %rbx |
|||
pop2p %rax, %rbx |
|||
@ -0,0 +1,42 @@ |
|||
#as: --64 |
|||
#objdump: -dw -Mintel |
|||
#name: i386 APX-push2pop2 insns (Intel disassembly) |
|||
#source: x86-64-apx-push2pop2.s |
|||
|
|||
.*: +file format .* |
|||
|
|||
Disassembly of section \.text: |
|||
|
|||
0+ <_start>: |
|||
\s*[a-f0-9]+:\s*62 f4 7c 18 ff f3\s+push2\s+rax,rbx |
|||
\s*[a-f0-9]+:\s*62 fc 3c 18 ff f1\s+push2\s+r8,r17 |
|||
\s*[a-f0-9]+:\s*62 d4 04 10 ff f1\s+push2\s+r31,r9 |
|||
\s*[a-f0-9]+:\s*62 dc 3c 10 ff f7\s+push2\s+r24,r31 |
|||
\s*[a-f0-9]+:\s*62 f4 fc 18 ff f3\s+push2p\s+rax,rbx |
|||
\s*[a-f0-9]+:\s*62 fc bc 18 ff f1\s+push2p\s+r8,r17 |
|||
\s*[a-f0-9]+:\s*62 d4 84 10 ff f1\s+push2p\s+r31,r9 |
|||
\s*[a-f0-9]+:\s*62 dc bc 10 ff f7\s+push2p\s+r24,r31 |
|||
\s*[a-f0-9]+:\s*62 f4 64 18 8f c0\s+pop2\s+rbx,rax |
|||
\s*[a-f0-9]+:\s*62 d4 74 10 8f c0\s+pop2\s+r17,r8 |
|||
\s*[a-f0-9]+:\s*62 dc 34 18 8f c7\s+pop2\s+r9,r31 |
|||
\s*[a-f0-9]+:\s*62 dc 04 10 8f c0\s+pop2\s+r31,r24 |
|||
\s*[a-f0-9]+:\s*62 f4 e4 18 8f c0\s+pop2p\s+rbx,rax |
|||
\s*[a-f0-9]+:\s*62 d4 f4 10 8f c0\s+pop2p\s+r17,r8 |
|||
\s*[a-f0-9]+:\s*62 dc b4 18 8f c7\s+pop2p\s+r9,r31 |
|||
\s*[a-f0-9]+:\s*62 dc 84 10 8f c0\s+pop2p\s+r31,r24 |
|||
\s*[a-f0-9]+:\s*62 f4 7c 18 ff f3\s+push2\s+rax,rbx |
|||
\s*[a-f0-9]+:\s*62 fc 3c 18 ff f1\s+push2\s+r8,r17 |
|||
\s*[a-f0-9]+:\s*62 d4 04 10 ff f1\s+push2\s+r31,r9 |
|||
\s*[a-f0-9]+:\s*62 dc 3c 10 ff f7\s+push2\s+r24,r31 |
|||
\s*[a-f0-9]+:\s*62 f4 fc 18 ff f3\s+push2p\s+rax,rbx |
|||
\s*[a-f0-9]+:\s*62 fc bc 18 ff f1\s+push2p\s+r8,r17 |
|||
\s*[a-f0-9]+:\s*62 d4 84 10 ff f1\s+push2p\s+r31,r9 |
|||
\s*[a-f0-9]+:\s*62 dc bc 10 ff f7\s+push2p\s+r24,r31 |
|||
\s*[a-f0-9]+:\s*62 f4 64 18 8f c0\s+pop2\s+rbx,rax |
|||
\s*[a-f0-9]+:\s*62 d4 74 10 8f c0\s+pop2\s+r17,r8 |
|||
\s*[a-f0-9]+:\s*62 dc 34 18 8f c7\s+pop2\s+r9,r31 |
|||
\s*[a-f0-9]+:\s*62 dc 04 10 8f c0\s+pop2\s+r31,r24 |
|||
\s*[a-f0-9]+:\s*62 f4 e4 18 8f c0\s+pop2p\s+rbx,rax |
|||
\s*[a-f0-9]+:\s*62 d4 f4 10 8f c0\s+pop2p\s+r17,r8 |
|||
\s*[a-f0-9]+:\s*62 dc b4 18 8f c7\s+pop2p\s+r9,r31 |
|||
\s*[a-f0-9]+:\s*62 dc 84 10 8f c0\s+pop2p\s+r31,r24 |
|||
@ -0,0 +1,13 @@ |
|||
.* Assembler messages: |
|||
.*:6: Error: operand size mismatch for `push2' |
|||
.*:7: Error: operand size mismatch for `push2' |
|||
.*:8: Error: 'rsp' register cannot be used for `push2' |
|||
.*:9: Error: 'rsp' register cannot be used for `push2' |
|||
.*:10: Error: operand size mismatch for `push2p' |
|||
.*:11: Error: 'rsp' register cannot be used for `push2p' |
|||
.*:12: Error: operand size mismatch for `pop2' |
|||
.*:13: Error: 'rsp' register cannot be used for `pop2' |
|||
.*:14: Error: 'rsp' register cannot be used for `pop2' |
|||
.*:15: Error: two dest registers must be distinct for `pop2' |
|||
.*:16: Error: 'rsp' register cannot be used for `pop2p' |
|||
.*:17: Error: two dest registers must be distinct for `pop2p' |
|||
@ -0,0 +1,17 @@ |
|||
# Check illegal APX-Push2Pop2 instructions |
|||
|
|||
.allow_index_reg |
|||
.text |
|||
_start: |
|||
push2 %ax, %bx |
|||
push2 %eax, %ebx |
|||
push2 %rsp, %r17 |
|||
push2 %r17, %rsp |
|||
push2p %eax, %ebx |
|||
push2p %rsp, %r17 |
|||
pop2 %ax, %bx |
|||
pop2 %rax, %rsp |
|||
pop2 %rsp, %rax |
|||
pop2 %r12, %r12 |
|||
pop2p %rax, %rsp |
|||
pop2p %r12, %r12 |
|||
@ -0,0 +1,42 @@ |
|||
#as: --64 |
|||
#objdump: -dw |
|||
#name: x86_64 APX-push2pop2 insns |
|||
#source: x86-64-apx-push2pop2.s |
|||
|
|||
.*: +file format .* |
|||
|
|||
Disassembly of section \.text: |
|||
|
|||
0+ <_start>: |
|||
\s*[a-f0-9]+:\s*62 f4 7c 18 ff f3\s+push2\s+%rbx,%rax |
|||
\s*[a-f0-9]+:\s*62 fc 3c 18 ff f1\s+push2\s+%r17,%r8 |
|||
\s*[a-f0-9]+:\s*62 d4 04 10 ff f1\s+push2\s+%r9,%r31 |
|||
\s*[a-f0-9]+:\s*62 dc 3c 10 ff f7\s+push2\s+%r31,%r24 |
|||
\s*[a-f0-9]+:\s*62 f4 fc 18 ff f3\s+push2p\s+%rbx,%rax |
|||
\s*[a-f0-9]+:\s*62 fc bc 18 ff f1\s+push2p\s+%r17,%r8 |
|||
\s*[a-f0-9]+:\s*62 d4 84 10 ff f1\s+push2p\s+%r9,%r31 |
|||
\s*[a-f0-9]+:\s*62 dc bc 10 ff f7\s+push2p\s+%r31,%r24 |
|||
\s*[a-f0-9]+:\s*62 f4 64 18 8f c0\s+pop2\s+%rax,%rbx |
|||
\s*[a-f0-9]+:\s*62 d4 74 10 8f c0\s+pop2\s+%r8,%r17 |
|||
\s*[a-f0-9]+:\s*62 dc 34 18 8f c7\s+pop2\s+%r31,%r9 |
|||
\s*[a-f0-9]+:\s*62 dc 04 10 8f c0\s+pop2\s+%r24,%r31 |
|||
\s*[a-f0-9]+:\s*62 f4 e4 18 8f c0\s+pop2p\s+%rax,%rbx |
|||
\s*[a-f0-9]+:\s*62 d4 f4 10 8f c0\s+pop2p\s+%r8,%r17 |
|||
\s*[a-f0-9]+:\s*62 dc b4 18 8f c7\s+pop2p\s+%r31,%r9 |
|||
\s*[a-f0-9]+:\s*62 dc 84 10 8f c0\s+pop2p\s+%r24,%r31 |
|||
\s*[a-f0-9]+:\s*62 f4 7c 18 ff f3\s+push2\s+%rbx,%rax |
|||
\s*[a-f0-9]+:\s*62 fc 3c 18 ff f1\s+push2\s+%r17,%r8 |
|||
\s*[a-f0-9]+:\s*62 d4 04 10 ff f1\s+push2\s+%r9,%r31 |
|||
\s*[a-f0-9]+:\s*62 dc 3c 10 ff f7\s+push2\s+%r31,%r24 |
|||
\s*[a-f0-9]+:\s*62 f4 fc 18 ff f3\s+push2p\s+%rbx,%rax |
|||
\s*[a-f0-9]+:\s*62 fc bc 18 ff f1\s+push2p\s+%r17,%r8 |
|||
\s*[a-f0-9]+:\s*62 d4 84 10 ff f1\s+push2p\s+%r9,%r31 |
|||
\s*[a-f0-9]+:\s*62 dc bc 10 ff f7\s+push2p\s+%r31,%r24 |
|||
\s*[a-f0-9]+:\s*62 f4 64 18 8f c0\s+pop2\s+%rax,%rbx |
|||
\s*[a-f0-9]+:\s*62 d4 74 10 8f c0\s+pop2\s+%r8,%r17 |
|||
\s*[a-f0-9]+:\s*62 dc 34 18 8f c7\s+pop2\s+%r31,%r9 |
|||
\s*[a-f0-9]+:\s*62 dc 04 10 8f c0\s+pop2\s+%r24,%r31 |
|||
\s*[a-f0-9]+:\s*62 f4 e4 18 8f c0\s+pop2p\s+%rax,%rbx |
|||
\s*[a-f0-9]+:\s*62 d4 f4 10 8f c0\s+pop2p\s+%r8,%r17 |
|||
\s*[a-f0-9]+:\s*62 dc b4 18 8f c7\s+pop2p\s+%r31,%r9 |
|||
\s*[a-f0-9]+:\s*62 dc 84 10 8f c0\s+pop2p\s+%r24,%r31 |
|||
@ -0,0 +1,39 @@ |
|||
# Check 64bit APX-Push2Pop2 instructions |
|||
|
|||
.allow_index_reg |
|||
.text |
|||
_start: |
|||
push2 %rbx, %rax |
|||
push2 %r17, %r8 |
|||
push2 %r9, %r31 |
|||
push2 %r31, %r24 |
|||
push2p %rbx, %rax |
|||
push2p %r17, %r8 |
|||
push2p %r9, %r31 |
|||
push2p %r31, %r24 |
|||
pop2 %rax, %rbx |
|||
pop2 %r8, %r17 |
|||
pop2 %r31, %r9 |
|||
pop2 %r24, %r31 |
|||
pop2p %rax, %rbx |
|||
pop2p %r8, %r17 |
|||
pop2p %r31, %r9 |
|||
pop2p %r24, %r31 |
|||
|
|||
.intel_syntax noprefix |
|||
push2 rax, rbx |
|||
push2 r8, r17 |
|||
push2 r31, r9 |
|||
push2 r24, r31 |
|||
push2p rax, rbx |
|||
push2p r8, r17 |
|||
push2p r31, r9 |
|||
push2p r24, r31 |
|||
pop2 rbx, rax |
|||
pop2 r17, r8 |
|||
pop2 r9, r31 |
|||
pop2 r31, r24 |
|||
pop2p rbx, rax |
|||
pop2p r17, r8 |
|||
pop2p r9, r31 |
|||
pop2p r31, r24 |
|||
File diff suppressed because it is too large
Loading…
Reference in new issue