Skip to content
Commit 285c5b26 authored by Andy Ross's avatar Andy Ross Committed by Andrew Boie
Browse files

xtensa/asm2: Save shift/loop registers on exception entry

This was a little embarassing.  The swap code got this right, and the
interrupt exit path got it right, but on entry we weren't ever saving
the shift and loop registers for the interrupted context.

This almost always worked anyway as the loop registers aren't ever
used in any Zephyr code (gcc won't generate this style of loop AFAICT)
and the SAR shift amount register is generally used only in two pairs
of adjacent instructions making the chance of hitting that exact cycle
quite low in general.

But of course we have shift-happy crypto code in our tests, so this
got caught, thankfully.

See https://github.com/zephyrproject-rtos/zephyr/issues/6470



Signed-off-by: default avatarAndy Ross <andrew.j.ross@intel.com>
parent 4cd0fd24
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment