From: H.J. Lu Date: Sun, 29 Jul 2007 19:43:36 +0000 (+0000) Subject: gas/testsuite/ X-Git-Tag: binutils-2_18-branchpoint~64 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8976381e69bd16f581b38ca5d236c2eff1120408;p=platform%2Fupstream%2Fbinutils.git gas/testsuite/ 2007-07-29 H.J. Lu PR binutils/4834 * gas/i386/simd-intel.d: Updated. * gas/i386/simd.d: Likewise. * gas/i386/x86-64-simd-intel.d: Likewise. * gas/i386/x86-64-simd.d: Likewise. * gas/i386/simd.s: Add tests for SSE4 instructions. * gas/i386/x86-64-simd.s: Likewise. opcodes/ 2007-07-29 H.J. Lu PR binutils/4834 * i386-dis.c (EXw): New. (prefix_user_table): Updated to use EXw, EXd and EXq for SSE4 instructions when appropriated. --- diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index fcdea1b..875e2df 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,5 +1,16 @@ 2007-07-29 H.J. Lu + PR binutils/4834 + * gas/i386/simd-intel.d: Updated. + * gas/i386/simd.d: Likewise. + * gas/i386/x86-64-simd-intel.d: Likewise. + * gas/i386/x86-64-simd.d: Likewise. + + * gas/i386/simd.s: Add tests for SSE4 instructions. + * gas/i386/x86-64-simd.s: Likewise. + +2007-07-29 H.J. Lu + * gas/i386/simd.s: Add tests for cvtss2si/cvtsd2si in Intel mode. * gas/i386/x86-64-simd.s: Likewise. diff --git a/gas/testsuite/gas/i386/simd-intel.d b/gas/testsuite/gas/i386/simd-intel.d index b325abd..3e00840 100644 --- a/gas/testsuite/gas/i386/simd-intel.d +++ b/gas/testsuite/gas/i386/simd-intel.d @@ -70,6 +70,19 @@ Disassembly of section .text: [ ]*[a-f0-9]+: f3 0f 51 00 sqrtss xmm0,DWORD PTR \[eax\] [ ]*[a-f0-9]+: f2 0f 5c 00 subsd xmm0,QWORD PTR \[eax\] [ ]*[a-f0-9]+: f3 0f 5c 00 subss xmm0,DWORD PTR \[eax\] +[ ]*[a-f0-9]+: 66 0f 38 20 00 pmovsxbw xmm0,QWORD PTR \[eax\] +[ ]*[a-f0-9]+: 66 0f 38 21 00 pmovsxbd xmm0,DWORD PTR \[eax\] +[ ]*[a-f0-9]+: 66 0f 38 22 00 pmovsxbq xmm0,WORD PTR \[eax\] +[ ]*[a-f0-9]+: 66 0f 38 23 00 pmovsxwd xmm0,QWORD PTR \[eax\] +[ ]*[a-f0-9]+: 66 0f 38 24 00 pmovsxwq xmm0,DWORD PTR \[eax\] +[ ]*[a-f0-9]+: 66 0f 38 25 00 pmovsxdq xmm0,QWORD PTR \[eax\] +[ ]*[a-f0-9]+: 66 0f 38 30 00 pmovzxbw xmm0,QWORD PTR \[eax\] +[ ]*[a-f0-9]+: 66 0f 38 31 00 pmovzxbd xmm0,DWORD PTR \[eax\] +[ ]*[a-f0-9]+: 66 0f 38 32 00 pmovzxbq xmm0,WORD PTR \[eax\] +[ ]*[a-f0-9]+: 66 0f 38 33 00 pmovzxwd xmm0,QWORD PTR \[eax\] +[ ]*[a-f0-9]+: 66 0f 38 34 00 pmovzxwq xmm0,DWORD PTR \[eax\] +[ ]*[a-f0-9]+: 66 0f 38 35 00 pmovzxdq xmm0,QWORD PTR \[eax\] +[ ]*[a-f0-9]+: 66 0f 3a 21 00 00 insertps xmm0,DWORD PTR \[eax\],0x0 [ ]*[a-f0-9]+: f3 0f 2d 00 cvtss2si eax,DWORD PTR \[eax\] [ ]*[a-f0-9]+: f2 0f 2d 00 cvtsd2si eax,QWORD PTR \[eax\] #pass diff --git a/gas/testsuite/gas/i386/simd.d b/gas/testsuite/gas/i386/simd.d index f05b23e..41a0616 100644 --- a/gas/testsuite/gas/i386/simd.d +++ b/gas/testsuite/gas/i386/simd.d @@ -69,6 +69,19 @@ Disassembly of section .text: [ ]*[a-f0-9]+: f3 0f 51 00 sqrtss \(%eax\),%xmm0 [ ]*[a-f0-9]+: f2 0f 5c 00 subsd \(%eax\),%xmm0 [ ]*[a-f0-9]+: f3 0f 5c 00 subss \(%eax\),%xmm0 +[ ]*[a-f0-9]+: 66 0f 38 20 00 pmovsxbw \(%eax\),%xmm0 +[ ]*[a-f0-9]+: 66 0f 38 21 00 pmovsxbd \(%eax\),%xmm0 +[ ]*[a-f0-9]+: 66 0f 38 22 00 pmovsxbq \(%eax\),%xmm0 +[ ]*[a-f0-9]+: 66 0f 38 23 00 pmovsxwd \(%eax\),%xmm0 +[ ]*[a-f0-9]+: 66 0f 38 24 00 pmovsxwq \(%eax\),%xmm0 +[ ]*[a-f0-9]+: 66 0f 38 25 00 pmovsxdq \(%eax\),%xmm0 +[ ]*[a-f0-9]+: 66 0f 38 30 00 pmovzxbw \(%eax\),%xmm0 +[ ]*[a-f0-9]+: 66 0f 38 31 00 pmovzxbd \(%eax\),%xmm0 +[ ]*[a-f0-9]+: 66 0f 38 32 00 pmovzxbq \(%eax\),%xmm0 +[ ]*[a-f0-9]+: 66 0f 38 33 00 pmovzxwd \(%eax\),%xmm0 +[ ]*[a-f0-9]+: 66 0f 38 34 00 pmovzxwq \(%eax\),%xmm0 +[ ]*[a-f0-9]+: 66 0f 38 35 00 pmovzxdq \(%eax\),%xmm0 +[ ]*[a-f0-9]+: 66 0f 3a 21 00 00 insertps \$0x0,\(%eax\),%xmm0 [ ]*[a-f0-9]+: f3 0f 2d 00 cvtss2si \(%eax\),%eax [ ]*[a-f0-9]+: f2 0f 2d 00 cvtsd2si \(%eax\),%eax #pass diff --git a/gas/testsuite/gas/i386/simd.s b/gas/testsuite/gas/i386/simd.s index b7d41ba..18808c1 100644 --- a/gas/testsuite/gas/i386/simd.s +++ b/gas/testsuite/gas/i386/simd.s @@ -64,6 +64,20 @@ _start: subsd (%eax),%xmm0 subss (%eax),%xmm0 + pmovsxbw (%eax),%xmm0 + pmovsxbd (%eax),%xmm0 + pmovsxbq (%eax),%xmm0 + pmovsxwd (%eax),%xmm0 + pmovsxwq (%eax),%xmm0 + pmovsxdq (%eax),%xmm0 + pmovzxbw (%eax),%xmm0 + pmovzxbd (%eax),%xmm0 + pmovzxbq (%eax),%xmm0 + pmovzxwd (%eax),%xmm0 + pmovzxwq (%eax),%xmm0 + pmovzxdq (%eax),%xmm0 + insertps $0x0,(%eax),%xmm0 + .intel_syntax noprefix cvtss2si eax,DWORD PTR [eax] cvtsd2si eax,QWORD PTR [eax] diff --git a/gas/testsuite/gas/i386/x86-64-simd-intel.d b/gas/testsuite/gas/i386/x86-64-simd-intel.d index 33054a3..732910e 100644 --- a/gas/testsuite/gas/i386/x86-64-simd-intel.d +++ b/gas/testsuite/gas/i386/x86-64-simd-intel.d @@ -74,6 +74,19 @@ Disassembly of section .text: [ ]*[a-f0-9]+: f3 0f 51 00 sqrtss xmm0,DWORD PTR \[rax\] [ ]*[a-f0-9]+: f2 0f 5c 00 subsd xmm0,QWORD PTR \[rax\] [ ]*[a-f0-9]+: f3 0f 5c 00 subss xmm0,DWORD PTR \[rax\] +[ ]*[a-f0-9]+: 66 0f 38 20 00 pmovsxbw xmm0,QWORD PTR \[rax\] +[ ]*[a-f0-9]+: 66 0f 38 21 00 pmovsxbd xmm0,DWORD PTR \[rax\] +[ ]*[a-f0-9]+: 66 0f 38 22 00 pmovsxbq xmm0,WORD PTR \[rax\] +[ ]*[a-f0-9]+: 66 0f 38 23 00 pmovsxwd xmm0,QWORD PTR \[rax\] +[ ]*[a-f0-9]+: 66 0f 38 24 00 pmovsxwq xmm0,DWORD PTR \[rax\] +[ ]*[a-f0-9]+: 66 0f 38 25 00 pmovsxdq xmm0,QWORD PTR \[rax\] +[ ]*[a-f0-9]+: 66 0f 38 30 00 pmovzxbw xmm0,QWORD PTR \[rax\] +[ ]*[a-f0-9]+: 66 0f 38 31 00 pmovzxbd xmm0,DWORD PTR \[rax\] +[ ]*[a-f0-9]+: 66 0f 38 32 00 pmovzxbq xmm0,WORD PTR \[rax\] +[ ]*[a-f0-9]+: 66 0f 38 33 00 pmovzxwd xmm0,QWORD PTR \[rax\] +[ ]*[a-f0-9]+: 66 0f 38 34 00 pmovzxwq xmm0,DWORD PTR \[rax\] +[ ]*[a-f0-9]+: 66 0f 38 35 00 pmovzxdq xmm0,QWORD PTR \[rax\] +[ ]*[a-f0-9]+: 66 0f 3a 21 00 00 insertps xmm0,DWORD PTR \[rax\],0x0 [ ]*[a-f0-9]+: f3 0f 2d 00 cvtss2si eax,DWORD PTR \[rax\] [ ]*[a-f0-9]+: f3 48 0f 2d 00 cvtss2si rax,DWORD PTR \[rax\] [ ]*[a-f0-9]+: f2 0f 2d 00 cvtsd2si eax,QWORD PTR \[rax\] diff --git a/gas/testsuite/gas/i386/x86-64-simd.d b/gas/testsuite/gas/i386/x86-64-simd.d index ed621b3..cbe1e5c 100644 --- a/gas/testsuite/gas/i386/x86-64-simd.d +++ b/gas/testsuite/gas/i386/x86-64-simd.d @@ -73,6 +73,19 @@ Disassembly of section .text: [ ]*[a-f0-9]+: f3 0f 51 00 sqrtss \(%rax\),%xmm0 [ ]*[a-f0-9]+: f2 0f 5c 00 subsd \(%rax\),%xmm0 [ ]*[a-f0-9]+: f3 0f 5c 00 subss \(%rax\),%xmm0 +[ ]*[a-f0-9]+: 66 0f 38 20 00 pmovsxbw \(%rax\),%xmm0 +[ ]*[a-f0-9]+: 66 0f 38 21 00 pmovsxbd \(%rax\),%xmm0 +[ ]*[a-f0-9]+: 66 0f 38 22 00 pmovsxbq \(%rax\),%xmm0 +[ ]*[a-f0-9]+: 66 0f 38 23 00 pmovsxwd \(%rax\),%xmm0 +[ ]*[a-f0-9]+: 66 0f 38 24 00 pmovsxwq \(%rax\),%xmm0 +[ ]*[a-f0-9]+: 66 0f 38 25 00 pmovsxdq \(%rax\),%xmm0 +[ ]*[a-f0-9]+: 66 0f 38 30 00 pmovzxbw \(%rax\),%xmm0 +[ ]*[a-f0-9]+: 66 0f 38 31 00 pmovzxbd \(%rax\),%xmm0 +[ ]*[a-f0-9]+: 66 0f 38 32 00 pmovzxbq \(%rax\),%xmm0 +[ ]*[a-f0-9]+: 66 0f 38 33 00 pmovzxwd \(%rax\),%xmm0 +[ ]*[a-f0-9]+: 66 0f 38 34 00 pmovzxwq \(%rax\),%xmm0 +[ ]*[a-f0-9]+: 66 0f 38 35 00 pmovzxdq \(%rax\),%xmm0 +[ ]*[a-f0-9]+: 66 0f 3a 21 00 00 insertps \$0x0,\(%rax\),%xmm0 [ ]*[a-f0-9]+: f3 0f 2d 00 cvtss2si \(%rax\),%eax [ ]*[a-f0-9]+: f3 48 0f 2d 00 cvtss2siq \(%rax\),%rax [ ]*[a-f0-9]+: f2 0f 2d 00 cvtsd2si \(%rax\),%eax diff --git a/gas/testsuite/gas/i386/x86-64-simd.s b/gas/testsuite/gas/i386/x86-64-simd.s index 9c87f99..e5bc395 100644 --- a/gas/testsuite/gas/i386/x86-64-simd.s +++ b/gas/testsuite/gas/i386/x86-64-simd.s @@ -68,6 +68,20 @@ _start: subsd (%rax),%xmm0 subss (%rax),%xmm0 + pmovsxbw (%rax),%xmm0 + pmovsxbd (%rax),%xmm0 + pmovsxbq (%rax),%xmm0 + pmovsxwd (%rax),%xmm0 + pmovsxwq (%rax),%xmm0 + pmovsxdq (%rax),%xmm0 + pmovzxbw (%rax),%xmm0 + pmovzxbd (%rax),%xmm0 + pmovzxbq (%rax),%xmm0 + pmovzxwd (%rax),%xmm0 + pmovzxwq (%rax),%xmm0 + pmovzxdq (%rax),%xmm0 + insertps $0x0,(%rax),%xmm0 + .intel_syntax noprefix cvtss2si eax,DWORD PTR [rax] cvtss2si rax,DWORD PTR [rax] diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 63d9e39..671616f 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,10 @@ +2007-07-29 H.J. Lu + + PR binutils/4834 + * i386-dis.c (EXw): New. + (prefix_user_table): Updated to use EXw, EXd and EXq for SSE4 + instructions when appropriated. + 2007-07-28 H.J. Lu PR binutils/4834 diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c index 48b701f..4e036f7 100644 --- a/opcodes/i386-dis.c +++ b/opcodes/i386-dis.c @@ -311,6 +311,7 @@ fetch_data (struct disassemble_info *info, bfd_byte *addr) #define EM { OP_EM, v_mode } #define EMd { OP_EM, d_mode } #define EMx { OP_EM, x_mode } +#define EXw { OP_EX, w_mode } #define EXd { OP_EX, d_mode } #define EXq { OP_EX, q_mode } #define EXx { OP_EX, x_mode } @@ -2153,7 +2154,7 @@ static const struct dis386 prefix_user_table[][4] = { { { "(bad)", { XX } }, { "(bad)", { XX } }, - { "pmovsxbw", { XM, EXx } }, + { "pmovsxbw", { XM, EXq } }, { "(bad)", { XX } }, }, @@ -2161,7 +2162,7 @@ static const struct dis386 prefix_user_table[][4] = { { { "(bad)", { XX } }, { "(bad)", { XX } }, - { "pmovsxbd", { XM, EXx } }, + { "pmovsxbd", { XM, EXd } }, { "(bad)", { XX } }, }, @@ -2169,7 +2170,7 @@ static const struct dis386 prefix_user_table[][4] = { { { "(bad)", { XX } }, { "(bad)", { XX } }, - { "pmovsxbq", { XM, EXx } }, + { "pmovsxbq", { XM, EXw } }, { "(bad)", { XX } }, }, @@ -2177,7 +2178,7 @@ static const struct dis386 prefix_user_table[][4] = { { { "(bad)", { XX } }, { "(bad)", { XX } }, - { "pmovsxwd", { XM, EXx } }, + { "pmovsxwd", { XM, EXq } }, { "(bad)", { XX } }, }, @@ -2185,7 +2186,7 @@ static const struct dis386 prefix_user_table[][4] = { { { "(bad)", { XX } }, { "(bad)", { XX } }, - { "pmovsxwq", { XM, EXx } }, + { "pmovsxwq", { XM, EXd } }, { "(bad)", { XX } }, }, @@ -2193,7 +2194,7 @@ static const struct dis386 prefix_user_table[][4] = { { { "(bad)", { XX } }, { "(bad)", { XX } }, - { "pmovsxdq", { XM, EXx } }, + { "pmovsxdq", { XM, EXq } }, { "(bad)", { XX } }, }, @@ -2233,7 +2234,7 @@ static const struct dis386 prefix_user_table[][4] = { { { "(bad)", { XX } }, { "(bad)", { XX } }, - { "pmovzxbw", { XM, EXx } }, + { "pmovzxbw", { XM, EXq } }, { "(bad)", { XX } }, }, @@ -2241,7 +2242,7 @@ static const struct dis386 prefix_user_table[][4] = { { { "(bad)", { XX } }, { "(bad)", { XX } }, - { "pmovzxbd", { XM, EXx } }, + { "pmovzxbd", { XM, EXd } }, { "(bad)", { XX } }, }, @@ -2249,7 +2250,7 @@ static const struct dis386 prefix_user_table[][4] = { { { "(bad)", { XX } }, { "(bad)", { XX } }, - { "pmovzxbq", { XM, EXx } }, + { "pmovzxbq", { XM, EXw } }, { "(bad)", { XX } }, }, @@ -2257,7 +2258,7 @@ static const struct dis386 prefix_user_table[][4] = { { { "(bad)", { XX } }, { "(bad)", { XX } }, - { "pmovzxwd", { XM, EXx } }, + { "pmovzxwd", { XM, EXq } }, { "(bad)", { XX } }, }, @@ -2265,7 +2266,7 @@ static const struct dis386 prefix_user_table[][4] = { { { "(bad)", { XX } }, { "(bad)", { XX } }, - { "pmovzxwq", { XM, EXx } }, + { "pmovzxwq", { XM, EXd } }, { "(bad)", { XX } }, }, @@ -2273,7 +2274,7 @@ static const struct dis386 prefix_user_table[][4] = { { { "(bad)", { XX } }, { "(bad)", { XX } }, - { "pmovzxdq", { XM, EXx } }, + { "pmovzxdq", { XM, EXq } }, { "(bad)", { XX } }, }, @@ -2457,7 +2458,7 @@ static const struct dis386 prefix_user_table[][4] = { { { "(bad)", { XX } }, { "(bad)", { XX } }, - { "insertps", { XM, EXx, Ib } }, + { "insertps", { XM, EXd, Ib } }, { "(bad)", { XX } }, },