/* MN10300 64-bit logical right shift1*2* Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.3* Written by David Howells ([email protected])4*5* This program is free software; you can redistribute it and/or6* modify it under the terms of the GNU General Public Licence7* as published by the Free Software Foundation; either version8* 2 of the Licence, or (at your option) any later version.9*/1011#include <asm/cache.h>1213.text14.balign L1_CACHE_BYTES1516###############################################################################17#18# unsigned long long __lshrdi3(unsigned long long value [D1:D0],19# unsigned by [(12,SP)])20#21###############################################################################22.globl __lshrdi323.type __lshrdi3,@function24__lshrdi3:25mov (12,sp),a026and +63,a027beq __lshrdi3_zero2829cmp +31,a030bhi __lshrdi3_32plus3132# the count is in the range 1-3133lsr a0,d03435mov +32,a136sub a0,a1,a1 # a1 = 32 - count37asl a1,d1,a1 # get underflow from MSW -> LSW3839or_lsr a1,d0,a0,d1 # insert underflow into LSW and40# shift the MSW41rets4243.balign L1_CACHE_BYTES44# the count is in the range 32-6345__lshrdi3_32plus:46lsr a0,d1,d047clr d148__lshrdi3_zero:49rets5051.size __lshrdi3, .-__lshrdi3525354