mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-22 21:23:07 +03:00
Fix alignment of continuations stack
This commit is contained in:
parent
7a9563d6c6
commit
66be67ced2
@ -106,7 +106,7 @@ cont_resume:
|
||||
|
||||
cont_norm:
|
||||
/* calculate pointer to cont_ctx.struct_start from sp */
|
||||
l32i a2, a1, 8
|
||||
l32i a2, a1, 4
|
||||
/* sp <- cont_ctx.sp_ret */
|
||||
l32i a1, a2, 4
|
||||
|
||||
|
@ -33,6 +33,8 @@ typedef struct cont_ {
|
||||
unsigned* sp_yield;
|
||||
|
||||
unsigned* stack_end;
|
||||
unsigned unused1;
|
||||
unsigned unused2;
|
||||
unsigned stack_guard1;
|
||||
|
||||
unsigned stack[CONT_STACKSIZE / 4];
|
||||
|
@ -25,7 +25,7 @@
|
||||
void cont_init(cont_t* cont) {
|
||||
cont->stack_guard1 = CONT_STACKGUARD;
|
||||
cont->stack_guard2 = CONT_STACKGUARD;
|
||||
cont->stack_end = cont->stack + (sizeof(cont->stack) / 4 - 1);
|
||||
cont->stack_end = cont->stack + (sizeof(cont->stack) / 4);
|
||||
cont->struct_start = (unsigned*) cont;
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,7 @@ void preloop_update_frequency() {
|
||||
extern void (*__init_array_start)(void);
|
||||
extern void (*__init_array_end)(void);
|
||||
|
||||
static cont_t g_cont;
|
||||
cont_t g_cont __attribute__ ((aligned (16)));
|
||||
static os_event_t g_loop_queue[LOOP_QUEUE_SIZE];
|
||||
|
||||
static uint32_t g_micros_at_task_start;
|
||||
|
Loading…
x
Reference in New Issue
Block a user