Skip to content

Commit

Permalink
X18 should only be reserved for windows (gcc-mirror#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZacWalk authored and eukarpov committed May 22, 2024
1 parent 7100393 commit ad86be0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gcc/config/aarch64/aarch64.h
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ constexpr auto AARCH64_FL_DEFAULT_ISA_MODE = AARCH64_FL_SM_OFF;
uses alloca. */
#define EXIT_IGNORE_STACK (cfun->calls_alloca)

#define STATIC_CHAIN_REGNUM R17_REGNUM
#define STATIC_CHAIN_REGNUM R18_REGNUM
#define HARD_FRAME_POINTER_REGNUM R29_REGNUM
#define FRAME_POINTER_REGNUM SFP_REGNUM
#define STACK_POINTER_REGNUM SP_REGNUM
Expand Down
18 changes: 16 additions & 2 deletions libgcc/config/i386/cygming-crtend.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,14 @@ extern void __gcc_deregister_frame (void);

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wprio-ctor-dtor"
static void register_frame_ctor (void); // TODO __attribute__ ((constructor (0)));

#ifdef __aarch64__
/* constructor not yet enabled for aarch64 */
static void register_frame_ctor (void);
#else
static void register_frame_ctor (void) __attribute__ ((constructor (0)));
#endif

#pragma GCC diagnostic pop

static void
Expand All @@ -70,7 +77,14 @@ register_frame_ctor (void)
#if !DEFAULT_USE_CXA_ATEXIT
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wprio-ctor-dtor"
static void deregister_frame_dtor (void); // TODO __attribute__ ((destructor (0)));

#ifdef __aarch64__
/* destructor not yet enabled for aarch64 */
static void deregister_frame_dtor (void);
#else
static void deregister_frame_dtor (void) __attribute__ ((destructor (0)));
#endif

#pragma GCC diagnostic pop

static void
Expand Down

0 comments on commit ad86be0

Please sign in to comment.