Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
py/nlraarch64: Fix dangerous use of input register.
Starting with 2757acf, the `top` variable in `nlr_jump()` in `nlraarch64.c` was assigned to register `x19` by the compiler. However, the assembly code writes over that register with ldp x19, x20, [%0, micropython#32] since `%0` is now `x19`. This causes the next line ldp lr, x9, [%0, micropython#16] to load the wrong values. To fix the issue, we move the value of the `top` variable from an unknown register to a known register at the beginning of the asm code then only use known/hard-coded registers after that. Fixes issue micropython#11754. Signed-off-by: David Lechner <[email protected]>
- Loading branch information