From 50256c75f49088898f6820944077e49202cac2da Mon Sep 17 00:00:00 2001 From: Chung-Ju Wu Date: Sun, 22 Apr 2018 08:07:08 +0000 Subject: [PATCH] [NDS32] Move some target hooks to the bottom of nds32.c file. gcc/ * config/nds32/nds32.c (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file. (TARGET_MODES_TIEABLE_P): Likewise. From-SVN: r259547 --- gcc/ChangeLog | 6 ++++++ gcc/config/nds32/nds32.c | 12 ++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b7cbf9692a2..f71edd54616 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-04-22 Chung-Ju Wu + + * config/nds32/nds32.c + (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file. + (TARGET_MODES_TIEABLE_P): Likewise. + 2018-04-22 Chung-Ju Wu * config/nds32/nds32.c (nds32_asm_file_start): Display optimization diff --git a/gcc/config/nds32/nds32.c b/gcc/config/nds32/nds32.c index ab544b46c17..76a72a8b12e 100644 --- a/gcc/config/nds32/nds32.c +++ b/gcc/config/nds32/nds32.c @@ -3843,9 +3843,6 @@ nds32_hard_regno_mode_ok (unsigned int regno, machine_mode mode) return false; } -#undef TARGET_HARD_REGNO_MODE_OK -#define TARGET_HARD_REGNO_MODE_OK nds32_hard_regno_mode_ok - /* Implement TARGET_MODES_TIEABLE_P. We can use general registers to tie QI/HI/SI modes together. */ @@ -3869,9 +3866,6 @@ nds32_modes_tieable_p (machine_mode mode1, machine_mode mode2) return false; } - -#undef TARGET_MODES_TIEABLE_P -#define TARGET_MODES_TIEABLE_P nds32_modes_tieable_p /* Register Classes. */ @@ -4889,6 +4883,12 @@ nds32_use_blocks_for_constant_p (machine_mode mode, #undef TARGET_HARD_REGNO_NREGS #define TARGET_HARD_REGNO_NREGS nds32_hard_regno_nregs +#undef TARGET_HARD_REGNO_MODE_OK +#define TARGET_HARD_REGNO_MODE_OK nds32_hard_regno_mode_ok + +#undef TARGET_MODES_TIEABLE_P +#define TARGET_MODES_TIEABLE_P nds32_modes_tieable_p + /* -- Handling Leaf Functions. */ /* -- Registers That Form a Stack. */ -- 2.30.2