1 ! SPDX-License-Identifier: GPL-2.0
2 ! Copyright (C) 2012 by Imagination Technologies Ltd.
4 ! 64-bit arithmetic shift right routine.
9 .type ___ashrdi3,function
14 CMP D1Ar3,#0 ! COUNT == 0
15 MOVEQ PC,D1RtP ! Yes, return
18 SUBS D1Ar3,D1Ar3,#32 ! N = COUNT - 32
22 NEG D1Ar3,D1Ar3 ! N = - N
23 LSR D0Re0,D0Re0,D0Ar4 ! LO = LO >> COUNT
24 LSL D0Ar6,D1Re0,D1Ar3 ! TMP= HI << -(COUNT - 32)
25 OR D0Re0,D0Re0,D0Ar6 ! LO = LO | TMP
27 ASR D1Re0,D1Re0,D1Ar3 ! HI = HI >> COUNT
31 ASR D0Re0,D1Re0,D1Ar3 ! LO = HI >> N
32 ASR D1Re0,D1Re0,#31 ! HI = HI >> 31
34 .size ___ashrdi3,.-___ashrdi3