nyan: Use asm volatile instead of plain asm so it doesn't get optimized out.
If an asm blob isn't marked as volatile, gcc is free to throw it out if it doesn't think it produces any values that are actually used. To prevent that from happening, add volatile to some asm blobs in the nyan romstage code. BUG=None TEST=Booted on nyan rev1. BRANCH=None Change-Id: I819e068e738e94ea749fcb72bba2eee080e1dfb1 Signed-off-by: Gabe Black <gabeblack@google.com> Reviewed-on: https://chromium-review.googlesource.com/185610 Reviewed-by: Julius Werner <jwerner@chromium.org> Commit-Queue: Gabe Black <gabeblack@chromium.org> Tested-by: Gabe Black <gabeblack@chromium.org>
This commit is contained in:
parent
a9b66af394
commit
76c09581d6
2 changed files with 4 additions and 2 deletions
|
|
@ -136,6 +136,7 @@ static void __attribute__((noinline)) romstage(void)
|
|||
/* Stub to force arm_init_caches to the top, before any stack/memory accesses */
|
||||
void main(void)
|
||||
{
|
||||
asm ("bl arm_init_caches" ::: "r0","r1","r2","r3","r4","r5","ip");
|
||||
asm volatile ("bl arm_init_caches"
|
||||
::: "r0","r1","r2","r3","r4","r5","ip");
|
||||
romstage();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -136,6 +136,7 @@ static void __attribute__((noinline)) romstage(void)
|
|||
/* Stub to force arm_init_caches to the top, before any stack/memory accesses */
|
||||
void main(void)
|
||||
{
|
||||
asm ("bl arm_init_caches" ::: "r0","r1","r2","r3","r4","r5","ip");
|
||||
asm volatile ("bl arm_init_caches"
|
||||
::: "r0","r1","r2","r3","r4","r5","ip");
|
||||
romstage();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue