diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2015-05-26 11:28:14 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2015-05-26 11:28:14 +0200 |
commit | e8c84c8fc3a1d5e78ec885f9674add6e00fad8e5 (patch) | |
tree | 549d728b2d31a9a843361ff2b3f424e4299f4897 /gcc/ada/sigtramp-vxworks.c | |
parent | b9eb3aa8a2f9c09ade591ed1a1edc12f0e73ed73 (diff) | |
download | gcc-e8c84c8fc3a1d5e78ec885f9674add6e00fad8e5.zip gcc-e8c84c8fc3a1d5e78ec885f9674add6e00fad8e5.tar.gz gcc-e8c84c8fc3a1d5e78ec885f9674add6e00fad8e5.tar.bz2 |
[multiple changes]
2015-05-26 Ed Schonberg <schonberg@adacore.com>
* sem_ch7.adb (Install_Private_Declarations,
Swap_Private_Dependents): Ensure that both views of the dependent
subtype are immediately visible if we are within their scope. This
may be needed when a procedure body is both the parent of an
instantiated child unit, and is itself used to inline a local
function.
2015-05-26 Gary Dismukes <dismukes@adacore.com>
* exp_prag.adb, gnat1drv.adb: Minor reformatting.
2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch4.adb (Expand_N_Indexed_Component): In the circuit
detecting exceptions to the rewriting, deal with implicit
dereferences in the selected component case.
2015-05-26 Bob Duff <duff@adacore.com>
* sem_ch13.adb (Analyze_One_Aspect): Do not
require the expression of the Disable_Controlled aspect to be
static in a generic template, because 'Enabled is not known
until the instance.
2015-05-26 Doug Rupp <rupp@adacore.com>
* init-vxsim.c: New file for vxsim ZCX
* sigtramp-vxworks-vxsim.c: Likewise.
* sigtramp-vxworks.c: Factor out target dependent bits into ...
* sigtramp-vxworks-target.inc: ... here.
* sigtramp.h: Add vxsim zcx protos.
* init.c [vxworks...] (sysLib.h): Include.
(__gnat_map_signal): Make global.
[...i386] (__gnat_error_handler): Call __gnat_vxsim_error_handler if
on vxsim.
[...i386] (__gnat_install_handler): Test if on vxsim.
2015-05-26 Ed Schonberg <schonberg@adacore.com>
* sem_ch5.adb (Analyze_Iterator_Specification): For an element
iterator over an array, if the component is aliased, the loop
variable is aliased as well.
2015-05-26 Ed Schonberg <schonberg@adacore.com>
* exp_ch6.adb (Expand_Actuals): For a function call with in-out
parameters that is rewritten as an expression_with_actions,
we preserve the original function call node for further use by
the caller (typically Expand_Call). In the presence of validity
checks, that function call, though it is labelled Analyzed to
prevent an infinite recursion, may be rewritten as a temporary
by Remove_Side_Effects. Ensure that the caller has access to
the original function call to continue expansion.
* atree.ads: Minor typo in comment.
2015-05-26 Javier Miranda <miranda@adacore.com>
* sem_util.adb (Check_Function_Writable_Actuals):
Add missing support to check the violation of writable actuals
in array aggregates that have a nonstatic range.
From-SVN: r223672
Diffstat (limited to 'gcc/ada/sigtramp-vxworks.c')
-rw-r--r-- | gcc/ada/sigtramp-vxworks.c | 265 |
1 files changed, 3 insertions, 262 deletions
diff --git a/gcc/ada/sigtramp-vxworks.c b/gcc/ada/sigtramp-vxworks.c index c697626..360b921 100644 --- a/gcc/ada/sigtramp-vxworks.c +++ b/gcc/ada/sigtramp-vxworks.c @@ -6,7 +6,7 @@ * * * Asm Implementation File * * * - * Copyright (C) 2011-2014, Free Software Foundation, Inc. * + * Copyright (C) 2011-2015, Free Software Foundation, Inc. * * * * GNAT is free software; you can redistribute it and/or modify it under * * terms of the GNU General Public License as published by the Free Soft- * @@ -122,267 +122,8 @@ void __gnat_sigtramp (int signo, void *si, void *sc, #endif } - -/* --------------------------- - -- And now the asm stubs -- - --------------------------- - - They all have a common structure with blocks of asm sequences queued one - after the others. Typically: - - SYMBOL_START - - CFI_DIRECTIVES - CFI_DEF_CFA, - CFI_COMMON_REGISTERS, - ... - - STUB_BODY - asm code to establish frame, setup the cfa reg value, - call the real signal handler, ... - - SYMBOL_END -*/ - -/*-------------------------------- - -- Misc constants and helpers -- - -------------------------------- */ - -/* asm string construction helpers. */ - -#define STR(TEXT) #TEXT -/* stringify expanded TEXT, surrounding it with double quotes. */ - -#define S(E) STR(E) -/* stringify E, which will resolve as text but may contain macros - still to be expanded. */ - -/* asm (TEXT) outputs <tab>TEXT. These facilitate the output of - multine contents: */ -#define TAB(S) "\t" S -#define CR(S) S "\n" - -#undef TCR -#define TCR(S) TAB(CR(S)) - -/* REGNO constants, dwarf column numbers for registers of interest. */ - -#if defined (__PPC__) - -#define REGNO_LR 65 -#define REGNO_CTR 66 -#define REGNO_CR 70 -#define REGNO_XER 76 -#define REGNO_GR(N) (N) - -#define REGNO_PC 67 /* ARG_POINTER_REGNUM */ - -#define FUNCTION "@function" - -#elif defined (__ARMEL__) - -#define REGNO_G_REG_OFFSET(N) (N) - -#define REGNO_PC_OFFSET 15 /* PC_REGNUM */ - -#define FUNCTION "%function" - -#else -Not_implemented; -#endif /* REGNO constants */ - - -/*------------------------------ - -- Stub construction blocks -- - ------------------------------ */ - -/* CFA setup block - --------------- - Only non-volatile registers are suitable for a CFA base. These are the - only ones we can expect to be able retrieve from the unwinding context - while walking up the chain, saved by at least the bottom-most exception - propagation services. We set a non-volatile register to the value we - need in the stub body that follows. */ - -#if defined (__PPC__) - -/* Use r15 for PPC. Note that r14 is inappropriate here, even though it - is non-volatile according to the ABI, because GCC uses it as an extra - SCRATCH on SPE targets. */ - -#define CFA_REG 15 - -#elif defined (__ARMEL__) - -/* Use r8 for ARM. Any of r4-r8 should work. */ - -#define CFA_REG 8 - -#else -Not_implemented; -#endif /* CFA setup block */ - -#define CFI_DEF_CFA \ -CR(".cfi_def_cfa " S(CFA_REG) ", 0") - -/* Register location blocks - ------------------------ - Rules to find registers of interest from the CFA. This should comprise - all the non-volatile registers relevant to the interrupted context. - - Note that we include r1 in this set, unlike the libgcc unwinding - fallbacks. This is useful for fallbacks to allow the use of r1 in CFI - expressions and the absence of rule for r1 gets compensated by using the - target CFA instead. We don't need the expression facility here and - setup a fake CFA to allow very simple offset expressions, so having a - rule for r1 is the proper thing to do. We for sure have observed - crashes in some cases without it. */ - -#define COMMON_CFI(REG) \ - ".cfi_offset " S(REGNO_##REG) "," S(REG_SET_##REG) - -#if defined (__PPC__) - -#define CFI_COMMON_REGS \ -CR("# CFI for common registers\n") \ -TCR(COMMON_CFI(GR(0))) \ -TCR(COMMON_CFI(GR(1))) \ -TCR(COMMON_CFI(GR(2))) \ -TCR(COMMON_CFI(GR(3))) \ -TCR(COMMON_CFI(GR(4))) \ -TCR(COMMON_CFI(GR(5))) \ -TCR(COMMON_CFI(GR(6))) \ -TCR(COMMON_CFI(GR(7))) \ -TCR(COMMON_CFI(GR(8))) \ -TCR(COMMON_CFI(GR(9))) \ -TCR(COMMON_CFI(GR(10))) \ -TCR(COMMON_CFI(GR(11))) \ -TCR(COMMON_CFI(GR(12))) \ -TCR(COMMON_CFI(GR(13))) \ -TCR(COMMON_CFI(GR(14))) \ -TCR(COMMON_CFI(GR(15))) \ -TCR(COMMON_CFI(GR(16))) \ -TCR(COMMON_CFI(GR(17))) \ -TCR(COMMON_CFI(GR(18))) \ -TCR(COMMON_CFI(GR(19))) \ -TCR(COMMON_CFI(GR(20))) \ -TCR(COMMON_CFI(GR(21))) \ -TCR(COMMON_CFI(GR(22))) \ -TCR(COMMON_CFI(GR(23))) \ -TCR(COMMON_CFI(GR(24))) \ -TCR(COMMON_CFI(GR(25))) \ -TCR(COMMON_CFI(GR(26))) \ -TCR(COMMON_CFI(GR(27))) \ -TCR(COMMON_CFI(GR(28))) \ -TCR(COMMON_CFI(GR(29))) \ -TCR(COMMON_CFI(GR(30))) \ -TCR(COMMON_CFI(GR(31))) \ -TCR(COMMON_CFI(LR)) \ -TCR(COMMON_CFI(CR)) \ -TCR(COMMON_CFI(CTR)) \ -TCR(COMMON_CFI(XER)) \ -TCR(COMMON_CFI(PC)) \ -TCR(".cfi_return_column " S(REGNO_PC)) - -/* Trampoline body block - --------------------- */ - -#define SIGTRAMP_BODY \ -CR("") \ -TCR("# Allocate frame and save the non-volatile") \ -TCR("# registers we're going to modify") \ -TCR("stwu %r1,-16(%r1)") \ -TCR("mflr %r0") \ -TCR("stw %r0,20(%r1)") \ -TCR("stw %r" S(CFA_REG) ",8(%r1)") \ -TCR("") \ -TCR("# Setup CFA_REG = context, which we'll retrieve as our CFA value") \ -TCR("mr %r" S(CFA_REG) ", %r7") \ -TCR("") \ -TCR("# Call the real handler. The signo, siginfo and sigcontext") \ -TCR("# arguments are the same as those we received in r3, r4 and r5") \ -TCR("mtctr %r6") \ -TCR("bctrl") \ -TCR("") \ -TCR("# Restore our callee-saved items, release our frame and return") \ -TCR("lwz %r" S(CFA_REG) ",8(%r1)") \ -TCR("lwz %r0,20(%r1)") \ -TCR("mtlr %r0") \ -TCR("") \ -TCR("addi %r1,%r1,16") \ -TCR("blr") - -#elif defined (__ARMEL__) - -#define CFI_COMMON_REGS \ -CR("# CFI for common registers\n") \ -TCR(COMMON_CFI(G_REG_OFFSET(0))) \ -TCR(COMMON_CFI(G_REG_OFFSET(1))) \ -TCR(COMMON_CFI(G_REG_OFFSET(2))) \ -TCR(COMMON_CFI(G_REG_OFFSET(3))) \ -TCR(COMMON_CFI(G_REG_OFFSET(4))) \ -TCR(COMMON_CFI(G_REG_OFFSET(5))) \ -TCR(COMMON_CFI(G_REG_OFFSET(6))) \ -TCR(COMMON_CFI(G_REG_OFFSET(7))) \ -TCR(COMMON_CFI(G_REG_OFFSET(8))) \ -TCR(COMMON_CFI(G_REG_OFFSET(9))) \ -TCR(COMMON_CFI(G_REG_OFFSET(10))) \ -TCR(COMMON_CFI(G_REG_OFFSET(11))) \ -TCR(COMMON_CFI(G_REG_OFFSET(12))) \ -TCR(COMMON_CFI(G_REG_OFFSET(13))) \ -TCR(COMMON_CFI(G_REG_OFFSET(14))) \ -TCR(COMMON_CFI(PC_OFFSET)) \ -TCR(".cfi_return_column " S(REGNO_PC_OFFSET)) - -/* Trampoline body block - --------------------- */ - -#define SIGTRAMP_BODY \ -CR("") \ -TCR("# Allocate frame and save the non-volatile") \ -TCR("# registers we're going to modify") \ -TCR("mov ip, sp") \ -TCR("stmfd sp!, {r" S(CFA_REG)", fp, ip, lr, pc}") \ -TCR("# Setup CFA_REG = context, which we'll retrieve as our CFA value") \ -TCR("ldr r" S(CFA_REG)", [ip]") \ -TCR("") \ -TCR("# Call the real handler. The signo, siginfo and sigcontext") \ -TCR("# arguments are the same as those we received in r0, r1 and r2") \ -TCR("sub fp, ip, #4") \ -TCR("blx r3") \ -TCR("# Restore our callee-saved items, release our frame and return") \ -TCR("ldmfd sp, {r" S(CFA_REG)", fp, sp, pc}") - -#else -Not_implemented; -#endif /* CFI_COMMON_REGS and SIGTRAMP_BODY */ - -/* Symbol definition block - ----------------------- */ - -#define SIGTRAMP_START(SYM) \ -CR("# " S(SYM) " cfi trampoline") \ -TCR(".type " S(SYM) ", "FUNCTION) \ -CR("") \ -CR(S(SYM) ":") \ -TCR(".cfi_startproc") \ -TCR(".cfi_signal_frame") - -/* Symbol termination block - ------------------------ */ - -#define SIGTRAMP_END(SYM) \ -CR(".cfi_endproc") \ -TCR(".size " S(SYM) ", .-" S(SYM)) - -/*---------------------------- - -- And now, the real code -- - ---------------------------- */ - -/* Text section start. The compiler isn't aware of that switch. */ - -asm (".text\n" - TCR(".align 2")); +/* Include the target specific bits. */ +#include "sigtramp-vxworks-target.inc" /* sigtramp stub for common registers. */ |