barebox compilation with gcc 4.5.2 and ptxdist
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 Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
0947b2edd5
commit
4cc463f942
|
@ -2,6 +2,20 @@
|
||||||
#include <asm/ppc_asm.tmpl>
|
#include <asm/ppc_asm.tmpl>
|
||||||
#include <asm-generic/errno.h>
|
#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
|
.globl __ashldi3
|
||||||
__ashldi3:
|
__ashldi3:
|
||||||
subfic r6,r5,32
|
subfic r6,r5,32
|
||||||
|
|
Loading…
Reference in New Issue