Skip to content
Commit a4d44266 authored by Stafford Horne's avatar Stafford Horne
Browse files

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: default avatarJakob Viketoft <jakob.viketoft@aacmicrotec.com>
Signed-off-by: default avatarStafford Horne <shorne@gmail.com>
parent a0eba4f7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment