[U-Boot] [PATCH] MIPS: xburst: simplify relocation offset calculation

Daniel Schwierzeck daniel.schwierzeck at gmail.com
Thu Jan 31 00:50:09 CET 2013


2013/1/30 Gabor Juhos <juhosg at openwrt.org>:
> 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 at openwrt.org>
> Cc: Daniel Schwierzeck <daniel.schwierzeck at googlemail.com>
> Cc: Xiangfu Liu <xiangfu at openmobilefree.net>
> ---
>  arch/mips/cpu/xburst/start.S |   12 +++---------
>  1 file changed, 3 insertions(+), 9 deletions(-)

applied to u-boot-mips/master, thanks

-- 
Best regards,
Daniel


More information about the U-Boot mailing list