mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 07:34:31 +00:00
ppc: Create a stack frame for wait_ticks()
wait_ticks() calls get_ticks() without building a back chain which makes gdb unhappy when doing back trace. This can also cause improper memory accesses. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
This commit is contained in:
parent
64a08a9ffc
commit
83f83d1935
1 changed files with 5 additions and 2 deletions
|
@ -47,7 +47,9 @@ get_ticks:
|
||||||
*/
|
*/
|
||||||
.globl wait_ticks
|
.globl wait_ticks
|
||||||
wait_ticks:
|
wait_ticks:
|
||||||
mflr r8 /* save link register */
|
stwu r1, -16(r1)
|
||||||
|
mflr r0 /* save link register */
|
||||||
|
stw r0, 20(r1) /* Use r0 or GDB will be unhappy */
|
||||||
mr r7, r3 /* save tick count */
|
mr r7, r3 /* save tick count */
|
||||||
bl get_ticks /* Get start time */
|
bl get_ticks /* Get start time */
|
||||||
|
|
||||||
|
@ -61,5 +63,6 @@ wait_ticks:
|
||||||
subfe. r3, r3, r6
|
subfe. r3, r3, r6
|
||||||
bge 1b /* Loop until time expired */
|
bge 1b /* Loop until time expired */
|
||||||
|
|
||||||
mtlr r8 /* restore link register */
|
mtlr r0 /* restore link register */
|
||||||
|
addi r1,r1,16
|
||||||
blr
|
blr
|
||||||
|
|
Loading…
Reference in a new issue