Will VDIV cause a subsequent BX LR to stall?
The VDIV and VSQRT instructions take a long time (14 clock cycles) to execute. Any instruction that needs their result must stall until they complete their execute phase. However, integer operations (e.g., ADD R0,R0,R1) can proceed, overlapping their execution with that of the VDIV or VSQRT. But I'm wondering if that also applies to the BX LR in the following code:
// void foo(float x, float *p) ;
// S0 = x, R0 = p
foo: VSQRT.F32 S0,S0
VSTR S0,[R0]
BX LR
If the BX LR doesn't wait for the VSQRT to complete, then what happens if we access the content of *p after returning from the call? I.e., this situation:
float a, b ;
foo(a, &b) ;
... = b + .... // code that references the content of "b".
Thanks!
Dan
Question information
- Language:
- English Edit question
- Status:
- Expired
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: