Bug 6975

Summary: MIPS assembler misreports $AT usage after 'set .noat'
Product: binutils Reporter: Alexander Smundak <asmundak>
Component: gasAssignee: unassigned
Status: NEW ---    
Severity: normal CC: bug-binutils
Priority: P2    
Version: 2.16   
Target Milestone: ---   
Host: Target: mips-*-*
Build: Last reconfirmed:

Description Alexander Smundak 2008-10-24 01:43:21 UTC
Test case:
        .text
        .set    noat
        sw      $2, small_data

        .comm small_data, 4

When assembler is invoked with -G4, it should assume that `small_data' will be
$GP-addressable, so `sw' expands into a single instruction, and $AT is not used.
However, the assembler complains:
$ gcc.mips64 -G 4 noat.S
noat.S: Assembler messages:
noat.S:3: Error: Macro used $at after ".set noat"

The checking of the $AT usage in this case should be postponed until relaxation
is complete.