author | Gabor Juhos <juhosg@openwrt.org> | |
Wed, 30 Jan 2013 04:51:06 +0000 (04:51 +0000) | ||
committer | Daniel Schwierzeck <daniel.schwierzeck@gmail.com> | |
Wed, 30 Jan 2013 22:33:27 +0000 (23:33 +0100) | ||
commit | 6d8622788020265a9e98e8345c6435c8680c992c | |
tree | 7abf0101a930ce97f5b9126c43735348e5967a1d | tree | snapshot (tar.xz tar.gz zip) |
parent | 025f2b338072781cd747bf7365cf43fcf9f40f1a | commit | diff |
MIPS: xburst: 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>
Cc: Xiangfu Liu <xiangfu@openmobilefree.net>
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>
Cc: Xiangfu Liu <xiangfu@openmobilefree.net>
arch/mips/cpu/xburst/start.S | diff | blob | history |