This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Assorted -masm=intel fixes (PR target/85281)
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>, Jan Beulich <JBeulich at suse dot com>
- Cc: Kirill Yukhin <kirill dot yukhin at gmail dot com>, Uros Bizjak <ubizjak at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 9 Apr 2018 12:09:49 -0700
- Subject: Re: [PATCH] Assorted -masm=intel fixes (PR target/85281)
- References: <20180409183702.GX8577@tucnak>
On Mon, Apr 9, 2018 at 11:37 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> Hi!
>
> I've tested make check-gcc
> RUNTESTFLAGS='--target_board=unix\{-m32/-masm=intel,-m64/-masm=intel\} i386.exp vect.exp'
> testing and looked solely at assembly Error: (there are many scan-assembler*
> directives that just fail, and some tests use e.g. only att inline asm
> etc.).
>
> The following patch fixes what I found that way. Bootstrapped/regtested on
> x86_64-linux and i686-linux, ok for trunk?
>
> The patch fixes:
> -FAIL: gcc.target/i386/avx5124vnniw-vp4dpwssd-2.c (test for excess errors)
> -FAIL: gcc.target/i386/avx5124vnniw-vp4dpwssds-2.c (test for excess errors)
> -FAIL: gcc.target/i386/avx512dq-vreducesd-2.c (test for excess errors)
> -FAIL: gcc.target/i386/avx512dq-vreducess-2.c (test for excess errors)
> -FAIL: gcc.target/i386/avx512f-vcvtsd2usi-2.c (test for excess errors)
> -FAIL: gcc.target/i386/avx512f-vcvtsd2usi64-2.c (test for excess errors)
> -FAIL: gcc.target/i386/avx512f-vcvtss2usi-2.c (test for excess errors)
> -FAIL: gcc.target/i386/avx512f-vcvtss2usi64-2.c (test for excess errors)
> -FAIL: gcc.target/i386/avx512f-vfixupimmsd-2.c (test for excess errors)
> -FAIL: gcc.target/i386/avx512f-vfixupimmss-2.c (test for excess errors)
> -FAIL: gcc.target/i386/avx512f-vrndscaless-2.c (test for excess errors)
> -FAIL: gcc.target/i386/avx512vl-vcvtudq2pd-2.c (test for excess errors)
> -FAIL: gcc.target/i386/avx512vl-vpmovswb-2.c (test for excess errors)
> -FAIL: gcc.target/i386/avx512vl-vpmovuswb-2.c (test for excess errors)
> -FAIL: gcc.target/i386/avx512vl-vpmovwb-2.c (test for excess errors)
> -FAIL: gcc.target/i386/avx512vl-vshufpd-2.c (test for excess errors)
>
> BTW, -masm=intel seems to be in quite bad shape even in the assembler, in
> various testcases I'm getting errors like on the following reduced one:
> int k1, xmm0;
> int foo (void) { return k1; }
> int bar (void) { return xmm0; }
> gcc -masm=intel -O2
> /tmp/cch0mo1K.s: Assembler messages:
> /tmp/cch0mo1K.s:10: Error: invalid use of register
> /tmp/cch0mo1K.s:21: Error: invalid use of register
> As ICC generates the same assembly on the instructions:
> mov eax, DWORD PTR k1[rip]
> ...
> mov eax, DWORD PTR xmm0[rip]
> I think either the intel syntax spec is faulty, or gas is buggy and should
> figure out that after *WORD PTR and before [ there is symbol rather than
> register name. Some testcases e.g. have k1 as function name and that
> results in other asm errors (about .size directive).
>
Hi Jan,
How does Intel syntax support symbols like eax, k1 and xmm0 with
".intel_syntax noprefix"?
--
H.J.