From 2ec54fb1d152f7b9bed5224756e552cb7f9609c2 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Wed, 1 Aug 2018 13:58:10 -0400 Subject: [PATCH] Patch from Richard Earnshaw * aarch64/cpu-init/rdimon-aem-el3.S (cpu_init_hook): Simplify entry/exit sequences. Add CFI unwind rules. --- libgloss/aarch64/cpu-init/rdimon-aem-el3.S | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/libgloss/aarch64/cpu-init/rdimon-aem-el3.S b/libgloss/aarch64/cpu-init/rdimon-aem-el3.S index 41db8f90c..9edbccde5 100644 --- a/libgloss/aarch64/cpu-init/rdimon-aem-el3.S +++ b/libgloss/aarch64/cpu-init/rdimon-aem-el3.S @@ -157,12 +157,16 @@ ttb: .align 2 .global FUNCTION (_cpu_init_hook) .type FUNCTION (_cpu_init_hook), %function + .cfi_sections .debug_frame FUNCTION (_cpu_init_hook): - sub sp, sp, #16 - str x30, [sp, xzr] + .cfi_startproc + str x30, [sp, -16]! + .cfi_def_cfa_offset 16 + .cfi_offset 30, -16 bl _init_vectors bl _flat_map - ldr x30, [sp, xzr] - add sp, sp, #16 + ldr x30, [sp], 16 + .cfi_restore 30 ret + .cfi_endproc .size FUNCTION (_cpu_init_hook), .-FUNCTION (_cpu_init_hook)