[hackers] [scc] [cc1] Reduce the number of items in arch.h || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Tue, 29 Nov 2016 11:50:10 +0100 (CET)

commit 245da61b120ff5449fdb2856473982adcdd7bea3
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Tue Nov 29 09:41:54 2016 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Tue Nov 29 09:41:54 2016 +0100

    [cc1] Reduce the number of items in arch.h
    
    Arch.h must dissapear because it is the responsible of having
    different cc1, while it is not strictly needed. The worst part
    is that we need different version of the same object files,
    and it is generating a lot of problems in the compilation
    process. This is only a first step to remove this problem.

diff --git a/cc1/arch/amd64-sysv/arch.c b/cc1/arch/amd64-sysv/arch.c
index 7506373..4728b78 100644
--- a/cc1/arch/amd64-sysv/arch.c
+++ b/cc1/arch/amd64-sysv/arch.c
_AT_@ -5,6 +5,22 @@
 #include "../../../inc/cc.h"
 #include "../../cc1.h"
 
+#define RANK_BOOL 0
+#define RANK_SCHAR 1
+#define RANK_UCHAR 1
+#define RANK_CHAR 1
+#define RANK_SHORT 2
+#define RANK_USHORT 2
+#define RANK_INT 3
+#define RANK_UINT 3
+#define RANK_LONG 4
+#define RANK_ULONG 4
+#define RANK_LLONG 5
+#define RANK_ULLONG 5
+#define RANK_FLOAT 6
+#define RANK_DOUBLE 7
+#define RANK_LDOUBLE 8
+
 /*
  * Initializaion of type pointers were done with
  * a C99 initilizator '... = &(Type) {...', but
diff --git a/cc1/arch/amd64-sysv/arch.h b/cc1/arch/amd64-sysv/arch.h
index 11ea606..f64e99d 100644
--- a/cc1/arch/amd64-sysv/arch.h
+++ b/cc1/arch/amd64-sysv/arch.h
_AT_@ -1,22 +1,5 @@
 /* See LICENSE file for copyright and license details. */
-#define RANK_BOOL 0
-#define RANK_SCHAR 1
-#define RANK_UCHAR 1
-#define RANK_CHAR 1
-#define RANK_SHORT 2
-#define RANK_USHORT 2
-#define RANK_INT 3
-#define RANK_UINT 3
-#define RANK_LONG 4
-#define RANK_ULONG 4
-#define RANK_LLONG 5
-#define RANK_ULLONG 5
-#define RANK_FLOAT 6
-#define RANK_DOUBLE 7
-#define RANK_LDOUBLE 8
 
-#define TINT long long
-#define TUINT unsigned long long
-#define TFLOAT double
+#define RANK_INT 3
 
 #define L_ENUM L_INT32
diff --git a/cc1/arch/i386-sysv/arch.c b/cc1/arch/i386-sysv/arch.c
index 6501f29..3229183 100644
--- a/cc1/arch/i386-sysv/arch.c
+++ b/cc1/arch/i386-sysv/arch.c
_AT_@ -5,6 +5,22 @@
 #include "../../../inc/cc.h"
 #include "../../cc1.h"
 
+#define RANK_BOOL 0
+#define RANK_SCHAR 1
+#define RANK_UCHAR 1
+#define RANK_CHAR 1
+#define RANK_SHORT 2
+#define RANK_USHORT 2
+#define RANK_INT 3
+#define RANK_UINT 3
+#define RANK_LONG 4
+#define RANK_ULONG 4
+#define RANK_LLONG 5
+#define RANK_ULLONG 5
+#define RANK_FLOAT 6
+#define RANK_DOUBLE 7
+#define RANK_LDOUBLE 8
+
 /*
  * Initializaion of type pointers were done with
  * a C99 initilizator '... = &(Type) {...', but
diff --git a/cc1/arch/i386-sysv/arch.h b/cc1/arch/i386-sysv/arch.h
index 11ea606..f64e99d 100644
--- a/cc1/arch/i386-sysv/arch.h
+++ b/cc1/arch/i386-sysv/arch.h
_AT_@ -1,22 +1,5 @@
 /* See LICENSE file for copyright and license details. */
-#define RANK_BOOL 0
-#define RANK_SCHAR 1
-#define RANK_UCHAR 1
-#define RANK_CHAR 1
-#define RANK_SHORT 2
-#define RANK_USHORT 2
-#define RANK_INT 3
-#define RANK_UINT 3
-#define RANK_LONG 4
-#define RANK_ULONG 4
-#define RANK_LLONG 5
-#define RANK_ULLONG 5
-#define RANK_FLOAT 6
-#define RANK_DOUBLE 7
-#define RANK_LDOUBLE 8
 
