1) Make use of $gp addressing. This saves some bin size and makes
code slightly faster.
2) Substitute jr with simple j instruction in exception handling.
Code is small and j can easily encode target address.
3) Remove nop after eret in interrupt handler. According to mips32r2
ISA manual eret does not have branch delay slot.
Change-Id: If63feb12eef189f08f7b50c832a8091be5e6f570
Since we can catch exceptions like data aborts on read/write, it takes very
little to also catch exceptions in calls. When extending this with the catching
of illegal instructions, the call instruction now becomes much more robust and
also for address and instruction probing. Since we can catch several types of
exception, rename set_data_abort_jmp to set_exception_jmp. At the same time,
simplify the logic in read/write request handlers. Also fix a bug in ARM
jump code: it was using
stmia r1, {..., pc}
as if pc would get current pc + 8 but this is actually implementation defined
on older ARMs (typically pc + 12) and deprecated on newer ARMs, so rewrite the
code avoid that. The set_exception_jmp() function now also reports the exception
type.
Change-Id: Icd0dd52d2456b361b27c4776be09c3d13528ed93