[MTD] [NAND] bf5xx_nand: Avoid crash if bfin_mac is installed.
[linux-2.6/verdex.git] / arch / avr32 / lib / io-writesw.S
blob8c4a53f1c52ab48458a7f71a6ab1a34e8b733bad
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         ld.uh   r8, r11++
11         sub     r10, 1
12         st.h    r12[0], r8
14         .global __raw_writesw
15         .type   __raw_writesw,@function
16 __raw_writesw:
17         cp.w    r10, 0
18         mov     r9, 3
19         reteq   r12
20         tst     r11, r9
21         brne    .Lnot_word_aligned
23         sub     r10, 2
24         brlt    2f
26 1:      ld.w    r8, r11++
27         bfextu  r9, r8, 16, 16
28         st.h    r12[0], r9
29         st.h    r12[0], r8
30         sub     r10, 2
31         brge    1b
33 2:      sub     r10, -2
34         reteq   r12
36         ld.uh   r8, r11++
37         st.h    r12[0], r8
38         retal   r12