diff --git a/sys/arch/shark/isa/isa_io.c b/sys/arch/shark/isa/isa_io.c index a655ebad13e7..c26fe4c18002 100644 --- a/sys/arch/shark/isa/isa_io.c +++ b/sys/arch/shark/isa/isa_io.c @@ -1,4 +1,4 @@ -/* $NetBSD: isa_io.c,v 1.4 2005/01/05 10:25:43 tsutsui Exp $ */ +/* $NetBSD: isa_io.c,v 1.5 2005/01/09 15:26:19 tsutsui Exp $ */ /* * Copyright 1997 @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: isa_io.c,v 1.4 2005/01/05 10:25:43 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isa_io.c,v 1.5 2005/01/09 15:26:19 tsutsui Exp $"); #include #include @@ -133,7 +133,7 @@ struct bus_space isa_io_bs_tag = { /* copy */ bs_notimpl_bs_c_1, - bs_notimpl_bs_c_2, + isa_bs_c_2, bs_notimpl_bs_c_4, bs_notimpl_bs_c_8, }; @@ -214,7 +214,7 @@ struct bus_space isa_mem_bs_tag = { /* copy */ bs_notimpl_bs_c_1, - bs_notimpl_bs_c_2, + isa_bs_c_2, bs_notimpl_bs_c_4, bs_notimpl_bs_c_8, }; diff --git a/sys/arch/shark/isa/isa_io_asm.S b/sys/arch/shark/isa/isa_io_asm.S index 0462010411d5..6b7963fa6a84 100644 --- a/sys/arch/shark/isa/isa_io_asm.S +++ b/sys/arch/shark/isa/isa_io_asm.S @@ -1,4 +1,4 @@ -/* $NetBSD: isa_io_asm.S,v 1.1 2002/02/10 01:57:53 thorpej Exp $ */ +/* $NetBSD: isa_io_asm.S,v 1.2 2005/01/09 15:26:19 tsutsui Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -339,3 +339,37 @@ Lisa_bs_sr_2_loop: bne Lisa_bs_sr_2_loop mov pc, lr + +/* + * Copy region + */ + +ENTRY(isa_bs_c_2) + add r0, r1, r2 + ldr r2, [sp, #0] + add r1, r2, r3 + ldr r2, [sp, #4] + teq r2, #0 + moveq pc, lr + + cmp r0, r1 + blt 2f + +1: ldrh r3, [r0], #2 + strh r3, [r1], #2 + subs r2, r2, #1 + bne 1b + + mov pc, lr + +2: add r0, r0, r2, lsl #1 + add r1, r1, r2, lsl #1 + sub r0, r0, #2 + sub r1, r1, #2 + +3: ldrh r3, [r0], #-2 + strh r3, [r1], #-2 + subs r2, r2, #1 + bne 3b + + mov pc, lr