arm/linux: Fix build after a5214472

The build broke because x30 was used instead of r14 in place of LR
which gcc doesn't recognize when building for 64-bit ARM. gcc does
recognize LR for 32-bit ARM, however, so revert to that since it's
more readable.

Also, de-duplicate saving of FP/IP which are synonyms of r11/r12,
saved above.

Change-Id: I8ae28f430cc3c47f4e4cf3679383ed5b94fadd2e
Reviewed-on: https://chromium-review.googlesource.com/1217483
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
This commit is contained in:
Joshua Peraza 2018-09-10 13:44:05 -07:00 committed by Commit Bot
parent 78bf924fa6
commit 9dcf4ab23e

View File

@ -257,16 +257,14 @@ CAPTURECONTEXT_SYMBOL2:
// Restore r0. // Restore r0.
sub r0, r0, #0x24 sub r0, r0, #0x24
// Save named general purpose registers. // Save SP/r13.
str FP, [r0, #0x4c] // context->uc_mcontext.fp
str IP, [r0, #0x50] // context->uc_mcontext.ip
str SP, [r0, #0x54] // context->uc_mcontext.sp str SP, [r0, #0x54] // context->uc_mcontext.sp
// The original LR can't be recovered. // The original LR can't be recovered.
str x30, [r0, #0x58] // context->uc_mcontext.lr str LR, [r0, #0x58] // context->uc_mcontext.lr
// The link register holds the return address for this function. // The link register holds the return address for this function.
str x30, [r0, #0x5c] // context->uc_mcontext.pc str LR, [r0, #0x5c] // context->uc_mcontext.pc
// Use r1 as a scratch register. // Use r1 as a scratch register.