This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Committed] Fix __builtin_thread_pointer for ILP32 and other like ABIs


    Hi,
      With ILP32 AARCH64, Pmode (DImode) != ptrmode (SImode) so the
variable decl
    has a mode of SImode while the register is DImode.  So the target that gets
    passed down to expand_builtin_thread_pointer is NULL as expand does not
    know how to get a subreg for a pointer type.

    This fixes the problem by handling a NULL target like we are able to handle
    for a non register/correct mode target inside expand_builtin_thread_pointer.

    Committed as obvious after a build and test for both
aarch64-linux-gnu and x86_64-linux-gnu with no regressions.

    Thanks,
    Andrew Pinski

     * builtins.c (expand_builtin_thread_pointer): Create a new target
    when the target is NULL.

Attachment: fixthreadptr.diff.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]