For a RISC target that doesn't allow memory-indirect addressing, the
proper way to represent an access of a symbol found in the GOT is to
first load the symbol from the GOT into a register, and then use
that register for memory access or call as needed.

For proper scheduling and instruction selection, the symbol load
source should be represented as what it is, i.e. a MEM.
So we have a (MEM (unspec ... UNSPEC_GOT)) .
For the purposes of debug output, this should be translated back into
the symbol_ref it represents.

However, loc_descriptor looks only into the address inside a MEM,
it does not process the entire mem with targetm.delegitimize_address.
I.e. there is no way to get rid of the MEM if it is not nested in
another MEM.


-- 
           Summary: loc_descriptor doesn't call delegitimize_address on MEMs
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: amylaar at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39368

Reply via email to