GCC 4.9 always emits assembly with divided syntax. Setting unified
syntax in inline assembly causes the assembler to complain about
GCC's generated code, because the directive extends past the scope
of the inline asm. Fix this by setting divided mode at the end of
the inline assembly block.
The assembler directives are hidden behind macros because later
versions of GCC won't need this workaround: they can be told to
use the unified syntax with -masm-syntax-unified.
Change-Id: Ic09e729e5bbb6fd44d08dac348daf6f55c75d7d8
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
No code changed, just shuffling stuff around. This should make it easier to
build only select parts kernel and use different implementations.
Change-Id: Ie1f00f93008833ce38419d760afd70062c5e22b5