X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcpu%2Fframe.h;h=e8d0f898973458fe214c4ad1e5272b86ccda1ad1;hb=ad984bef9a7d5ca01b97eb8b14a655e64ea79cc9;hp=e5c564686c7280895e488b452dd0a16fc28c17f8;hpb=5e9b43efe4fb475b81870d21bdb92985827cbbef;p=bertos.git diff --git a/bertos/cpu/frame.h b/bertos/cpu/frame.h index e5c56468..e8d0f898 100644 --- a/bertos/cpu/frame.h +++ b/bertos/cpu/frame.h @@ -67,6 +67,12 @@ #define CPU_STACK_GROWS_UPWARD 0 #define CPU_SP_ON_EMPTY_SLOT 0 +#elif CPU_CM3 + + #define CPU_SAVED_REGS_CNT 8 + #define CPU_STACK_GROWS_UPWARD 0 + #define CPU_SP_ON_EMPTY_SLOT 0 + #elif CPU_PPC #define CPU_SAVED_REGS_CNT 1 @@ -149,6 +155,15 @@ CPU_PUSH_WORD((sp), 0x100); \ } while (0); +#elif CPU_CM3 + + + #define CPU_PUSH_CALL_FRAME(sp, func) \ + do { \ + CPU_PUSH_WORD((sp), 0x01000000); /* xPSR */ \ + CPU_PUSH_WORD((sp), (cpu_stack_t)(func)); /* lr */ \ + } while (0); + #elif CPU_AVR /* * On AVR, addresses are pushed into the stack as little-endian, while