Bug 24359 - AVX512F isn't disabled when disabling AVX2
Summary: AVX512F isn't disabled when disabling AVX2
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: gas (show other bugs)
Version: 2.33
: P2 normal
Target Milestone: 2.33
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-19 01:57 UTC by H.J. Lu
Modified: 2020-08-20 14:49 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2019-03-19 01:57:28 UTC
[hjl@gnu-cfl-2 testsuite]$ cat a.s
vaddss   %xmm6, %xmm5, %xmm24
[hjl@gnu-cfl-2 testsuite]$ as -march=noavx2 -o a.o a.s

I am expecting:

[hjl@gnu-cfl-2 testsuite]$ ../as-new -march=noavx2 -o a.o a.s
a.s: Assembler messages:
a.s:1: Error: bad register name `%xmm24'
[hjl@gnu-cfl-2 testsuite]$
Comment 1 Sourceware Commits 2019-03-19 13:09:53 UTC
The master branch has been updated by H.J. Lu <hjl@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=89199bb5a027d21c56dafd2cd898487118949ecf

commit 89199bb5a027d21c56dafd2cd898487118949ecf
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue Mar 19 21:08:15 2019 +0800

    ix86: Disable AVX512F when disabling AVX2
    
    Since AVX2 is required for AVX512F, we should disable AVX512F when AVX2
    is disabled.
    
    gas/
    
    	PR gas/24359
    	* testsuite/gas/i386/i386.exp: Change optimize-6a, optimize-7,
    	x86-64-optimize-7a and x86-64-optimize-8 tests to run_list_test.
    	Remove optimize-6c and x86-64-optimize-7c tests.
    	* testsuite/gas/i386/noavx-3.l: Updated.
    	* testsuite/gas/i386/noavx-4.d: Likewise.
    	* testsuite/gas/i386/noavx-5.d: Likewise.
    	* testsuite/gas/i386/noavx-3.s: Add AVX512F tests.
    	* testsuite/gas/i386/noavx-4.s: Remove AVX512F tests.
    	* testsuite/gas/i386/nosse-5.s: Likewise.
    	* testsuite/gas/i386/optimize-6a.d: Removed.
    	* testsuite/gas/i386/optimize-6c.d: Likewise.
    	* testsuite/gas/i386/optimize-7.d: Likewise.
    	* testsuite/gas/i386/x86-64-optimize-7a.d: Likewise.
    	* testsuite/gas/i386/x86-64-optimize-7c.d: Likewise.
    	* testsuite/gas/i386/x86-64-optimize-8.d: Likewise.
    	* testsuite/gas/i386/optimize-6a.l: New file.
    	* testsuite/gas/i386/optimize-6a.s: Likewise.
    	* testsuite/gas/i386/optimize-7.l: Likewise.
    	* testsuite/gas/i386/x86-64-optimize-7a.l: Likewise.
    	* testsuite/gas/i386/x86-64-optimize-7a.s: Likewise.
    	* testsuite/gas/i386/x86-64-optimize-8.l: Likewise.
    
    opcodes/
    
    	PR gas/24359
    	* i386-gen.c (cpu_flag_init): Add CPU_ANY_AVX512F_FLAGS to
    	CPU_ANY_AVX2_FLAGS.
    	* i386-init.h: Regenerated.
Comment 2 H.J. Lu 2020-08-20 14:49:58 UTC
Fixed for 2.33