Subversion Repositories freemyipod

Rev

Rev 489 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 489 Rev 538
Line 5... Line 5...
5
                          api_pointer)                                                            \
5
                          api_pointer)                                                            \
6
    struct emcore_syscall_table* __emcore_syscall;                                                \
6
    struct emcore_syscall_table* __emcore_syscall;                                                \
7
    int __emcore_lib_init()                                                                       \
7
    int __emcore_lib_init()                                                                       \
8
    {                                                                                             \
8
    {                                                                                             \
9
        asm volatile("swi\t2\n\tldr\tr1, =__emcore_syscall\n\tstr\tr0, [r1]\n\t"                  \
9
        asm volatile("swi\t2\n\tldr\tr1, =__emcore_syscall\n\tstr\tr0, [r1]\n\t"                  \
-
 
10
                     "b\t__emcore_lib_init_c\n\t.ltorg\n__emcore_lib_init_c:\n\t"                 \
10
                 ::: "r0", "r1", "r2", "r3", "r12", "lr", "cc", "memory");                        \
11
                 ::: "r0", "r1", "r2", "r3", "r12", "lr", "cc", "memory");                        \
11
        if (__emcore_syscall->table_version < EMCORE_API_VERSION                                  \
12
        if (__emcore_syscall->table_version < EMCORE_API_VERSION                                  \
12
         || __emcore_syscall->table_minversion > EMCORE_API_VERSION)                              \
13
         || __emcore_syscall->table_minversion > EMCORE_API_VERSION)                              \
13
             return 0x80000000;                                                                   \
14
             return 0x80000000;                                                                   \
14
    }                                                                                             \
15
    }                                                                                             \