rockbox/firmware/asm
Solomon Peachy 905e19905b ARM: Rejigger the asm corelock functions
This appears to solve _some_ of the crashes experienced when using
gcc494 on the multicore PP targets (eg most older ipods).

(With this change, the asm vs plain-C versions behave identically)

corelock_lock(), corelock_unlock(), and corelock_trylock() were declared
with the 'naked' attribute.  However, naked functions are only allowed
to have 'Basic Asm' components, and we used some extended asm, but
without declaring clobbered registers, making assumptions about register
arguments, and also directly returned to the caller via asm code.

This is what the GCC docs have to say about this stuff:

"While using extended asm or a mixture of basic asm and C code may
 appear to work, they cannot be depended upon to work reliably and are
 not supported."

Change-Id: I79a9c4895584f9af365e6c2387595e9c45d89c7d
2020-07-03 21:36:41 +00:00
..
arm ARM: Rejigger the asm corelock functions 2020-07-03 21:36:41 +00:00
m68k Add mempcpy implementation 2014-08-29 22:06:57 -04:00
mips mips: Update the MIPS threading code 2018-09-07 09:55:12 +02:00
sh Add mempcpy implementation 2014-08-29 22:06:57 -04:00
asm.make Apparently make doesn't like inline comments 2012-03-28 23:14:39 +02:00
beep.c beep/mixer code: Code police a bit. 2012-02-19 00:38:58 -05:00
corelock.c kernel: Break out kernel primitives into separate files and move to separate dir. 2014-03-03 18:11:57 +01:00
ffs.c Generic find_first_set_bit can use __builtin_ctz instead of __builtin_ffs 2012-02-04 18:08:17 -05:00
lcd-as-memframe-24bit.c lcd-24bit: Introduce a 24-bit mid-level LCD driver 2014-06-21 00:15:53 +02:00
lcd-as-memframe.c fix warning in lcd-as-memframe.c 2017-09-17 15:13:52 +02:00
memcpy.c Renamed defines UNALIGNED to ROCKBOX_UNALIGNED - UNALIGNED is already 2017-01-15 21:32:49 +01:00
memmove.c Renamed defines UNALIGNED to ROCKBOX_UNALIGNED - UNALIGNED is already 2017-01-15 21:32:49 +01:00
mempcpy.c Add mempcpy implementation 2014-08-29 22:06:57 -04:00
memset.c Renamed defines UNALIGNED to ROCKBOX_UNALIGNED - UNALIGNED is already 2017-01-15 21:32:49 +01:00
memset16.c Fix dangerous casts 2017-02-04 17:24:47 +01:00
pcm-mixer.c Coldfire: Optimize emac context save/restore in mixer ISR. 2012-03-12 00:16:12 +01:00
SOURCES xDuoo X3II and X20 port 2020-04-06 18:15:41 +02:00
strlen.c Renamed defines UNALIGNED to ROCKBOX_UNALIGNED - UNALIGNED is already 2017-01-15 21:32:49 +01:00
thread-unix.c thread-unix patchup! 2014-08-18 10:40:44 -04:00
thread-win32.c
thread.c Rearrange #ifdefs a bit, so SIGALTSTACK overrides CPU-specific threading. 2012-06-11 22:27:41 +02:00
thread.h Hosted builds using thread.c have errno as thread context. 2014-08-05 22:05:20 -04:00