• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1! Copyright (C) 2012 by Imagination Technologies Ltd.
2!
3! 64-bit arithmetic shift left routine.
4!
5
6	.text
7	.global ___ashldi3
8	.type   ___ashldi3,function
9
10___ashldi3:
11	MOV     D0Re0,D0Ar2
12	MOV     D1Re0,D1Ar1
13	CMP     D1Ar3,#0                ! COUNT == 0
14	MOVEQ   PC,D1RtP                ! Yes, return
15
16	SUBS    D0Ar4,D1Ar3,#32         ! N = COUNT - 32
17	BGE     $L10
18
19!! Shift < 32
20	NEG     D0Ar4,D0Ar4             ! N = - N
21	LSL     D1Re0,D1Re0,D1Ar3       ! HI = HI << COUNT
22	LSR     D0Ar6,D0Re0,D0Ar4       ! TMP= LO >> -(COUNT - 32)
23	OR      D1Re0,D1Re0,D0Ar6       ! HI = HI | TMP
24	SWAP    D0Ar4,D1Ar3
25	LSL     D0Re0,D0Re0,D0Ar4       ! LO = LO << COUNT
26	MOV     PC,D1RtP
27
28$L10:
29!! Shift >= 32
30	LSL     D1Re0,D0Re0,D0Ar4       ! HI = LO << N
31	MOV     D0Re0,#0                ! LO = 0
32	MOV     PC,D1RtP
33	.size ___ashldi3,.-___ashldi3
34