Implement obio_bs_rr_1.

This commit is contained in:
briggs 2002-02-23 19:55:34 +00:00
parent 2328e1f7fb
commit caaef6d0d0
1 changed files with 24 additions and 1 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: obio_space_asm.S,v 1.1 2001/11/07 00:33:26 thorpej Exp $ */
/* $NetBSD: obio_space_asm.S,v 1.2 2002/02/23 19:55:34 briggs Exp $ */
/*
* Copyright (c) 1997 Causality Limited.
@ -106,3 +106,26 @@ Lobio_bs_wm_1_loop:
bne Lobio_bs_wm_1_loop
mov pc, lr
/*
* read region 1
* r0 - space
* r1 - handle
* r2 - offset
* r3 - *dest
* [stack #0] - count
*/
ENTRY(obio_bs_rr_1)
add r0, r1, r2 /* r0 now *src, r1 & r2 now free */
mov r1, r3 /* r1 now *dest, r3 now free */
ldr r2, [sp, #0] /* r2 now count */
teq r2, #0 /* is count 0? */
moveq pc, lr /* if so, exit */
Lobio_bs_rr_1_loop:
ldrb r3, [r0], #1 /* r3 = *src++ */
strb r3, [r1], #1 /* *dest++ = r3 */
subs r2, r2, #1 /* if --count != 0, go again */
bne Lobio_bs_rr_1_loop
mov pc, lr