This implements HARD_REGNO_CALL_PART_CLOBBERED.

Ok to apply?

Johann

        PR target/53065
        * config/avr/avr.h (HARD_REGNO_CALL_PART_CLOBBERED): New hook define.
Index: config/avr/avr.h
===================================================================
--- config/avr/avr.h	(revision 186600)
+++ config/avr/avr.h	(working copy)
@@ -394,6 +394,11 @@ enum reg_class {
 
 #define REGNO_OK_FOR_INDEX_P(NUM) 0
 
+#define HARD_REGNO_CALL_PART_CLOBBERED(REGNO, MODE)                    \
+  (((REGNO) < 18 && (REGNO) + GET_MODE_SIZE (MODE) > 18)               \
+   || ((REGNO) < REG_Y && (REGNO) + GET_MODE_SIZE (MODE) > REG_Y)      \
+   || ((REGNO) < REG_Z && (REGNO) + GET_MODE_SIZE (MODE) > REG_Z))
+
 #define TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P hook_bool_mode_true
 
 #define STACK_PUSH_CODE POST_DEC

Reply via email to