openrisc: head: Init r0 to 0 on start
Originally openrisc spec 0 specified that r0 would be wired to ground. This is no longer the case. r0 is not guaranteed to be 0 at init, so we need to initialize it to 0 before using it. Also, if we are clearing r0 we cant use r0 to clear itself. Change the the CLEAR_GPR macro to use movhi for clearing. Reported-by: NJakob Viketoft <jakob.viketoft@aacmicrotec.com> Signed-off-by: NStafford Horne <shorne@gmail.com>
Showing
想要评论请 注册 或 登录