From 06db8315c5a89ede9a6d8094f9dec73301ff1483 Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Sun, 7 Jul 2013 19:58:47 +0200 Subject: LSB should always be 0 on PC popped on exception return. --- os/thread.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os/thread.h b/os/thread.h index 2213d6f..7486d01 100644 --- a/os/thread.h +++ b/os/thread.h @@ -46,7 +46,7 @@ class Thread { sp->lr_ex = 0xfffffff9; // frame->lr = thread exit handler - sp->pc = (uint32_t)func; + sp->pc = (uint32_t)func & ~1; sp->psr = 0x01000000; } -- cgit v1.2.3