+2018-04-04 Doug Rupp <rupp@adacore.com>
+
+ * sigtramp-vxworks-target.inc: Set cfa_reg properly from sigcontext
+ pregs.
+ (CFI_COMMON_REGS): Restore LR jic probed from prologue.
+ (REGNO_PC_OFFSET): Change to correct value for Aarch64.
+
2018-04-04 Jose Ruiz <ruiz@adacore.com>
* doc/gnat_ugn/gnat_utility_programs.rst, exp_attr.adb,
* *
* Asm Implementation Include File *
* *
- * Copyright (C) 2011-2017, Free Software Foundation, Inc. *
+ * Copyright (C) 2011-2018, 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- *
#define FUNCTION "%function"
#ifdef __aarch64__
-#define REGNO_PC_OFFSET 31 /* PC_REGNUM */
+#define REGNO_PC_OFFSET 80 /* aka V16, a scratch register */
#else
-#define REGNO_PC_OFFSET 15 /* PC_REGNUM */
+#define REGNO_PC_OFFSET 15 /* PC_REGNUM */
#endif
/* Mapping of CFI Column, Gcc Regno, Signal context offset for _LP64
Name CFI GCC SCTX
- G0-G30 0-30 0-30
- PC 31 31
- V0-V31 64-95 32-63
+ G0-G30 0-30 0-30 0-30
+ SP 31 31 31
+ PC 32
+ V0-V31 64-95 32-63 N/A
*/
TCR(COMMON_CFI(G_REG_OFFSET(27))) \
TCR(COMMON_CFI(G_REG_OFFSET(28))) \
TCR(COMMON_CFI(G_REG_OFFSET(29))) \
+TCR(COMMON_CFI(G_REG_OFFSET(30))) \
TCR(COMMON_CFI(PC_OFFSET)) \
TCR(".cfi_return_column " S(REGNO_PC_OFFSET))
#else
CR("") \
TCR("# Push FP and LR on stack") \
TCR("stp x29, x30, [sp, #-16]!") \
-TCR("# Push register used to hold the CFA on stack") \
+TCR("# Push register used to hold the CFA on stack (pro forma)") \
TCR("str x" S(CFA_REG) ", [sp, #-8]!") \
-TCR("# Set the CFA: x2 value") \
-TCR("mov x" S(CFA_REG) ", x2") \
+TCR("# Set the CFA reg from the 5th arg") \
+TCR("mov x" S(CFA_REG) ", x4") \
TCR("# Call the handler") \
TCR("blr x3") \
TCR("# Release our frame and return (should never get here!).") \