Skip to content
Commit aee1f093 authored by Raghavendra Rao Ananta's avatar Raghavendra Rao Ananta Committed by Andrew Jones
Browse files

arm: fpu: Fix the input/output args for inline asm in fpu.c



The macros fpu_reg_{read,write} post-increment the '__val'
pointer register as a part of 'stp' and 'ldp' instructions.
As a result, mark it with "+r" for the compiler to treat it
as read-write operand.

On the contrary, sve_reg_read() never updates the value of the
pointer/register. Hence, mark this as "r" for the compiler to
treat it as read-only operand.

Without these adjustments, the compiler can potentially perform
optimizations over the registers holding the pointers that could
lead to data aborts.

Fixes: d47d370c ("arm: Add test for FPU/SIMD context save/restore")
Signed-off-by: default avatarRaghavendra Rao Ananta <rananta@google.com>
Signed-off-by: default avatarAndrew Jones <andrew.jones@linux.dev>
parent 5c1c125a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment