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:Raghavendra Rao Ananta <rananta@google.com> Signed-off-by:
Andrew Jones <andrew.jones@linux.dev>
Loading
Please register or sign in to comment