1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2009 by Michael Sevakis
12 * Miscellaneous compiler support routines.
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation; either version 2
17 * of the License, or (at your option) any later version.
19 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
20 * KIND, either express or implied
22 ****************************************************************************/
26 void __attribute__((naked
)) __div0(void)
28 asm volatile("bx %0" : : "r"(rb
->__div0
));
32 void *memcpy(void *dest
, const void *src
, size_t n
)
34 return rb
->memcpy(dest
, src
, n
);
37 void *memset(void *dest
, int c
, size_t n
)
39 return rb
->memset(dest
, c
, n
);
42 void *memmove(void *dest
, const void *src
, size_t n
)
44 return rb
->memmove(dest
, src
, n
);
47 int memcmp(const void *s1
, const void *s2
, size_t n
)
49 return rb
->memcmp(s1
, s2
, n
);