https://gcc.gnu.org/g:075611b646e5554ae02b2622061ea1614bf16ead

commit r15-7745-g075611b646e5554ae02b2622061ea1614bf16ead
Author: H.J. Lu <hjl.to...@gmail.com>
Date:   Wed Feb 26 05:57:13 2025 +0800

    x86: Move TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P to i386.cc
    
    Move the TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P target hook from
    i386.h to i386.cc.
    
            * config/i386/i386.h (TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P):
            Moved to ...
            * config/i386/i386.cc (TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P):
            Here.
    
    Signed-off-by: H.J. Lu <hjl.to...@gmail.com>

Diff:
---
 gcc/config/i386/i386.cc | 6 ++++++
 gcc/config/i386/i386.h  | 6 ------
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386.cc
index 3128973ba79c..fb93a6fdd0a0 100644
--- a/gcc/config/i386/i386.cc
+++ b/gcc/config/i386/i386.cc
@@ -27084,6 +27084,12 @@ ix86_libgcc_floating_mode_supported_p
 #define TARGET_PREFERRED_RELOAD_CLASS ix86_preferred_reload_class
 #undef TARGET_PREFERRED_OUTPUT_RELOAD_CLASS
 #define TARGET_PREFERRED_OUTPUT_RELOAD_CLASS ix86_preferred_output_reload_class
+/* When this hook returns true for MODE, the compiler allows
+   registers explicitly used in the rtl to be used as spill registers
+   but prevents the compiler from extending the lifetime of these
+   registers.  */
+#undef TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P
+#define TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P hook_bool_mode_true
 #undef TARGET_CLASS_LIKELY_SPILLED_P
 #define TARGET_CLASS_LIKELY_SPILLED_P ix86_class_likely_spilled_p
 #undef TARGET_IRA_CALLEE_SAVED_REGISTER_COST_SCALE
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index 40b1aa4e6dfe..56ef11a58bbc 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -1467,12 +1467,6 @@ enum reg_class
 
 #define REGNO_REG_CLASS(REGNO) (regclass_map[(REGNO)])
 
-/* When this hook returns true for MODE, the compiler allows
-   registers explicitly used in the rtl to be used as spill registers
-   but prevents the compiler from extending the lifetime of these
-   registers.  */
-#define TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P hook_bool_mode_true
-
 #define QI_REG_P(X) (REG_P (X) && QI_REGNO_P (REGNO (X)))
 #define QI_REGNO_P(N) IN_RANGE ((N), FIRST_QI_REG, LAST_QI_REG)

Reply via email to