diff --git a/firmware/SOURCES b/firmware/SOURCES index 5a6a554fa6..d8a5254385 100644 --- a/firmware/SOURCES +++ b/firmware/SOURCES @@ -419,10 +419,6 @@ target/sh/debug-sh.c #elif defined(CPU_COLDFIRE) target/coldfire/crt0.S -#ifdef HAVE_PRIORITY_SCHEDULING -common/ffs.c -target/coldfire/ffs-coldfire.S -#endif target/coldfire/kernel-coldfire.c target/coldfire/system-coldfire.c target/coldfire/timer-coldfire.c @@ -450,10 +446,6 @@ target/arm/mmu-arm.S # endif # endif -#ifdef HAVE_PRIORITY_SCHEDULING -target/arm/ffs-arm.S -#endif - #if CONFIG_PLATFORM & PLATFORM_NATIVE target/arm/system-arm.c #endif @@ -626,7 +618,6 @@ target/arm/crt0.S #endif /* defined(CPU_*) */ #elif defined(CPU_MIPS) -target/mips/ffs-mips.S target/mips/mmu-mips.c #if CONFIG_CPU==JZ4732 target/mips/ingenic_jz47xx/crt0.S @@ -634,9 +625,6 @@ target/mips/ingenic_jz47xx/crt0.S #else -#ifdef HAVE_PRIORITY_SCHEDULING -common/ffs.c -#endif #if (CONFIG_PLATFORM & PLATFORM_NATIVE) crt0.S drivers/i2c.c diff --git a/firmware/asm/SOURCES b/firmware/asm/SOURCES index f56d99a7de..23563d11d8 100644 --- a/firmware/asm/SOURCES +++ b/firmware/asm/SOURCES @@ -1,3 +1,4 @@ +ffs.c memset16.c #if (CONFIG_PLATFORM & PLATFORM_NATIVE) || defined(HAVE_ROCKBOX_C_LIBRARY) memcpy.c diff --git a/firmware/target/arm/ffs-arm.S b/firmware/asm/arm/ffs.S similarity index 100% rename from firmware/target/arm/ffs-arm.S rename to firmware/asm/arm/ffs.S diff --git a/firmware/common/ffs.c b/firmware/asm/ffs.c similarity index 100% rename from firmware/common/ffs.c rename to firmware/asm/ffs.c diff --git a/firmware/target/coldfire/ffs-coldfire.S b/firmware/asm/m68k/ffs.S similarity index 81% rename from firmware/target/coldfire/ffs-coldfire.S rename to firmware/asm/m68k/ffs.S index 40a7297802..2a39ae5bcd 100644 --- a/firmware/target/coldfire/ffs-coldfire.S +++ b/firmware/asm/m68k/ffs.S @@ -62,4 +62,17 @@ find_first_set_bit: move.b (%a0, %d1.l), %d0 | rts | + .section .irodata +L_ffs_table: + | 0 1 2 3 4 5 6 7 + |---------------------------------------------- + .byte 32, 0, 1, 12, 2, 6, 0, 13 | 0- 7 + .byte 3, 0, 7, 0, 0, 0, 0, 14 | 8-15 + .byte 10, 4, 0, 0, 8, 0, 0, 25 | 16-23 + .byte 0, 0, 0, 0, 0, 21, 27, 15 | 24-31 + .byte 31, 11, 5, 0, 0, 0, 0, 0 | 32-39 + .byte 9, 0, 0, 24, 0, 0, 20, 26 | 40-47 + .byte 30, 0, 0, 0, 0, 23, 0, 19 | 48-55 + .byte 29, 0, 22, 18, 28, 17, 16, 0 | 56-63 + .size find_first_set_bit, .-find_first_set_bit diff --git a/firmware/target/mips/ffs-mips.S b/firmware/asm/mips/ffs.S similarity index 100% rename from firmware/target/mips/ffs-mips.S rename to firmware/asm/mips/ffs.S