diff options
author | Joseph Myers <joseph@codesourcery.com> | 2014-09-05 13:03:46 +0100 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2014-09-05 13:03:46 +0100 |
commit | 53d68b9f05d0bebdb08573838c92c3dd73b01419 (patch) | |
tree | 71d3ae38a17711fac14acd3253bc2f21685ebb65 /libgcc/generic-morestack.c | |
parent | 02a0ec4a8d8102b3f5f8ef1350bb65cf6c1d22e6 (diff) | |
download | gcc-53d68b9f05d0bebdb08573838c92c3dd73b01419.tar.gz |
Use -fbuilding-libgcc for more target macros used in libgcc.
gcc/c-family:
* c-cppbuiltin.c (c_cpp_builtins): Also define
__LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
__LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
__LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
__LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
__LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
__LIBGCC_STACK_GROWS_DOWNWARD__,
__LIBGCC_DONT_USE_BUILTIN_SETJMP__,
__LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
__LIBGCC_DWARF_FRAME_REGISTERS__,
__LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
__LIBGCC_STACK_POINTER_REGNUM__ and
__LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
(builtin_define_with_value): Handle backslash-escaping in string
macro values.
libgcc:
* Makefile.in (CRTSTUFF_CFLAGS): Add -fbuilding-libgcc.
* config/aarch64/linux-unwind.h (STACK_POINTER_REGNUM): Change all
uses to __LIBGCC_STACK_POINTER_REGNUM__.
(DWARF_ALT_FRAME_RETURN_COLUMN): Change all uses to
__LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__.
* config/alpha/vms-unwind.h (DWARF_ALT_FRAME_RETURN_COLUMN):
Change use to __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__.
* config/cr16/unwind-cr16.c (STACK_GROWS_DOWNWARD): Change all
uses to __LIBGCC_STACK_GROWS_DOWNWARD__.
(DWARF_FRAME_REGISTERS): Change all uses to
__LIBGCC_DWARF_FRAME_REGISTERS__.
(EH_RETURN_STACKADJ_RTX): Change all uses to
__LIBGCC_EH_RETURN_STACKADJ_RTX__.
* config/cr16/unwind-dw2.h (DWARF_FRAME_REGISTERS): Change use to
__LIBGCC_DWARF_FRAME_REGISTERS__. Remove conditional definition.
* config/i386/cygming-crtbegin.c (EH_FRAME_SECTION_NAME): Change
use to __LIBGCC_EH_FRAME_SECTION_NAME__.
(JCR_SECTION_NAME): Change use to __LIBGCC_JCR_SECTION_NAME__.
* config/i386/cygming-crtend.c (EH_FRAME_SECTION_NAME): Change use
to __LIBGCC_EH_FRAME_SECTION_NAME__.
(JCR_SECTION_NAME): Change use to __LIBGCC_JCR_SECTION_NAME__
* config/mips/linux-unwind.h (STACK_POINTER_REGNUM): Change use to
__LIBGCC_STACK_POINTER_REGNUM__.
(DWARF_ALT_FRAME_RETURN_COLUMN): Change all uses to
__LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__.
* config/nios2/linux-unwind.h (STACK_POINTER_REGNUM): Change use
to __LIBGCC_STACK_POINTER_REGNUM__.
* config/pa/hpux-unwind.h (DWARF_ALT_FRAME_RETURN_COLUMN): Change
all uses to __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__.
* config/pa/linux-unwind.h (DWARF_ALT_FRAME_RETURN_COLUMN): Change
all uses to __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__.
* config/rs6000/aix-unwind.h (DWARF_ALT_FRAME_RETURN_COLUMN):
Change all uses to __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__.
(STACK_POINTER_REGNUM): Change all uses to
__LIBGCC_STACK_POINTER_REGNUM__.
* config/rs6000/darwin-fallback.c (STACK_POINTER_REGNUM): Change
use to __LIBGCC_STACK_POINTER_REGNUM__.
* config/rs6000/linux-unwind.h (STACK_POINTER_REGNUM): Change all
uses to __LIBGCC_STACK_POINTER_REGNUM__.
* config/sparc/linux-unwind.h (DWARF_FRAME_REGISTERS): Change use
to __LIBGCC_DWARF_FRAME_REGISTERS__.
* config/sparc/sol2-unwind.h (DWARF_FRAME_REGISTERS): Change use
to __LIBGCC_DWARF_FRAME_REGISTERS__.
* config/tilepro/linux-unwind.h (STACK_POINTER_REGNUM): Change use
to __LIBGCC_STACK_POINTER_REGNUM__.
* config/xtensa/unwind-dw2-xtensa.h (DWARF_FRAME_REGISTERS):
Remove conditional definition.
* crtstuff.c (TEXT_SECTION_ASM_OP): Change all uses to
__LIBGCC_TEXT_SECTION_ASM_OP__.
(EH_FRAME_SECTION_NAME): Change all uses to
__LIBGCC_EH_FRAME_SECTION_NAME__.
(EH_TABLES_CAN_BE_READ_ONLY): Change all uses to
__LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__.
(CTORS_SECTION_ASM_OP): Change all uses to
__LIBGCC_CTORS_SECTION_ASM_OP__.
(DTORS_SECTION_ASM_OP): Change all uses to
__LIBGCC_DTORS_SECTION_ASM_OP__.
(JCR_SECTION_NAME): Change all uses to
__LIBGCC_JCR_SECTION_NAME__.
(INIT_SECTION_ASM_OP): Change all uses to
__LIBGCC_INIT_SECTION_ASM_OP__.
(INIT_ARRAY_SECTION_ASM_OP): Change all uses to
__LIBGCC_INIT_ARRAY_SECTION_ASM_OP__.
* generic-morestack.c (STACK_GROWS_DOWNWARD): Change all uses to
__LIBGCC_STACK_GROWS_DOWNWARD__.
* libgcc2.c (INIT_SECTION_ASM_OP): Change all uses to
__LIBGCC_INIT_SECTION_ASM_OP__.
(INIT_ARRAY_SECTION_ASM_OP): Change all uses to
__LIBGCC_INIT_ARRAY_SECTION_ASM_OP__.
(EH_FRAME_SECTION_NAME): Change all uses to
__LIBGCC_EH_FRAME_SECTION_NAME__.
* libgcov-profiler.c (VTABLE_USES_DESCRIPTORS): Remove conditional
definitions. Change all uses to
__LIBGCC_VTABLE_USES_DESCRIPTORS__.
* unwind-dw2.c (STACK_GROWS_DOWNWARD): Change all uses to
__LIBGCC_STACK_GROWS_DOWNWARD__.
(DWARF_FRAME_REGISTERS): Change all uses to
__LIBGCC_DWARF_FRAME_REGISTERS__.
(EH_RETURN_STACKADJ_RTX): Change all uses to
__LIBGCC_EH_RETURN_STACKADJ_RTX__.
* unwind-dw2.h (DWARF_FRAME_REGISTERS): Remove conditional
definition. Change use to __LIBGCC_DWARF_FRAME_REGISTERS__.
* unwind-sjlj.c (DONT_USE_BUILTIN_SETJMP): Change all uses to
__LIBGCC_DONT_USE_BUILTIN_SETJMP__.
(JMP_BUF_SIZE): Change use to __LIBGCC_JMP_BUF_SIZE__.
From-SVN: r214954
Diffstat (limited to 'libgcc/generic-morestack.c')
-rw-r--r-- | libgcc/generic-morestack.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/libgcc/generic-morestack.c b/libgcc/generic-morestack.c index f2d6d835fc4..da878640d04 100644 --- a/libgcc/generic-morestack.c +++ b/libgcc/generic-morestack.c @@ -378,7 +378,7 @@ allocate_segment (size_t frame_size) { void *guard; -#ifdef STACK_GROWS_DOWNWARD +#ifdef __LIBGCC_STACK_GROWS_DOWNWARD__ guard = space; space = (char *) space + pagesize; #else @@ -496,7 +496,7 @@ __generic_morestack_set_initial_sp (void *sp, size_t len) to the nearest 512 byte boundary. It's not essential that we be precise here; getting it wrong will just leave some stack space unused. */ -#ifdef STACK_GROWS_DOWNWARD +#ifdef __LIBGCC_STACK_GROWS_DOWNWARD__ sp = (void *) ((((__UINTPTR_TYPE__) sp + 511U) / 512U) * 512U); #else sp = (void *) ((((__UINTPTR_TYPE__) sp - 511U) / 512U) * 512U); @@ -584,7 +584,7 @@ __generic_morestack (size_t *pframe_size, void *old_stack, size_t param_size) /* Align the returned stack to a 32-byte boundary. */ aligned = (param_size + 31) & ~ (size_t) 31; -#ifdef STACK_GROWS_DOWNWARD +#ifdef __LIBGCC_STACK_GROWS_DOWNWARD__ { char *bottom = (char *) (current + 1) + current->size; to = bottom - aligned; @@ -628,7 +628,7 @@ __generic_releasestack (size_t *pavailable) if (current != NULL) { -#ifdef STACK_GROWS_DOWNWARD +#ifdef __LIBGCC_STACK_GROWS_DOWNWARD__ *pavailable = (char *) old_stack - (char *) (current + 1); #else *pavailable = (char *) (current + 1) + current->size - (char *) old_stack; @@ -639,7 +639,7 @@ __generic_releasestack (size_t *pavailable) size_t used; /* We have popped back to the original stack. */ -#ifdef STACK_GROWS_DOWNWARD +#ifdef __LIBGCC_STACK_GROWS_DOWNWARD__ if ((char *) old_stack >= (char *) __morestack_initial_sp.sp) used = 0; else @@ -778,7 +778,7 @@ __generic_findstack (void *stack) && (char *) pss + pss->size > (char *) stack) { __morestack_current_segment = pss; -#ifdef STACK_GROWS_DOWNWARD +#ifdef __LIBGCC_STACK_GROWS_DOWNWARD__ return (char *) stack - (char *) (pss + 1); #else return (char *) (pss + 1) + pss->size - (char *) stack; @@ -791,7 +791,7 @@ __generic_findstack (void *stack) if (__morestack_initial_sp.sp == NULL) return 0; -#ifdef STACK_GROWS_DOWNWARD +#ifdef __LIBGCC_STACK_GROWS_DOWNWARD__ if ((char *) stack >= (char *) __morestack_initial_sp.sp) used = 0; else @@ -869,7 +869,7 @@ __splitstack_find (void *segment_arg, void *sp, size_t *len, *next_segment = (void *) (uintptr_type) 2; *next_sp = NULL; -#ifdef STACK_GROWS_DOWNWARD +#ifdef __LIBGCC_STACK_GROWS_DOWNWARD__ if ((char *) sp >= isp) return NULL; *len = (char *) isp - (char *) sp; @@ -942,7 +942,7 @@ __splitstack_find (void *segment_arg, void *sp, size_t *len, *next_sp = (void *) nsp; } -#ifdef STACK_GROWS_DOWNWARD +#ifdef __LIBGCC_STACK_GROWS_DOWNWARD__ *len = (char *) (segment + 1) + segment->size - (char *) sp; ret = (void *) sp; #else @@ -1046,7 +1046,7 @@ __splitstack_makecontext (size_t stack_size, void *context[NUMBER_OFFSETS], segment = allocate_segment (stack_size); context[MORESTACK_SEGMENTS] = segment; context[CURRENT_SEGMENT] = segment; -#ifdef STACK_GROWS_DOWNWARD +#ifdef __LIBGCC_STACK_GROWS_DOWNWARD__ initial_sp = (void *) ((char *) (segment + 1) + segment->size); #else initial_sp = (void *) (segment + 1); @@ -1082,13 +1082,13 @@ __splitstack_resetcontext (void *context[10], size_t *size) initial_sp = context[INITIAL_SP]; initial_size = (uintptr_type) context[INITIAL_SP_LEN]; ret = initial_sp; -#ifdef STACK_GROWS_DOWNWARD +#ifdef __LIBGCC_STACK_GROWS_DOWNWARD__ ret = (void *) ((char *) ret - initial_size); #endif } else { -#ifdef STACK_GROWS_DOWNWARD +#ifdef __LIBGCC_STACK_GROWS_DOWNWARD__ initial_sp = (void *) ((char *) (segment + 1) + segment->size); #else initial_sp = (void *) (segment + 1); |