mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Antony Pavlov <antonynpavlov@gmail.com>
To: barebox@lists.infradead.org
Subject: [PATCH 2/3] MIPS: pbl: use generated label in ADR macro
Date: Mon, 17 Jun 2013 20:35:19 +0400	[thread overview]
Message-ID: <1371486920-4614-3-git-send-email-antonynpavlov@gmail.com> (raw)
In-Reply-To: <1371486920-4614-1-git-send-email-antonynpavlov@gmail.com>

The generated label usage make possible
to use the ADR macro many times.

If we don't use a generated label and we try
to use the ADR macro second time then we get

   Error: symbol `_pc' is already defined

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
 arch/mips/include/asm/pbl_macros.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/mips/include/asm/pbl_macros.h b/arch/mips/include/asm/pbl_macros.h
index 6a48ca4..3971b61 100644
--- a/arch/mips/include/asm/pbl_macros.h
+++ b/arch/mips/include/asm/pbl_macros.h
@@ -41,9 +41,9 @@
 	.set	push
 	.set	noreorder
 	move	\temp, ra			# preserve ra beforehand
-	bal	_pc
+	bal	255f
 	 nop
-_pc:	addiu	\rd, ra, \label - _pc		# label is assumed to be
+255:	addiu	\rd, ra, \label - 255b		# label is assumed to be
 	move	ra, \temp			# within pc +/- 32KB
 	.set	pop
 	.endm
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2013-06-17 16:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-17 16:35 [PATCH 0/3] MIPS pbl fixes Antony Pavlov
2013-06-17 16:35 ` [PATCH 1/3] MIPS: pbl: remove extra LONGSIZE definition Antony Pavlov
2013-06-17 16:35 ` Antony Pavlov [this message]
2013-06-17 16:35 ` [PATCH 3/3] MIPS: pbl: remove extra copyrights Antony Pavlov
2013-06-18  7:17 ` [PATCH 0/3] MIPS pbl fixes Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1371486920-4614-3-git-send-email-antonynpavlov@gmail.com \
    --to=antonynpavlov@gmail.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox