diff options
author | Jonathan Brandmeyer <jbrandmeyer@chromium.org> | 2018-10-09 15:01:43 -0600 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-10-15 16:01:45 -0700 |
commit | 28c034e69e6610602ef592b89476ce48e7ce58e8 (patch) | |
tree | 471f4b7626b25bba2d50c7823e3f9f96daa16dac /board/zinger | |
parent | 595dfebde9556bbf6f00f613598551829c580e3f (diff) | |
download | chrome-ec-28c034e69e6610602ef592b89476ce48e7ce58e8.tar.gz |
Zinger: lift function call out of assembly
This function call doesn't need to be a tail-call for correctness.
Changes in LTO increase the jump distance to this target beyond the +/-
2 kB range supported by 'b' in ARMv6-M.
BUG=chromium:851727
BRANCH=none
TEST=buildall
Signed-off-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org>
Change-Id: Ia45d00aea8f496213e4dfd33febf85b9494ef22d
Reviewed-on: https://chromium-review.googlesource.com/1272175
Commit-Ready: Jonathan Brandmeyer <jbrandmeyer@chromium.org>
Tested-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org>
Reviewed-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org>
Diffstat (limited to 'board/zinger')
-rw-r--r-- | board/zinger/runtime.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/board/zinger/runtime.c b/board/zinger/runtime.c index 11b1643d30..0caaa146fd 100644 --- a/board/zinger/runtime.c +++ b/board/zinger/runtime.c @@ -260,16 +260,17 @@ void system_reset(int flags) void exception_panic(void) __attribute__((naked)); void exception_panic(void) { - asm volatile( #ifdef CONFIG_DEBUG_PRINTF + asm volatile( "mov r0, %0\n" + /* TODO: Should this be SP_process instead of SP_main? */ "mov r3, sp\n" "ldr r1, [r3, #6*4]\n" /* retrieve exception PC */ "ldr r2, [r3, #5*4]\n" /* retrieve exception LR */ "bl debug_printf\n" -#endif - "b cpu_reset\n" : : "r"("PANIC PC=%08x LR=%08x\n\n")); +#endif + cpu_reset(); } void panic_reboot(void) |