x86/efi: Enforce CONFIG_RELOCATABLE for EFI boot stub
[linux/fpc-iii.git] / arch / metag / lib / ashldi3.S
blob78d6974cffef3f55002a6322eebd93c1d027215f
1 ! Copyright (C) 2012 by Imagination Technologies Ltd.
3 ! 64-bit arithmetic shift left routine.
6         .text
7         .global ___ashldi3
8         .type   ___ashldi3,function
10 ___ashldi3:
11         MOV     D0Re0,D0Ar2
12         MOV     D1Re0,D1Ar1
13         CMP     D1Ar3,#0                ! COUNT == 0
14         MOVEQ   PC,D1RtP                ! Yes, return
16         SUBS    D0Ar4,D1Ar3,#32         ! N = COUNT - 32
17         BGE     $L10
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
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