fix red.
[kugel-rb.git] / apps / plugins / lib / gcc-support.c
blob4ea9cfd13a4c36d8d26fb64eb4680f5d9f9f1a42
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
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 ****************************************************************************/
23 #include "plugin.h"
25 #ifdef CPU_ARM
26 void __attribute__((naked)) __div0(void)
28 asm volatile("bx %0" : : "r"(rb->__div0));
30 #endif
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);