diff options
author | Amit Pawar <Amit.Pawar@amd.com> | 2018-05-30 12:27:35 +0530 |
---|---|---|
committer | Amit Pawar <Amit.Pawar@amd.com> | 2018-05-30 12:27:35 +0530 |
commit | a9660a6f4063c7e1fb892ec709c954c56896ab8d (patch) | |
tree | 9e136710cfd340299328f0eeedbc473d3e8f1a0e /gas/testsuite | |
parent | 5294170687db7d997a00f88b765ef353121aa441 (diff) | |
download | gdb-a9660a6f4063c7e1fb892ec709c954c56896ab8d.zip gdb-a9660a6f4063c7e1fb892ec709c954c56896ab8d.tar.gz gdb-a9660a6f4063c7e1fb892ec709c954c56896ab8d.tar.bz2 |
Add znver2 support.
gas/
* config/tc-i386.c (cpu_flag_init): Add CPU_ZNVER2_FLAGS.
* doc/c-i386.texi : Document znver2.
* gas/testsuite/gas/i386/arch-13.s: Updated for znver2.
* gas/testsuite/gas/i386/arch-13.d: Updated.
* gas/testsuite/gas/i386/arch-13-znver1.d: Updated.
* gas/testsuite/gas/i386/arch-13-znver2.d: New file.
* gas/testsuite/gas/i386/x86-64-arch-3.s: Updated for znver2.
* gas/testsuite/gas/i386/x86-64-arch-3.d: Updated.
* gas/testsuite/gas/i386/x86-64-arch-3-znver1.d: Updated.
* gas/testsuite/gas/i386/x86-64-arch-3-znver2.d: New file.
* gas/testsuite/gas/i386/i386.exp: Updated for new test.
opcode/
* i386-gen.c (cpu_flag_init): Add CPU_ZNVER2_FLAGS.
* i386-init.h : Regenerated.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/gas/i386/arch-13-znver1.d | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/arch-13-znver2.d | 29 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/arch-13.d | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/arch-13.s | 39 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/i386.exp | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-arch-3-znver1.d | 7 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-arch-3-znver2.d | 31 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-arch-3.d | 7 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-arch-3.s | 40 |
9 files changed, 135 insertions, 34 deletions
diff --git a/gas/testsuite/gas/i386/arch-13-znver1.d b/gas/testsuite/gas/i386/arch-13-znver1.d index b76cfab..8e84b5e 100644 --- a/gas/testsuite/gas/i386/arch-13-znver1.d +++ b/gas/testsuite/gas/i386/arch-13-znver1.d @@ -1,7 +1,7 @@ #source: arch-13.s -#as: -march=znver1 +#as: -march=znver1+rdpid+clwb+wbnoinvd #objdump: -dw -#name: i386 arch 13 (znver1) +#name: i386 arch 13 (znver1) .*: file format .* @@ -22,4 +22,8 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 0f 01 fa monitorx %eax,%ecx,%edx [ ]*[a-f0-9]+: 0f 01 fb mwaitx %eax,%ecx,%ebx [ ]*[a-f0-9]+: 0f 01 fb mwaitx %eax,%ecx,%ebx +[ ]*[a-f0-9]+:[ ]*66 0f ae 31[ ]*clwb \(%ecx\) +[ ]*[a-f0-9]+:[ ]*66 0f ae b4 f4 c0 1d fe ff[ ]*clwb -0x1e240\(%esp,%esi,8\) +[ ]*[a-f0-9]+:[ ]*f3 0f c7 f8[ ]*rdpid %eax +[ ]*[a-f0-9]+:[ ]*f3 0f 09[ ]*wbnoinvd[ ]* #pass diff --git a/gas/testsuite/gas/i386/arch-13-znver2.d b/gas/testsuite/gas/i386/arch-13-znver2.d new file mode 100644 index 0000000..e780bf9 --- /dev/null +++ b/gas/testsuite/gas/i386/arch-13-znver2.d @@ -0,0 +1,29 @@ +#source: arch-13.s +#as: -march=znver2 +#objdump: -dw +#name: i386 arch 13 (znver2) + +.*: file format .* + +Disassembly of section .text: + +0+ <.text>: +[ ]*[a-f0-9]+: 0f 01 ca clac[ ]* +[ ]*[a-f0-9]+: 0f 01 cb stac[ ]* +[ ]*[a-f0-9]+: 66 0f 38 f6 ca adcx %edx,%ecx +[ ]*[a-f0-9]+: f3 0f 38 f6 ca adox %edx,%ecx +[ ]*[a-f0-9]+: 0f c7 f8 rdseed %eax +[ ]*[a-f0-9]+: 0f 01 fc clzero[ ]* +[ ]*[a-f0-9]+: 0f c7 21 xsavec \(%ecx\) +[ ]*[a-f0-9]+: 0f c7 29 xsaves \(%ecx\) +[ ]*[a-f0-9]+: 66 0f ae 39 clflushopt \(%ecx\) +[ ]*[a-f0-9]+: 0f 01 fa monitorx %eax,%ecx,%edx +[ ]*[a-f0-9]+: 67 0f 01 fa monitorx %ax,%ecx,%edx +[ ]*[a-f0-9]+: 0f 01 fa monitorx %eax,%ecx,%edx +[ ]*[a-f0-9]+: 0f 01 fb mwaitx %eax,%ecx,%ebx +[ ]*[a-f0-9]+: 0f 01 fb mwaitx %eax,%ecx,%ebx +[ ]*[a-f0-9]+:[ ]*66 0f ae 31[ ]*clwb \(%ecx\) +[ ]*[a-f0-9]+:[ ]*66 0f ae b4 f4 c0 1d fe ff[ ]*clwb -0x1e240\(%esp,%esi,8\) +[ ]*[a-f0-9]+:[ ]*f3 0f c7 f8[ ]*rdpid %eax +[ ]*[a-f0-9]+:[ ]*f3 0f 09[ ]*wbnoinvd[ ]* +#pass diff --git a/gas/testsuite/gas/i386/arch-13.d b/gas/testsuite/gas/i386/arch-13.d index 6296ab7..ad18c31 100644 --- a/gas/testsuite/gas/i386/arch-13.d +++ b/gas/testsuite/gas/i386/arch-13.d @@ -1,4 +1,4 @@ -#as: -march=i686+smap+adx+rdseed+clzero+xsavec+xsaves+clflushopt+mwaitx +#as: -march=i686+smap+adx+rdseed+clzero+xsavec+xsaves+clflushopt+mwaitx+rdpid+clwb+wbnoinvd #objdump: -dw #name: i386 arch 13 @@ -21,4 +21,8 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 0f 01 fa monitorx %eax,%ecx,%edx [ ]*[a-f0-9]+: 0f 01 fb mwaitx %eax,%ecx,%ebx [ ]*[a-f0-9]+: 0f 01 fb mwaitx %eax,%ecx,%ebx +[ ]*[a-f0-9]+:[ ]*66 0f ae 31[ ]*clwb \(%ecx\) +[ ]*[a-f0-9]+:[ ]*66 0f ae b4 f4 c0 1d fe ff[ ]*clwb -0x1e240\(%esp,%esi,8\) +[ ]*[a-f0-9]+:[ ]*f3 0f c7 f8[ ]*rdpid %eax +[ ]*[a-f0-9]+:[ ]*f3 0f 09[ ]*wbnoinvd[ ]* #pass diff --git a/gas/testsuite/gas/i386/arch-13.s b/gas/testsuite/gas/i386/arch-13.s index 4e82ff6..1766cc2 100644 --- a/gas/testsuite/gas/i386/arch-13.s +++ b/gas/testsuite/gas/i386/arch-13.s @@ -1,23 +1,34 @@ # Test -march= .text + #SMAP feature -clac -stac + clac + stac #ADCX ADOX -adcx %edx, %ecx -adox %edx, %ecx + adcx %edx, %ecx + adox %edx, %ecx #RDSEED -rdseed %eax + rdseed %eax #CLZERO -clzero + clzero #XSAVEC -xsavec (%ecx) + xsavec (%ecx) #XSAVES -xsaves (%ecx) + xsaves (%ecx) #CLFLUSHOPT -clflushopt (%ecx) -monitorx %eax, %ecx, %edx -monitorx %ax, %ecx, %edx -monitorx -mwaitx %eax, %ecx, %ebx -mwaitx + clflushopt (%ecx) + monitorx %eax, %ecx, %edx + monitorx %ax, %ecx, %edx + monitorx + mwaitx %eax, %ecx, %ebx + mwaitx + +#CLWB instruction + clwb (%ecx) # CLWB + clwb -123456(%esp,%esi,8) # CLWB + +# rdpid instruction + rdpid %eax + +# wbnoinvd instruction + wbnoinvd diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp index c691a02..9cc927a 100644 --- a/gas/testsuite/gas/i386/i386.exp +++ b/gas/testsuite/gas/i386/i386.exp @@ -155,6 +155,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_32_check]] run_dump_test "arch-10-bdver3" run_dump_test "arch-10-bdver4" run_dump_test "arch-13-znver1" + run_dump_test "arch-13-znver2" run_dump_test "arch-10-btver1" run_dump_test "arch-10-btver2" run_list_test "arch-10-1" "-march=generic32 -I${srcdir}/$subdir -al" @@ -691,6 +692,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t run_dump_test "x86-64-arch-2-bdver3" run_dump_test "x86-64-arch-2-bdver4" run_dump_test "x86-64-arch-3-znver1" + run_dump_test "x86-64-arch-3-znver2" run_dump_test "x86-64-arch-2-btver1" run_dump_test "x86-64-arch-2-btver2" run_list_test "x86-64-arch-2-1" "-march=generic64 -I${srcdir}/$subdir -al" diff --git a/gas/testsuite/gas/i386/x86-64-arch-3-znver1.d b/gas/testsuite/gas/i386/x86-64-arch-3-znver1.d index 2fc0a1f..060ef61 100644 --- a/gas/testsuite/gas/i386/x86-64-arch-3-znver1.d +++ b/gas/testsuite/gas/i386/x86-64-arch-3-znver1.d @@ -1,5 +1,5 @@ #source: x86-64-arch-3.s -#as: -march=znver1 +#as: -march=znver1+rdpid+clwb+wbnoinvd #objdump: -dw #name: x86-64 arch 3 (znver1) @@ -23,4 +23,9 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 0f 01 fa monitorx %rax,%rcx,%rdx [ ]*[a-f0-9]+: 0f 01 fb mwaitx %rax,%rcx,%rbx [ ]*[a-f0-9]+: 0f 01 fb mwaitx %rax,%rcx,%rbx +[ ]*[a-f0-9]+:[ ]*66 0f ae 31[ ]*clwb \(%rcx\) +[ ]*[a-f0-9]+:[ ]*66 42 0f ae b4 f0 23 01 00 00[ ]*clwb 0x123\(%rax,%r14,8\) +[ ]*[a-f0-9]+:[ ]*f3 0f c7 f8[ ]*rdpid %rax +[ ]*[a-f0-9]+:[ ]*f3 41 0f c7 fa[ ]*rdpid %r10 +[ ]*[a-f0-9]+:[ ]*f3 0f 09[ ]*wbnoinvd[ ]* #pass diff --git a/gas/testsuite/gas/i386/x86-64-arch-3-znver2.d b/gas/testsuite/gas/i386/x86-64-arch-3-znver2.d new file mode 100644 index 0000000..07e6c02 --- /dev/null +++ b/gas/testsuite/gas/i386/x86-64-arch-3-znver2.d @@ -0,0 +1,31 @@ +#source: x86-64-arch-3.s +#as: -march=znver2 +#objdump: -dw +#name: x86-64 arch 3 (znver2) + +.*: file format .* + +Disassembly of section .text: + +0+ <.text>: +[ ]*[a-f0-9]+: 0f 01 ca clac[ ]* +[ ]*[a-f0-9]+: 0f 01 cb stac[ ]* +[ ]*[a-f0-9]+: 66 0f 38 f6 ca adcx %edx,%ecx +[ ]*[a-f0-9]+: f3 0f 38 f6 ca adox %edx,%ecx +[ ]*[a-f0-9]+: 0f c7 f8 rdseed %eax +[ ]*[a-f0-9]+: 0f 01 fc clzero[ ]* +[ ]*[a-f0-9]+: 44 0f 38 c8 00 sha1nexte \(%rax\),%xmm8 +[ ]*[a-f0-9]+: 48 0f c7 21 xsavec64 \(%rcx\) +[ ]*[a-f0-9]+: 48 0f c7 29 xsaves64 \(%rcx\) +[ ]*[a-f0-9]+: 66 0f ae 39 clflushopt \(%rcx\) +[ ]*[a-f0-9]+: 0f 01 fa monitorx %rax,%rcx,%rdx +[ ]*[a-f0-9]+: 67 0f 01 fa monitorx %eax,%rcx,%rdx +[ ]*[a-f0-9]+: 0f 01 fa monitorx %rax,%rcx,%rdx +[ ]*[a-f0-9]+: 0f 01 fb mwaitx %rax,%rcx,%rbx +[ ]*[a-f0-9]+: 0f 01 fb mwaitx %rax,%rcx,%rbx +[ ]*[a-f0-9]+:[ ]*66 0f ae 31[ ]*clwb \(%rcx\) +[ ]*[a-f0-9]+:[ ]*66 42 0f ae b4 f0 23 01 00 00[ ]*clwb 0x123\(%rax,%r14,8\) +[ ]*[a-f0-9]+:[ ]*f3 0f c7 f8[ ]*rdpid %rax +[ ]*[a-f0-9]+:[ ]*f3 41 0f c7 fa[ ]*rdpid %r10 +[ ]*[a-f0-9]+:[ ]*f3 0f 09[ ]*wbnoinvd[ ]* +#pass diff --git a/gas/testsuite/gas/i386/x86-64-arch-3.d b/gas/testsuite/gas/i386/x86-64-arch-3.d index 6a7fb00..e6bbb4b 100644 --- a/gas/testsuite/gas/i386/x86-64-arch-3.d +++ b/gas/testsuite/gas/i386/x86-64-arch-3.d @@ -1,4 +1,4 @@ -#as: -march=generic64+smap+adx+rdseed+clzero+sha+xsavec+xsaves+clflushopt+mwaitx +#as: -march=generic64+smap+adx+rdseed+clzero+sha+xsavec+xsaves+clflushopt+mwaitx+rdpid+clwb+wbnoinvd #objdump: -dw #name: x86-64 arch 3 @@ -22,4 +22,9 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 0f 01 fa monitorx %rax,%rcx,%rdx [ ]*[a-f0-9]+: 0f 01 fb mwaitx %rax,%rcx,%rbx [ ]*[a-f0-9]+: 0f 01 fb mwaitx %rax,%rcx,%rbx +[ ]*[a-f0-9]+:[ ]*66 0f ae 31[ ]*clwb \(%rcx\) +[ ]*[a-f0-9]+:[ ]*66 42 0f ae b4 f0 23 01 00 00[ ]*clwb 0x123\(%rax,%r14,8\) +[ ]*[a-f0-9]+:[ ]*f3 0f c7 f8[ ]*rdpid %rax +[ ]*[a-f0-9]+:[ ]*f3 41 0f c7 fa[ ]*rdpid %r10 +[ ]*[a-f0-9]+:[ ]*f3 0f 09[ ]*wbnoinvd[ ]* #pass diff --git a/gas/testsuite/gas/i386/x86-64-arch-3.s b/gas/testsuite/gas/i386/x86-64-arch-3.s index 2096efc..6ae75c3 100644 --- a/gas/testsuite/gas/i386/x86-64-arch-3.s +++ b/gas/testsuite/gas/i386/x86-64-arch-3.s @@ -1,25 +1,35 @@ # Test -march= .text #SMAP -clac -stac + clac + stac #ADCX ADOX -adcx %edx, %ecx -adox %edx, %ecx + adcx %edx, %ecx + adox %edx, %ecx #RDSEED -rdseed %eax + rdseed %eax #CLZERO -clzero + clzero #SHA -sha1nexte (%rax), %xmm8 + sha1nexte (%rax), %xmm8 #XSAVEC -xsavec64 (%rcx) + xsavec64 (%rcx) #XSAVES -xsaves64 (%rcx) + xsaves64 (%rcx) #CLFLUSHOPT -clflushopt (%rcx) -monitorx %rax,%rcx,%rdx -monitorx %eax,%rcx,%rdx -monitorx -mwaitx %rax,%rcx,%rbx -mwaitx + clflushopt (%rcx) + monitorx %rax,%rcx,%rdx + monitorx %eax,%rcx,%rdx + monitorx + mwaitx %rax,%rcx,%rbx + mwaitx +# clwb instruction + clwb (%rcx) # CLWB + clwb 0x123(%rax,%r14,8) # CLWB + +# rdpid instruction + rdpid %rax + rdpid %r10 + +# wbnoinvd instruction + wbnoinvd |