mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Andre Naujoks <nautsch2@googlemail.com>
To: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: [PATCH 2/2] Re: barebox compilation with gcc 4.5.2 and ptxdist
Date: Wed, 27 Jul 2011 11:51:57 +0200	[thread overview]
Message-ID: <4E2FDFBD.2020804@googlemail.com> (raw)
In-Reply-To: <4E2FDF54.6000804@googlemail.com>

From 9b3985045da1161a934cba48749fe1759e62dae6 Mon Sep 17 00:00:00 2001
From: Andre Naujoks <nautsch2@googlemail.com>
Date: Wed, 27 Jul 2011 11:29:43 +0200
Subject: [PATCH 2/2] Ported ppc ashrdi3 from linux kernel

---
 arch/ppc/lib/misc.S |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/arch/ppc/lib/misc.S b/arch/ppc/lib/misc.S
index 24f901f..bd06ff2 100644
--- a/arch/ppc/lib/misc.S
+++ b/arch/ppc/lib/misc.S
@@ -2,6 +2,20 @@
 #include <asm/ppc_asm.tmpl>
 #include <asm-generic/errno.h>
 
+	.globl	__ashrdi3
+__ashrdi3:
+	subfic	r6,r5,32
+	srw	r4,r4,r5	# LSW = count > 31 ? 0 : LSW >> count
+	addi	r7,r5,32	# could be xori, or addi with -32
+	slw	r6,r3,r6	# t1 = count > 31 ? 0 : MSW << (32-count)
+	rlwinm	r8,r7,0,32	# t3 = (count < 32) ? 32 : 0
+	sraw	r7,r3,r7	# t2 = MSW >> (count-32)
+	or	r4,r4,r6	# LSW |= t1
+	slw	r7,r7,r8	# t2 = (count < 32) ? 0 : t2
+	sraw	r3,r3,r5	# MSW = MSW >> count
+	or	r4,r4,r7	# LSW |= t2
+	blr
+
 	.globl	__ashldi3
 __ashldi3:
 	subfic	r6,r5,32
-- 
1.7.5.3



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

  parent reply	other threads:[~2011-07-27  9:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-26 13:56 Andre Naujoks
2011-07-26 14:20 ` Marc Kleine-Budde
2011-07-26 14:35   ` Jean-Christophe PLAGNIOL-VILLARD
2011-07-27  6:40   ` Andre Naujoks
2011-07-27  9:50     ` Andre Naujoks
2011-07-27  9:51       ` [PATCH 1/2] " Andre Naujoks
2011-07-27  9:53         ` Andre Naujoks
2011-07-27  9:51       ` Andre Naujoks [this message]
2011-07-28 11:52       ` Sascha Hauer
2011-07-28 13:15         ` Andre Naujoks

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=4E2FDFBD.2020804@googlemail.com \
    --to=nautsch2@googlemail.com \
    --cc=barebox@lists.infradead.org \
    --cc=mkl@pengutronix.de \
    /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