1 ! Copyright (C) 2012 by Imagination Technologies Ltd.
3 ! 64-bit logical shift right routine.
8 .type ___lshrdi3,function
13 CMP D1Ar3,#0 ! COUNT == 0
14 MOVEQ PC,D1RtP ! Yes, return
17 SUBS D1Ar3,D1Ar3,#32 ! N = COUNT - 32
21 NEG D1Ar3,D1Ar3 ! N = - N
22 LSR D0Re0,D0Re0,D0Ar4 ! LO = LO >> COUNT
23 LSL D0Ar6,D1Re0,D1Ar3 ! TMP= HI << -(COUNT - 32)
24 OR D0Re0,D0Re0,D0Ar6 ! LO = LO | TMP
26 LSR D1Re0,D1Re0,D1Ar3 ! HI = HI >> COUNT
30 LSR D0Re0,D1Re0,D1Ar3 ! LO = HI >> N
33 .size ___lshrdi3,.-___lshrdi3