mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-27 07:15:20 +00:00
fix(simd): fix base register in fpregs_context_*
The fpregs_state_* macros require the base register to point to the start of the simd_regs_t structure. The fpregs_context_* functions were passing the address incorrectly shifted by 512 bytes. Signed-off-by: Andrei Homescu <ahomescu@google.com> Change-Id: I757a26f8910c2ab648116e001e06baa3deb2eec4
This commit is contained in:
parent
79e11f5654
commit
09ada2f8d6
1 changed files with 8 additions and 2 deletions
|
@ -75,6 +75,9 @@
|
||||||
*/
|
*/
|
||||||
#if CTX_INCLUDE_FPREGS
|
#if CTX_INCLUDE_FPREGS
|
||||||
func fpregs_context_save
|
func fpregs_context_save
|
||||||
|
/* Save x0 and pass its original value to fpregs_state_save */
|
||||||
|
mov x1, x0
|
||||||
|
|
||||||
stp q0, q1, [x0], #32
|
stp q0, q1, [x0], #32
|
||||||
stp q2, q3, [x0], #32
|
stp q2, q3, [x0], #32
|
||||||
stp q4, q5, [x0], #32
|
stp q4, q5, [x0], #32
|
||||||
|
@ -92,7 +95,7 @@ func fpregs_context_save
|
||||||
stp q28, q29, [x0], #32
|
stp q28, q29, [x0], #32
|
||||||
stp q30, q31, [x0], #32
|
stp q30, q31, [x0], #32
|
||||||
|
|
||||||
fpregs_state_save x0, x9
|
fpregs_state_save x1, x9
|
||||||
|
|
||||||
ret
|
ret
|
||||||
endfunc fpregs_context_save
|
endfunc fpregs_context_save
|
||||||
|
@ -112,6 +115,9 @@ endfunc fpregs_context_save
|
||||||
* ------------------------------------------------------------------
|
* ------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
func fpregs_context_restore
|
func fpregs_context_restore
|
||||||
|
/* Save x0 and pass its original value to fpregs_state_restore */
|
||||||
|
mov x1, x0
|
||||||
|
|
||||||
ldp q0, q1, [x0], #32
|
ldp q0, q1, [x0], #32
|
||||||
ldp q2, q3, [x0], #32
|
ldp q2, q3, [x0], #32
|
||||||
ldp q4, q5, [x0], #32
|
ldp q4, q5, [x0], #32
|
||||||
|
@ -129,7 +135,7 @@ func fpregs_context_restore
|
||||||
ldp q28, q29, [x0], #32
|
ldp q28, q29, [x0], #32
|
||||||
ldp q30, q31, [x0], #32
|
ldp q30, q31, [x0], #32
|
||||||
|
|
||||||
fpregs_state_restore x0, x9
|
fpregs_state_restore x1, x9
|
||||||
|
|
||||||
ret
|
ret
|
||||||
endfunc fpregs_context_restore
|
endfunc fpregs_context_restore
|
||||||
|
|
Loading…
Add table
Reference in a new issue