GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / linux / linux-2.6.36 / arch / avr32 / lib / io-readsw.S
blob456be99090278524979ff8ff4d492a7cb6b1295a
1 /*
2  * Copyright (C) 2004-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  */
9 .Lnot_word_aligned:
10         /*
11          * Bad alignment will cause a hardware exception, which is as
12          * good as anything. No need for us to check for proper alignment.
13          */
14         ld.uh   r8, r12[0]
15         sub     r10, 1
16         st.h    r11++, r8
18         /* fall through */
20         .global __raw_readsw
21         .type   __raw_readsw,@function
22 __raw_readsw:
23         cp.w    r10, 0
24         reteq   r12
25         mov     r9, 3
26         tst     r11, r9
27         brne    .Lnot_word_aligned
29         sub     r10, 2
30         brlt    2f
32 1:      ldins.h r8:t, r12[0]
33         ldins.h r8:b, r12[0]
34         st.w    r11++, r8
35         sub     r10, 2
36         brge    1b
38 2:      sub     r10, -2
39         reteq   r12
41         ld.uh   r8, r12[0]
42         st.h    r11++, r8
43         retal   r12