Commit 26a851b9 by John David Anglin Committed by John David Anglin

pa32-linux.h (CRT_CALL_STATIC_FUNCTION): Define when CRTSTUFFS_O is defined.

	* pa/pa32-linux.h (CRT_CALL_STATIC_FUNCTION): Define when CRTSTUFFS_O
	is defined.

From-SVN: r112029
parent a4b9e93e
2006-03-13 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* pa/pa32-linux.h (CRT_CALL_STATIC_FUNCTION): Define when CRTSTUFFS_O
is defined.
2006-03-13 Richard Sandiford <richard@codesourcery.com> 2006-03-13 Richard Sandiford <richard@codesourcery.com>
* config/mips/mips.md (*branch_fp): Use %Z2 for the condition. * config/mips/mips.md (*branch_fp): Use %Z2 for the condition.
......
/* Definitions for PA_RISC with ELF-32 format /* Definitions for PA_RISC with ELF-32 format
Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc. Copyright (C) 2000, 2002, 2004, 2006 Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -36,4 +36,26 @@ Boston, MA 02110-1301, USA. */ ...@@ -36,4 +36,26 @@ Boston, MA 02110-1301, USA. */
aligned(sizeof(func_ptr)))) \ aligned(sizeof(func_ptr)))) \
= { (func_ptr) (-1) } = { (func_ptr) (-1) }
/* This is a PIC version of CRT_CALL_STATIC_FUNCTION. The PIC
register has to be saved before the call and restored after
the call. We assume that register %r4 is available for this
purpose. The hack prevents GCC from deleting the restore. */
#ifdef CRTSTUFFS_O
#define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) \
static void __attribute__((__used__)) \
call_ ## FUNC (void) \
{ \
asm (SECTION_OP); \
asm volatile ("bl " #FUNC ",%%r2\n\t" \
"copy %%r19,%%r4\n\t" \
"copy %%r4,%%r19\n" \
: \
: \
: "r1", "r2", "r4", "r20", "r21", \
"r22", "r24", "r24", "r25", "r26", \
"r27", "r28", "r29", "r31"); \
asm (TEXT_SECTION_ASM_OP); \
}
#endif
#define MD_UNWIND_SUPPORT "config/pa/linux-unwind.h" #define MD_UNWIND_SUPPORT "config/pa/linux-unwind.h"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment