https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95182

            Bug ID: 95182
           Summary: Change the definition of Pmode
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: duanbo3 at huawei dot com
  Target Milestone: ---
            Target: aarch64

Hi

I found a problem in aarch64.

--
An alias for the machine mode for pointers. On most machines, define this to be
the integer mode corresponding to the width of a hardware pointer; SImode on
32-bit machine or DImode on 64-bit machines. On some machines you must define
this to
be one of the partial integer modes, such as PSImode.
The width of Pmode must be at least as large as the value of POINTER_SIZE. If
it
is not equal, you must define the macro POINTERS_EXTEND_UNSIGNED to specify how
pointers are extended to Pmode.
--
this is the Document description of Pmode.

Unlike x86,S390 etc., Pmode is always set to DImode for aarch64 port even under
ILP32. Because of that definition,  machine mode of symbol_ref which is
supposed to be SImode becomes DImode under target ILP32.
Definition of Pmode should depend on the current ABI, i.e., SImode for ILP32
and DImode for LP64.

Reply via email to