[PATCH] cleanup IA-64
David O'Brien
obrien@freebsd.org
Wed Apr 3 10:25:00 GMT 2002
1. Please move all psABI bits into ia64.h out of the OS headers.
>From rth's recent commit, patch #1 should be tested and committed to
mainline and 3.1 by an IA-64 maintainer (who are most knowledgeable about
this platform, GCC, and can test on ia64 hardware). Patch #1 corrects a
bug in which ia64-*-FreeBSD does not have the psABI specified "_LP64"
define.
2. Can ia64-*-elf tolerate DONT_USE_BUILTIN_SETJMP and
PROFILE_BEFORE_PROLOGUE? Since every target except ia64-*-elf defines
these I am lead to believe the psABI may be behind these settings. Or is
this a difference between hosted and embedded? If so the knobs should be
moved to sysv4.h instead.
If the change is OK for ia64-*-elf, IA-64 maintainers (who are most
knowledgeable about this platform and can test on it) please patch #2 or
something simular for 3.2 and 3.1:
-----[ #1 ]------
Index: aix.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/ia64/aix.h,v
retrieving revision 1.9
diff -u -r1.9 aix.h
--- aix.h 2002/03/29 23:39:04 1.9
+++ aix.h 2002/04/03 18:14:18
@@ -86,9 +86,9 @@
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "\
--D__ia64 -D__ia64__ -D_AIX -D_AIX64 -D_LONGLONG -Dunix \
--D_LP64 -D__LP64__ -D__ELF__ \
--Asystem=unix -Asystem=aix -Acpu=ia64 -Amachine=ia64 \
+-D_AIX -D_AIX64 -D_LONGLONG -Dunix \
+-D__LP64__ \
+-Asystem=unix -Asystem=aix \
-D__64BIT__ -D_LONG_LONG -D_IA64 -D__int128=__size128_t"
/* The GNU C++ standard library requires that these macros be defined. */
Index: hpux.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/ia64/hpux.h,v
retrieving revision 1.6
diff -u -r1.6 hpux.h
--- hpux.h 2002/03/29 23:39:05 1.6
+++ hpux.h 2002/04/03 18:14:18
@@ -27,9 +27,9 @@
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "\
- -D__IA64__ -D__ia64 -D__ia64__ -D__hpux -D__hpux__ -Dhpux -Dunix \
- -D__BIG_ENDIAN__ -D_LONGLONG -D__ELF__ \
- -Asystem=hpux -Asystem=posix -Asystem=unix -Acpu=ia64 -Amachine=ia64 \
+ -D__IA64__ -D__hpux -D__hpux__ -Dhpux -Dunix \
+ -D__BIG_ENDIAN__ -D_LONGLONG \
+ -Asystem=hpux -Asystem=posix -Asystem=unix \
-D_UINT128_T"
/* -D__fpreg=long double is needed to compensate for the lack of __fpreg
Index: ia64.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/ia64/ia64.h,v
retrieving revision 1.108
diff -u -r1.108 ia64.h
--- ia64.h 2002/03/29 18:39:56 1.108
+++ ia64.h 2002/04/03 18:14:19
@@ -32,8 +32,8 @@
/* Run-time target specifications */
#define CPP_CPU_SPEC "\
- -Acpu=ia64 -Amachine=ia64 \
- %{!ansi:%{!std=c*:%{!std=i*:-Dia64}}} -D__ia64 -D__ia64__"
+ -Acpu=ia64 -Amachine=ia64 -D__ELF__ \
+ %{!ansi:%{!std=c*:%{!std=i*:-Dia64}}} -D__ia64 -D__ia64__ -D_LP64"
#define CC1_SPEC "%(cc1_cpu) "
Index: linux.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/ia64/linux.h,v
retrieving revision 1.17
diff -u -r1.17 linux.h
--- linux.h 2002/03/29 23:39:05 1.17
+++ linux.h 2002/04/03 18:14:19
@@ -11,8 +11,8 @@
/* ??? Maybe this should be in sysv4.h? */
#define CPP_PREDEFINES "\
--D__ia64 -D__ia64__ -D__linux -D__linux__ -D_LONGLONG -Dlinux -Dunix \
--D_LP64 -D__LP64__ -D__ELF__ -Asystem=linux -Acpu=ia64 -Amachine=ia64"
+-D__linux -D__linux__ -D_LONGLONG -Dlinux -Dunix \
+-D__LP64__ -Asystem=linux"
/* ??? ia64 gas doesn't accept standard svr4 assembler options? */
#undef ASM_SPEC
-----[ #2 ]------
Index: aix.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/ia64/aix.h,v
retrieving revision 1.9
diff -u -r1.9 aix.h
--- aix.h 2002/03/29 23:39:04 1.9
+++ aix.h 2002/04/03 18:14:18
@@ -116,13 +116,7 @@
%{!dynamic-linker:-dynamic-linker /usr/lib/ia64l64/libc.so.1}} \
%{static:-static}}"
-#define DONT_USE_BUILTIN_SETJMP
#define JMP_BUF_SIZE 85
-
-/* Output any profiling code before the prologue. */
-
-#undef PROFILE_BEFORE_PROLOGUE
-#define PROFILE_BEFORE_PROLOGUE 1
/* A C statement or compound statement to output to FILE some assembler code to
call the profiling subroutine `mcount'.
Index: freebsd.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/ia64/freebsd.h,v
retrieving revision 1.3
diff -u -r1.3 freebsd.h
--- freebsd.h 2001/11/12 16:21:57 1.3
+++ freebsd.h 2002/04/03 18:14:18
@@ -57,10 +55,4 @@
#define TARGET_ELF 1
-#define DONT_USE_BUILTIN_SETJMP
#define JMP_BUF_SIZE 76
-
-/* Output any profiling code before the prologue. */
-
-#undef PROFILE_BEFORE_PROLOGUE
-#define PROFILE_BEFORE_PROLOGUE 1
Index: hpux.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/ia64/hpux.h,v
retrieving revision 1.6
diff -u -r1.6 hpux.h
--- hpux.h 2002/03/29 23:39:05 1.6
+++ hpux.h 2002/04/03 18:14:18
@@ -84,7 +84,6 @@
#define POINTERS_EXTEND_UNSIGNED -1
-#define DONT_USE_BUILTIN_SETJMP
#define JMP_BUF_SIZE (8 * 76)
#undef CONST_SECTION_ASM_OP
Index: ia64.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/ia64/ia64.h,v
retrieving revision 1.108
diff -u -r1.108 ia64.h
--- ia64.h 2002/03/29 18:39:56 1.108
+++ ia64.h 2002/04/03 18:14:19
@@ -2521,5 +2521,12 @@
enum fetchop_code {
IA64_ADD_OP, IA64_SUB_OP, IA64_OR_OP, IA64_AND_OP, IA64_XOR_OP, IA64_NAND_OP
};
+
+#define DONT_USE_BUILTIN_SETJMP
+
+/* Output any profiling code before the prologue. */
+
+#undef PROFILE_BEFORE_PROLOGUE
+#define PROFILE_BEFORE_PROLOGUE 1
/* End of ia64.h */
Index: linux.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/ia64/linux.h,v
retrieving revision 1.17
diff -u -r1.17 linux.h
--- linux.h 2002/03/29 23:39:05 1.17
+++ linux.h 2002/04/03 18:14:19
@@ -46,13 +46,7 @@
%{static:-static}}"
-#define DONT_USE_BUILTIN_SETJMP
#define JMP_BUF_SIZE 76
-
-/* Output any profiling code before the prologue. */
-
-#undef PROFILE_BEFORE_PROLOGUE
-#define PROFILE_BEFORE_PROLOGUE 1
/* Override linux.h LINK_EH_SPEC definition.
Signalize that because we have fde-glibc, we don't need all C shared libs
More information about the Gcc-patches
mailing list