MIPS: start.S: simplify relocation offset calculation
authorGabor Juhos <juhosg@openwrt.org>
Thu, 24 Jan 2013 06:27:54 +0000 (06:27 +0000)
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
Sun, 27 Jan 2013 15:40:07 +0000 (16:40 +0100)
commit248fe03f53772a61bb7355a4e45cd055dfdcf7b2
tree5a33e8aaea4dbb51a30930f99309aba538202252
parentb2fe86f8873088391d77224fb33544bc1e3b2c0a
MIPS: start.S: simplify relocation offset calculation

The current code uses four instructions and a
temporary register to calculate the relocation
offset and to adjust the gp register.

The relocation offset can be calculated directly
from the CONFIG_SYS_MONITOR_BASE constant and from
the destination address. The resulting offset can
be used to adjust the gp pointer.

This approach makes the code a bit simpler because
it needs two instructions only.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
arch/mips/cpu/mips32/start.S
arch/mips/cpu/mips64/start.S