diff mbox series

[52/52] bfin: Rename macros {FLOAT,DOUBLE}_TYPE_SIZE

Message ID b4e6c700bd958a95740048379f8076db33b4f83a.1717134752.git.linkw@linux.ibm.com
State New
Headers show
Series Replace {FLOAT,{,LONG_}DOUBLE}_TYPE_SIZE with new hook | expand

Commit Message

Kewen.Lin June 3, 2024, 3:01 a.m. UTC
This patch is to remove LONG_DOUBLE_TYPE_SIZE and
rename macros {FLOAT,DOUBLE}_TYPE_SIZE with prefix
BFIN_ as some macro defines want to use them, keeping
them can have better code readability.

gcc/ChangeLog:

	* config/bfin/bfin.h (FLOAT_TYPE_SIZE): Rename to ...
	(BFIN_FLOAT_TYPE_SIZE): ... this.
	(DOUBLE_TYPE_SIZE): Rename to ...
	(BFIN_DOUBLE_TYPE_SIZE): ... this.
	(LONG_DOUBLE_TYPE_SIZE): Remove.
	(UNITS_PER_FLOAT): Replace FLOAT_TYPE_SIZE with BFIN_FLOAT_TYPE_SIZE.
	(UNITS_PER_DOUBLE): Replace DOUBLE_TYPE_SIZE with
	BFIN_DOUBLE_TYPE_SIZE.
---
 gcc/config/bfin/bfin.h | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

Comments

Kewen.Lin June 13, 2024, 7:43 a.m. UTC | #1
Hi,

Gentle ping:

https://gcc.gnu.org/pipermail/gcc-patches/2024-June/653386.html

BR,
Kewen

on 2024/6/3 11:01, Kewen Lin wrote:
> This patch is to remove LONG_DOUBLE_TYPE_SIZE and
> rename macros {FLOAT,DOUBLE}_TYPE_SIZE with prefix
> BFIN_ as some macro defines want to use them, keeping
> them can have better code readability.
> 
> gcc/ChangeLog:
> 
> 	* config/bfin/bfin.h (FLOAT_TYPE_SIZE): Rename to ...
> 	(BFIN_FLOAT_TYPE_SIZE): ... this.
> 	(DOUBLE_TYPE_SIZE): Rename to ...
> 	(BFIN_DOUBLE_TYPE_SIZE): ... this.
> 	(LONG_DOUBLE_TYPE_SIZE): Remove.
> 	(UNITS_PER_FLOAT): Replace FLOAT_TYPE_SIZE with BFIN_FLOAT_TYPE_SIZE.
> 	(UNITS_PER_DOUBLE): Replace DOUBLE_TYPE_SIZE with
> 	BFIN_DOUBLE_TYPE_SIZE.
> ---
>  gcc/config/bfin/bfin.h | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/gcc/config/bfin/bfin.h b/gcc/config/bfin/bfin.h
> index e6ac8e3206c..e957c31a788 100644
> --- a/gcc/config/bfin/bfin.h
> +++ b/gcc/config/bfin/bfin.h
> @@ -862,10 +862,10 @@ typedef struct {
>   *  really cause some alignment problem
>   */
>  
> -#define UNITS_PER_FLOAT  ((FLOAT_TYPE_SIZE  + BITS_PER_UNIT - 1) / \
> +#define UNITS_PER_FLOAT  ((BFIN_FLOAT_TYPE_SIZE  + BITS_PER_UNIT - 1) / \
>  			   BITS_PER_UNIT)
>  
> -#define UNITS_PER_DOUBLE ((DOUBLE_TYPE_SIZE + BITS_PER_UNIT - 1) / \
> +#define UNITS_PER_DOUBLE ((BFIN_DOUBLE_TYPE_SIZE + BITS_PER_UNIT - 1) / \
>   			   BITS_PER_UNIT)
>  
>  
> @@ -874,7 +874,8 @@ typedef struct {
>  
>  /* Define this as 1 if `char' should by default be signed; else as 0.  */
>  #define DEFAULT_SIGNED_CHAR 1
> -#define FLOAT_TYPE_SIZE BITS_PER_WORD
> +/* FLOAT_TYPE_SIZE get poisoned, so add BFIN_ prefix.  */
> +#define BFIN_FLOAT_TYPE_SIZE BITS_PER_WORD
>  #define SHORT_TYPE_SIZE 16 
>  #define CHAR_TYPE_SIZE	8
>  #define INT_TYPE_SIZE	32
> @@ -890,8 +891,8 @@ typedef struct {
>   * #define DOUBLES_ARE_FLOATS 1
>   */
>  
> -#define DOUBLE_TYPE_SIZE	64
> -#define LONG_DOUBLE_TYPE_SIZE	64
> +/* DOUBLE_TYPE_SIZE get poisoned, so add BFIN_ prefix.  */
> +#define BFIN_DOUBLE_TYPE_SIZE	64
>  
>  /* `PROMOTE_MODE (M, UNSIGNEDP, TYPE)'
>       A macro to update M and UNSIGNEDP when an object whose type is
diff mbox series

Patch

diff --git a/gcc/config/bfin/bfin.h b/gcc/config/bfin/bfin.h
index e6ac8e3206c..e957c31a788 100644
--- a/gcc/config/bfin/bfin.h
+++ b/gcc/config/bfin/bfin.h
@@ -862,10 +862,10 @@  typedef struct {
  *  really cause some alignment problem
  */
 
-#define UNITS_PER_FLOAT  ((FLOAT_TYPE_SIZE  + BITS_PER_UNIT - 1) / \
+#define UNITS_PER_FLOAT  ((BFIN_FLOAT_TYPE_SIZE  + BITS_PER_UNIT - 1) / \
 			   BITS_PER_UNIT)
 
-#define UNITS_PER_DOUBLE ((DOUBLE_TYPE_SIZE + BITS_PER_UNIT - 1) / \
+#define UNITS_PER_DOUBLE ((BFIN_DOUBLE_TYPE_SIZE + BITS_PER_UNIT - 1) / \
  			   BITS_PER_UNIT)
 
 
@@ -874,7 +874,8 @@  typedef struct {
 
 /* Define this as 1 if `char' should by default be signed; else as 0.  */
 #define DEFAULT_SIGNED_CHAR 1
-#define FLOAT_TYPE_SIZE BITS_PER_WORD
+/* FLOAT_TYPE_SIZE get poisoned, so add BFIN_ prefix.  */
+#define BFIN_FLOAT_TYPE_SIZE BITS_PER_WORD
 #define SHORT_TYPE_SIZE 16 
 #define CHAR_TYPE_SIZE	8
 #define INT_TYPE_SIZE	32
@@ -890,8 +891,8 @@  typedef struct {
  * #define DOUBLES_ARE_FLOATS 1
  */
 
-#define DOUBLE_TYPE_SIZE	64
-#define LONG_DOUBLE_TYPE_SIZE	64
+/* DOUBLE_TYPE_SIZE get poisoned, so add BFIN_ prefix.  */
+#define BFIN_DOUBLE_TYPE_SIZE	64
 
 /* `PROMOTE_MODE (M, UNSIGNEDP, TYPE)'
      A macro to update M and UNSIGNEDP when an object whose type is