| Haavard Skinnemoen | d68041c | 2006-10-24 10:12:44 +0200 | [diff] [blame] | 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 | */ | 
|  | 8 |  | 
|  | 9 | .text | 
|  | 10 | .Lnot_word_aligned: | 
|  | 11 | 1:	ld.ub	r8, r12[0] | 
|  | 12 | sub	r10, 1 | 
|  | 13 | st.b	r11++, r8 | 
|  | 14 | reteq	r12 | 
|  | 15 | tst	r11, r9 | 
|  | 16 | brne	1b | 
|  | 17 |  | 
|  | 18 | /* fall through */ | 
|  | 19 |  | 
|  | 20 | .global	__raw_readsb | 
|  | 21 | .type	__raw_readsb,@function | 
|  | 22 | __raw_readsb: | 
|  | 23 | cp.w	r10, 0 | 
|  | 24 | mov	r9, 3 | 
|  | 25 | reteq	r12 | 
|  | 26 |  | 
|  | 27 | tst	r11, r9 | 
|  | 28 | brne	.Lnot_word_aligned | 
|  | 29 |  | 
|  | 30 | sub	r10, 4 | 
|  | 31 | brlt	2f | 
|  | 32 |  | 
|  | 33 | 1:	ldins.b	r8:t, r12[0] | 
|  | 34 | ldins.b	r8:u, r12[0] | 
|  | 35 | ldins.b	r8:l, r12[0] | 
|  | 36 | ldins.b r8:b, r12[0] | 
|  | 37 | st.w	r11++, r8 | 
|  | 38 | sub	r10, 4 | 
|  | 39 | brge	1b | 
|  | 40 |  | 
|  | 41 | 2:	sub	r10, -4 | 
|  | 42 | reteq	r12 | 
|  | 43 |  | 
| Haavard Skinnemoen | c1f24ac | 2008-06-09 14:16:06 +0200 | [diff] [blame] | 44 | 3:	ld.ub	r8, r12[0] | 
| Haavard Skinnemoen | d68041c | 2006-10-24 10:12:44 +0200 | [diff] [blame] | 45 | sub	r10, 1 | 
|  | 46 | st.b	r11++, r8 | 
|  | 47 | brne	3b | 
| Haavard Skinnemoen | 6af0f5f | 2006-11-06 14:06:45 +0100 | [diff] [blame] | 48 |  | 
|  | 49 | retal	r12 |