Closed repojohnray closed 8 years ago
Here is below a patch to add ARM thumb2 support. Tested using gcc-5.4 (-with-arch=armv7-a --with-tune=cortex-a7 --with-fpu=neon-vfpv4 --with-float=hard --with-mode=thumb) and libretro-dosbox.
--- armeabi.c.orig 2016-07-25 22:40:54.000000000 +0200 +++ armeabi.c 2016-07-25 22:42:58.000000000 +0200 @@ -22,7 +22,25 @@ static thread_local uint32_t co_active_buffer[64]; static thread_local cothread_t co_active_handle;
-asm ( +#if defined(thumb2)
asm ( ".arm\n" ".align 4\n" ".globl co_switch_arm\n" @@ -32,6 +50,7 @@ " stmia r1!, {r4, r5, r6, r7, r8, r9, r10, r11, sp, lr}\n" " ldmia r0!, {r4, r5, r6, r7, r8, r9, r10, r11, sp, pc}\n" ); +#endif /defined(thumb2)/
/* ASM */ void co_switch_arm(cothread_t handle, cothread_t current);
thumb2 is with double underline before and after.
Added this, thanks
Here is below a patch to add ARM thumb2 support. Tested using gcc-5.4 (-with-arch=armv7-a --with-tune=cortex-a7 --with-fpu=neon-vfpv4 --with-float=hard --with-mode=thumb) and libretro-dosbox.
--- armeabi.c.orig 2016-07-25 22:40:54.000000000 +0200 +++ armeabi.c 2016-07-25 22:42:58.000000000 +0200 @@ -22,7 +22,25 @@ static thread_local uint32_t co_active_buffer[64]; static thread_local cothread_t co_active_handle;
-asm ( +#if defined(thumb2)
asm ( ".arm\n" ".align 4\n" ".globl co_switch_arm\n" @@ -32,6 +50,7 @@ " stmia r1!, {r4, r5, r6, r7, r8, r9, r10, r11, sp, lr}\n" " ldmia r0!, {r4, r5, r6, r7, r8, r9, r10, r11, sp, pc}\n" ); +#endif /defined(thumb2)/
/* ASM */ void co_switch_arm(cothread_t handle, cothread_t current);