freemyipod r538 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r537‎ | r538 | r539 >
Date:18:50, 6 February 2011
Author:theseven
Status:new
Tags:
Comment:
emCORE: Fix "pool out of range" build errors in apps/libs
Modified paths:
  • /emcore/trunk/export/armhelpers.c (modified) (history)
  • /emcore/trunk/export/emcoreapp.h (modified) (history)
  • /emcore/trunk/export/emcorelib.h (modified) (history)

Diff [purge]

Index: emcore/trunk/export/emcoreapp.h
@@ -8,6 +8,7 @@
99 "ldr\tr2, [r0]\n\tcmp\tr3, r2\n\tldrls\tr1, [r0,#4]\n\tcmpls\tr1, r3\n\t" \
1010 "movhi\tr0, #0\n\tldrhi\tr1, =__emcore_incompatible_api_str\n\t" \
1111 "swihi\t1\n\tldr\tr1, =__emcore_syscall\n\tstr\tr0, [r1]\n\t" \
 12+ "b\t__emcore_entrypoint_c\n\t.ltorg\n__emcore_entrypoint_c:\n\t" \
1213 ::: "r0", "r1", "r2", "r3", "r12", "lr", "cc", "memory"); \
1314 thread_set_name(NULL, threadnamestr); \
1415 thread_set_priority(NULL, threadprio); \
Index: emcore/trunk/export/armhelpers.c
@@ -31,7 +31,7 @@
3232 int __clzsi2(int arg) __attribute__((naked,noinline));
3333 int __clzsi2(int arg)
3434 {
35 - __asm__ volatile("ldr\tr12, =__emcore_syscall\n\tldr\tr12, [r12]\n\tldr\tpc, [r12,#8]\n\t");
 35+ __asm__ volatile("ldr\tr12, =__emcore_syscall\n\tldr\tr12, [r12]\n\tldr\tpc, [r12,#8]\n\t.ltorg\n\t");
3636 }
3737
3838 // This one has a non-standard calling convention, so we just declare it as void
@@ -38,7 +38,7 @@
3939 void __aeabi_idivmod(void) __attribute__((naked,noinline));
4040 void __aeabi_idivmod(void)
4141 {
42 - __asm__ volatile("ldr\tr12, =__emcore_syscall\n\tldr\tr12, [r12]\n\tldr\tpc, [r12,#0xc]\n\t");
 42+ __asm__ volatile("ldr\tr12, =__emcore_syscall\n\tldr\tr12, [r12]\n\tldr\tpc, [r12,#0xc]\n\t.ltorg\n\t");
4343 }
4444
4545 // This one has a non-standard calling convention, so we just declare it as void
@@ -45,7 +45,7 @@
4646 void __aeabi_uidivmod(void) __attribute__((naked,noinline));
4747 void __aeabi_uidivmod(void)
4848 {
49 - __asm__ volatile("ldr\tr12, =__emcore_syscall\n\tldr\tr12, [r12]\n\tldr\tpc, [r12,#0x10]\n\t");
 49+ __asm__ volatile("ldr\tr12, =__emcore_syscall\n\tldr\tr12, [r12]\n\tldr\tpc, [r12,#0x10]\n\t.ltorg\n\t");
5050 }
5151
5252 extern __attribute__((alias("__aeabi_idivmod"))) void __aeabi_idiv(void);
Index: emcore/trunk/export/emcorelib.h
@@ -7,6 +7,7 @@
88 int __emcore_lib_init() \
99 { \
1010 asm volatile("swi\t2\n\tldr\tr1, =__emcore_syscall\n\tstr\tr0, [r1]\n\t" \
 11+ "b\t__emcore_lib_init_c\n\t.ltorg\n__emcore_lib_init_c:\n\t" \
1112 ::: "r0", "r1", "r2", "r3", "r12", "lr", "cc", "memory"); \
1213 if (__emcore_syscall->table_version < EMCORE_API_VERSION \
1314 || __emcore_syscall->table_minversion > EMCORE_API_VERSION) \