xref: /netbsd-src/external/gpl3/gdb/dist/sim/testsuite/bfin/mdma-8bit-1d-neg-count.c (revision 4b169a6ba595ae283ca507b26b15fdff40495b1c)
1 /* Basic MDMA device tests.
2 # mach: bfin
3 # cc: -mcpu=bf537 -nostdlib -lc
4 # sim: --environment operating --model bf537
5 */
6 
7 #include "test.h"
8 
9 static volatile struct bfin_dma *s = (void *)MDMA_S1_NEXT_DESC_PTR;
10 static volatile struct bfin_dma *d = (void *)MDMA_D1_NEXT_DESC_PTR;
11 
12 #include "mdma-skel.h"
13 
mdma_memcpy(bu32 dst,bu32 src,bu32 size)14 void mdma_memcpy (bu32 dst, bu32 src, bu32 size)
15 {
16   /* Negative transfers start at end of buffer.  */
17   _mdma_memcpy (dst + size - 1, src + size - 1, size, -1);
18 }
19