1
0
Fork 0
forked from len0rd/rockbox

Heh. Better way to load the PROCESSOR_ID address. Thanks Thom. :)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13156 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Sevakis 2007-04-14 11:46:05 +00:00
parent 036168cbf9
commit d803cf5e4e

View file

@ -47,7 +47,7 @@ static inline unsigned int current_core(void)
*/ */
unsigned int core; unsigned int core;
asm volatile ( asm volatile (
"ldr %0, =0x60000000 \r\n" /* PROCESSOR_ID */ "mov %0, #0x60000000 \r\n" /* PROCESSOR_ID */
"ldrb %0, [%0] \r\n" /* Just load the LSB */ "ldrb %0, [%0] \r\n" /* Just load the LSB */
"mov %0, %0, lsr #7 \r\n" /* Bit 7 => index */ "mov %0, %0, lsr #7 \r\n" /* Bit 7 => index */
: "=&r"(core) /* CPU=0, COP=1 */ : "=&r"(core) /* CPU=0, COP=1 */