i386: Remove REG_OK_FOR_INDEX/REG_OK_FOR_BASE and their derivatives
commit18c9427b66fc0df663ae30ba721ef4e590902e30
authorUros Bizjak <ubizjak@gmail.com>
Fri, 21 Apr 2023 12:26:46 +0000 (21 14:26 +0200)
committerUros Bizjak <ubizjak@gmail.com>
Fri, 21 Apr 2023 14:31:52 +0000 (21 16:31 +0200)
tree6510bf263a0011ecaba6cfd46b02b7ce01278799
parent2f4e45101dd812a6fcc1e5d96efedc60b8735432
i386: Remove REG_OK_FOR_INDEX/REG_OK_FOR_BASE and their derivatives

x86 was converted to TARGET_LEGITIMATE_ADDRESS_P long ago.  Remove
remnants of the conversion.  Also, cleanup the remaining macros a bit
by introducing INDEX_REGNO_P macro.

No functional change.

gcc/ChangeLog:

2023-04-21  Uroš Bizjak  <ubizjak@gmail.com>

* config/i386/i386.h (REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P): Remove.
(REG_OK_FOR_INDEX_NONSTRICT_P,  REG_OK_FOR_BASE_NONSTRICT_P): Ditto.
(REG_OK_FOR_INDEX_STRICT_P, REG_OK_FOR_BASE_STRICT_P): Ditto.

(FIRST_INDEX_REG, LAST_INDEX_REG): New defines.
(LEGACY_INDEX_REG_P, LEGACY_INDEX_REGNO_P): New macros.
(INDEX_REG_P, INDEX_REGNO_P): Ditto.

(REGNO_OK_FOR_INDEX_P): Use INDEX_REGNO_P predicates.

(REGNO_OK_FOR_INDEX_NONSTRICT_P): New macro.
(EG_OK_FOR_BASE_NONSTRICT_P): Ditto.

* config/i386/predicates.md (index_register_operand):
Use REGNO_OK_FOR_INDEX_P and REGNO_OK_FOR_INDEX_NONSTRICT_P macros.

* config/i386/i386.cc (ix86_legitimate_address_p): Use
REGNO_OK_FOR_BASE_P, REGNO_OK_FOR_BASE_NONSTRICT_P,
REGNO_OK_FOR_INDEX_P and REGNO_OK_FOR_INDEX_NONSTRICT_P macros.
gcc/config/i386/i386.cc
gcc/config/i386/i386.h
gcc/config/i386/predicates.md