On Mon, Sep 15, 2025 at 5:42 PM Takayuki 'January June' Suwa
<jjsuwa_sys3...@yahoo.co.jp> wrote:
>
> In recent gcc versions, REGNO_OK_FOR_BASE_P() is not called directly, but
> rather via regno_ok_for_base_p() which is a wrapper in gcc/addresses.h.
> The wrapper obtains a hard register number from pseudo via reg_renumber
> array, so REGNO_OK_FOR_BASE_P() does not need to take this into
> consideration.
>
> On the other hand, since there is only one use of REGNO_OK_FOR_BASE_P()
> in the target-specific code, it would make more sense to simplify the
> definition of REGNO_OK_FOR_BASE_P() and replace its call with that of
> regno_ok_for_base_p().
>
> gcc/ChangeLog:
>
>         * config/xtensa/xtensa.cc (#include):
>         Add "addresses.h".
>         * config/xtensa/xtensa.h (REGNO_OK_FOR_BASE_P):
>         Simplify to just a call to GP_REG_P().
>         (BASE_REG_P): Replace REGNO_OK_FOR_BASE_P() with the equivalent
>         call to regno_ok_for_base_p().
> ---
>   gcc/config/xtensa/xtensa.cc | 1 +
>   gcc/config/xtensa/xtensa.h  | 6 +++---
>   2 files changed, 4 insertions(+), 3 deletions(-)

Regtested for target=xtensa-linux-uclibc, no new regressions.
Committed to master.

-- 
Thanks.
-- Max

Reply via email to