New gcc uses "%esp" rather than "%ebp" to index local variable in stack, and
push between save-to/restore-from stack decrease "%esp", which leads wrong
index. Saving registers via local variables to make gcc aware of this and avoid
stack disorder.
[YOCTO #1442] got fixed
(From OE-Core rev: afc9edc27e77e80fdd24b4c8c538f91672940e75)
Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>