Browse Source

Fix crash at startup with Og optimization

teensy4-core
PaulStoffregen 6 years ago
parent
commit
9174cad274
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      teensy4/startup.c

+ 2
- 0
teensy4/startup.c View File

#endif #endif
} }


__attribute__((section(".startup"), optimize("no-tree-loop-distribute-patterns")))
static void memory_copy(uint32_t *dest, const uint32_t *src, uint32_t *dest_end) static void memory_copy(uint32_t *dest, const uint32_t *src, uint32_t *dest_end)
{ {
if (dest == src) return; if (dest == src) return;
} }
} }


__attribute__((section(".startup"), optimize("no-tree-loop-distribute-patterns")))
static void memory_clear(uint32_t *dest, uint32_t *dest_end) static void memory_clear(uint32_t *dest, uint32_t *dest_end)
{ {
while (dest < dest_end) { while (dest < dest_end) {

Loading…
Cancel
Save