gcc: xtensa: make register elimination data static
authorMax Filippov <jcmvbkbc@gmail.com>
Mon, 15 Jun 2020 05:09:36 +0000 (22:09 -0700)
committerMax Filippov <jcmvbkbc@gmail.com>
Mon, 15 Jun 2020 10:24:23 +0000 (03:24 -0700)
commitf50c32fa7ab4d3bb8b8091c6d38186799b81093b
tree2e08fa94114934bac2af06c0f41ae5a7535d75e0
parentce5a3d6bde7b3ca53c9988b057fa59ef411b1b76
gcc: xtensa: make register elimination data static

Remove ABI reference from the ELIMINABLE_REGS to avoid static data
initialization dependency on xtensa core configuration.

2020-06-15  Max Filippov  <jcmvbkbc@gmail.com>
gcc/
* config/xtensa/xtensa.c (xtensa_can_eliminate): New function.
(TARGET_CAN_ELIMINATE): New macro.
* config/xtensa/xtensa.h
(XTENSA_WINDOWED_HARD_FRAME_POINTER_REGNUM)
(XTENSA_CALL0_HARD_FRAME_POINTER_REGNUM): New macros.
(HARD_FRAME_POINTER_REGNUM): Define using
XTENSA_*_HARD_FRAME_POINTER_REGNUM.
(ELIMINABLE_REGS): Replace lines with HARD_FRAME_POINTER_REGNUM
by lines with XTENSA_WINDOWED_HARD_FRAME_POINTER_REGNUM and
XTENSA_CALL0_HARD_FRAME_POINTER_REGNUM.
gcc/config/xtensa/xtensa.c
gcc/config/xtensa/xtensa.h