diff options
author | Randall Spangler <rspangler@chromium.org> | 2013-10-30 14:27:39 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2013-11-01 00:36:57 +0000 |
commit | a9a3fd427c27346bcf40edc5c152e9a0f7482703 (patch) | |
tree | c47e1e5221627215d3b137baf811d3540b0d24dd | |
parent | ea188ffdb7dd75e3bfc50c248436bd29388b90e1 (diff) | |
download | chrome-ec-a9a3fd427c27346bcf40edc5c152e9a0f7482703.tar.gz |
cleanup: Use actual Thumb2 SVC instruction instead of hard-coding the opcode
The current chroot toolchain properly compiles the SVC instruction, so
there's no need to hard-code the opcode. That was a workaround for
binutils < 2.22 (that is, binutils versions more than 2 years old).
BUG=chrome-os-partner:23721
BRANCH=none
TEST=compare EC binaries before/after this change; only the
datestamp should be different
Change-Id: I9c6282768c4562926397866ac3be218c393e3865
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/175172
-rw-r--r-- | core/cortex-m/task.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/core/cortex-m/task.c b/core/cortex-m/task.c index 75ed85204b..8ffb807b48 100644 --- a/core/cortex-m/task.c +++ b/core/cortex-m/task.c @@ -282,13 +282,9 @@ void __schedule(int desched, int resched) { register int p0 asm("r0") = desched; register int p1 asm("r1") = resched; - /* - * TODO: remove hardcoded opcode. SWI is not compiled properly for - * ARMv7-M on our current chroot toolchain. - */ - asm(".hword 0xdf00 @swi 0"::"r"(p0),"r"(p1)); -} + asm("svc 0"::"r"(p0),"r"(p1)); +} #ifdef CONFIG_TASK_PROFILING void task_start_irq_handler(void *excep_return) |