Make access to reg volatile

Compiler removes this store on some optimization levels
This commit is contained in:
bluew 2020-07-07 17:24:36 +00:00
parent 961edb14af
commit fadddd1f4f

View file

@ -223,7 +223,7 @@ char *strchr(const char *s, int c)
static void pos_libc_putc_stdout(char c)
{
*(uint32_t *)(long)(ARCHI_STDOUT_ADDR + STDOUT_PUTC_OFFSET + (hal_core_id()<<3) + (hal_cluster_id()<<7)) = c;
*(volatile uint32_t *)(long)(ARCHI_STDOUT_ADDR + STDOUT_PUTC_OFFSET + (hal_core_id()<<3) + (hal_cluster_id()<<7)) = c;
}