[PATCH] MIPS: start.S: remove duplicate ADR macro definition

Antony Pavlov antonynpavlov at gmail.com
Wed Dec 4 01:09:18 EST 2013


Signed-off-by: Antony Pavlov <antonynpavlov at gmail.com>
---
 arch/mips/boot/start.S | 22 +---------------------
 1 file changed, 1 insertion(+), 21 deletions(-)

diff --git a/arch/mips/boot/start.S b/arch/mips/boot/start.S
index 7e2ae5e..d180157 100644
--- a/arch/mips/boot/start.S
+++ b/arch/mips/boot/start.S
@@ -2,7 +2,6 @@
  * Startup Code for MIPS CPU
  *
  * Copyright (C) 2011 Antony Pavlov <antonynpavlov at gmail.com>
- * Used code copyrighted (C) 2009 by Shinya Kuribayashi <skuribay at pobox.com>
  *
  * This file is part of barebox.
  * See file CREDITS for list of people who contributed to this project.
@@ -24,26 +23,7 @@
 #include <asm-generic/memory_layout.h>
 #include <generated/compile.h>
 #include <generated/utsrelease.h>
-
-	/*
-	 * ADR macro instruction (inspired by ARM)
-	 *
-	 * ARM architecture doesn't have PC-relative jump instruction
-	 * like MIPS' B/BAL insns.  When ARM makes PC-relative jumps,
-	 * it uses ADR insn.  ADR is used to get a destination address
-	 * of 'label' against current PC.  With this, ARM can safely
-	 * make PC-relative jumps.
-	 */
-	.macro	ADR rd label temp
-	.set	push
-	.set	noreorder
-	move	\temp, ra			# preserve ra beforehand
-	bal	_pc
-	 nop
-_pc:	addiu	\rd, ra, \label - _pc		# label is assumed to be
-	move	ra, \temp			# within pc +/- 32KB
-	.set	pop
-	.endm
+#include <asm/pbl_macros.h>
 
 	.set noreorder
 	.text
-- 
1.8.4.4




More information about the barebox mailing list