]> git.ipfire.org Git - people/ms/linux.git/blame - arch/avr32/lib/__avr32_asr64.S
Linux 4.11
[people/ms/linux.git] / arch / avr32 / lib / __avr32_asr64.S
CommitLineData
5f97f7f9
HS
1/*
2 * Copyright (C) 2005-2006 Atmel Corporation
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8
9 /*
10 * DWtype __avr32_asr64(DWtype u, word_type b)
11 */
12 .text
13 .global __avr32_asr64
14 .type __avr32_asr64,@function
15__avr32_asr64:
16 cp.w r12, 0
17 reteq r12
18
19 rsub r9, r12, 32
20 brle 1f
21
22 lsl r8, r11, r9
23 lsr r10, r10, r12
24 asr r11, r11, r12
25 or r10, r8
26 retal r12
27
281: neg r9
29 asr r10, r11, r9
30 asr r11, 31
31 retal r12