
Dear Ovidiu,
In message 20220911161052.2986264-1-ovpanait@gmail.com you wrote:
The XTRN_DECLARE_GLOBAL_DATA_PTR declarations in ppc code are permanently commented out, so there are no users for this macro: #if 1 #define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("r2") #else #define XTRN_DECLARE_GLOBAL_DATA_PTR extern #define DECLARE_GLOBAL_DATA_PTR XTRN_DECLARE_GLOBAL_DATA_PTR \ gd_t *gd #endif
Remove all references.
Actually the commented out code contained some information, and I feel it would be a pity if that got lost:
-#if 1 #define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("r2") -#else /* We could use plain global data, but the resulting code is bigger */ -#define XTRN_DECLARE_GLOBAL_DATA_PTR extern -#define DECLARE_GLOBAL_DATA_PTR XTRN_DECLARE_GLOBAL_DATA_PTR \
gd_t *gd
-#endif
Maybe we can keep the information that using global data for the GD pointer would be possible too (and simpler, as it does not require the reservation of a specific register for it), but that the implementation uses a register nevertheless because this results in smaller code?
Maybe add such a comment instead ?
Thanks!
Best regards,
Wolfgang Denk