Bug 28031

Summary: iwmmxt2 assembly broken since f439988037a
Product: binutils Reporter: Richard Earnshaw <rearnsha>
Component: gasAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 2.34   
Target Milestone: 2.36.1   
Host: Target: arm
Build: Last reconfirmed:
Attachments: testcase.

Description Richard Earnshaw 2021-06-30 13:47:40 UTC
Created attachment 13518 [details]
testcase.

The attached assembly output (generated by gcc) no-longer assembles since revision f439988037a.

Note this is a transfer of a bug reported on GCC.  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101220
Comment 1 Richard Earnshaw 2021-06-30 13:51:07 UTC
Commenting out the .fpu directive allows the test to assemble.

Although iwmmxt2 is implemented in the co-processor space (and does conflict with the now deprecated FPA co-processor) it is not considered to be a fpu, so .fpu directives should not be affecting whether these instructions are enabled.
Comment 2 Sourceware Commits 2021-07-01 10:38:41 UTC
The master branch has been updated by Richard Earnshaw <rearnsha@sourceware.org>:

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

commit 417f991f08cb869e8274e0a6af6c88b14413e0ec
Author: Richard Earnshaw <rearnsha@arm.com>
Date:   Thu Jul 1 11:37:13 2021 +0100

    arm: don't treat XScale features as part of the FPU [PR 28031]
    
    Although the XScale and its iwMMX extensions are implemented in the
    Arm co-processor space, they are not considered to be part of the FPU
    specification.  In particular, they cannot be enabled or disabled via
    a .fpu directive.  It's therefore incorrect to strip these properties
    when a new .fpu directive is encountered.
    
    Note that the legacy Maverick co-processor is considered to be a FPU
    and it is possible to control this via the .fpu directive.
    
    include:
    
            PR gas/28031
            * opcode/arm.h (FPU_ANY): Exclude XScale-related features.
Comment 3 Richard Earnshaw 2021-07-01 11:20:17 UTC
Fixed on master so far.  Affects releases back to 2.34.
Comment 4 Sourceware Commits 2021-07-01 16:49:03 UTC
The binutils-2_36-branch branch has been updated by Richard Earnshaw <rearnsha@sourceware.org>:

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

commit 687dd74c9bac7b746ea69e4ea070adff05226b13
Author: Richard Earnshaw <rearnsha@arm.com>
Date:   Thu Jul 1 11:37:13 2021 +0100

    arm: don't treat XScale features as part of the FPU [PR 28031]
    
    Although the XScale and its iwMMX extensions are implemented in the
    Arm co-processor space, they are not considered to be part of the FPU
    specification.  In particular, they cannot be enabled or disabled via
    a .fpu directive.  It's therefore incorrect to strip these properties
    when a new .fpu directive is encountered.
    
    Note that the legacy Maverick co-processor is considered to be a FPU
    and it is possible to control this via the .fpu directive.
    
    include:
    
            PR gas/28031
            * opcode/arm.h (FPU_ANY): Exclude XScale-related features.
Comment 5 Richard Earnshaw 2021-07-01 16:51:03 UTC
Fixed on master and binutils-2.36 branch.