-#define TINT long long
-#define TUINT unsigned long long
-#define TFLOAT double
+#define RANK_INT 3
 
 #define L_ENUM L_INT32
diff --git a/cc1/arch/qbe/arch.c b/cc1/arch/qbe/arch.c
index 201ed3a..81cd57d 100644
--- a/cc1/arch/qbe/arch.c
+++ b/cc1/arch/qbe/arch.c
_AT_@ -5,6 +5,22 @@
 #include "../../../inc/cc.h"
 #include "../../cc1.h"
 
+#define RANK_BOOL 0
+#define RANK_SCHAR 1
+#define RANK_UCHAR 1
+#define RANK_CHAR 1
+#define RANK_SHORT 2
+#define RANK_USHORT 2
+#define RANK_INT 3
+#define RANK_UINT 3
+#define RANK_LONG 4
+#define RANK_ULONG 4
+#define RANK_LLONG 5
+#define RANK_ULLONG 5
+#define RANK_FLOAT 6
+#define RANK_DOUBLE 7
+#define RANK_LDOUBLE 8
+
 /*
  * Initializaion of type pointers were done with
  * a C99 initilizator '... = &(Type) {...', but
diff --git a/cc1/arch/qbe/arch.h b/cc1/arch/qbe/arch.h
index 11ea606..7daee37 100644
--- a/cc1/arch/qbe/arch.h
+++ b/cc1/arch/qbe/arch.h
_AT_@ -1,22 +1,4 @@
 /* See LICENSE file for copyright and license details. */
-#define RANK_BOOL 0
-#define RANK_SCHAR 1
-#define RANK_UCHAR 1
-#define RANK_CHAR 1
-#define RANK_SHORT 2
-#define RANK_USHORT 2
-#define RANK_INT 3
-#define RANK_UINT 3
-#define RANK_LONG 4
-#define RANK_ULONG 4
-#define RANK_LLONG 5
-#define RANK_ULLONG 5
-#define RANK_FLOAT 6
-#define RANK_DOUBLE 7
-#define RANK_LDOUBLE 8
-
-#define TINT long long
-#define TUINT unsigned long long
-#define TFLOAT double
 
+#define RANK_INT 3
 #define L_ENUM L_INT32
diff --git a/cc1/arch/z80/arch.c b/cc1/arch/z80/arch.c
index 2473717..9a74708 100644
--- a/cc1/arch/z80/arch.c
+++ b/cc1/arch/z80/arch.c
_AT_@ -5,6 +5,22 @@
 #include "../../../inc/cc.h"
 #include "../../cc1.h"
 
+#define RANK_BOOL 0
+#define RANK_SCHAR 1
+#define RANK_UCHAR 1
+#define RANK_CHAR 1
+#define RANK_SHORT 2
+#define RANK_USHORT 2
+#define RANK_INT 3
+#define RANK_UINT 3
+#define RANK_LONG 4
+#define RANK_ULONG 4
+#define RANK_LLONG 5
+#define RANK_ULLONG 5
+#define RANK_FLOAT 6
+#define RANK_DOUBLE 7
+#define RANK_LDOUBLE 8
+
 /*
  * Initializaion of type pointers were done with
  * a C99 initilizator '... = &(Type) {...', but
diff --git a/cc1/arch/z80/arch.h b/cc1/arch/z80/arch.h
index 2c02d45..4b6de22 100644
--- a/cc1/arch/z80/arch.h
+++ b/cc1/arch/z80/arch.h
_AT_@ -1,22 +1,5 @@
 /* See LICENSE file for copyright and license details. */
-#define RANK_BOOL 0
-#define RANK_SCHAR 1
-#define RANK_UCHAR 1
-#define RANK_CHAR 1
-#define RANK_SHORT 2
-#define RANK_USHORT 2
-#define RANK_INT 3
-#define RANK_UINT 3
-#define RANK_LONG 4
-#define RANK_ULONG 4
-#define RANK_LLONG 5
-#define RANK_ULLONG 5
-#define RANK_FLOAT 6
-#define RANK_DOUBLE 7
-#define RANK_LDOUBLE 8
 
-#define TINT long long
-#define TUINT unsigned long long
-#define TFLOAT double
+#define RANK_INT 3
 
 #define L_ENUM L_INT16
diff --git a/cc1/cc1.h b/cc1/cc1.h
index 9ded21e..12b73f4 100644
--- a/cc1/cc1.h
+++ b/cc1/cc1.h
_AT_@ -6,6 +6,11 @@
 
 #define NR_USWITCHES 20
 
+#define TINT long long
+#define TUINT unsigned long long
+#define TFLOAT double
+
+
 /*
  * Definition of enumerations
  */
Received on Tue Nov 29 2016 - 11:50:10 CET

This archive was generated by hypermail 2.3.0 : Tue Nov 29 2016 - 12:00:19 CET