Commit 22fa58cb authored by dp-arm's avatar dp-arm
Browse files

Use a callee-saved register to be AAPCS-compliant



x8 is not a callee-saved register and can be corrupted.
Use x19 instead to be AAPCS-compliant.

Fixes ARM-software/tf-issues#478

Change-Id: Ib4f114c36f4c11351ae856f953c45dca92b27c3b
Signed-off-by: default avatardp-arm <dimitris.papastamos@arm.com>
parent e715e676
...@@ -259,8 +259,8 @@ func print_errata_status ...@@ -259,8 +259,8 @@ func print_errata_status
/* /*
* Printing errata status requires atomically testing the printed flag. * Printing errata status requires atomically testing the printed flag.
*/ */
stp x8, x30, [sp, #-16]! stp x19, x30, [sp, #-16]!
mov x8, x0 mov x19, x0
/* /*
* Load pointers to errata lock and printed flag. Call * Load pointers to errata lock and printed flag. Call
...@@ -270,8 +270,8 @@ func print_errata_status ...@@ -270,8 +270,8 @@ func print_errata_status
ldr x0, [x1, #CPU_ERRATA_LOCK] ldr x0, [x1, #CPU_ERRATA_LOCK]
ldr x1, [x1, #CPU_ERRATA_PRINTED] ldr x1, [x1, #CPU_ERRATA_PRINTED]
bl errata_needs_reporting bl errata_needs_reporting
mov x1, x8 mov x1, x19
ldp x8, x30, [sp], #16 ldp x19, x30, [sp], #16
cbnz x0, .Lprint cbnz x0, .Lprint
#endif #endif
.Lnoprint: .Lnoprint:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment