Commit 682d10f
committed
[nrf fromlist] debug: mipi_stp_decoder: Refactor to avoid unaligned 64 bit access
When optimized for speed it was possible that compiler for ARM Cortex-M
used double word read for code that was reading two words from an array.
However, it was possible that this array was not word-aligned and
double word access was resulting in a bus fault. Refactored the function
to ensure that only word access is used (word access on Cortex-M4 and
later supports unaligned access).
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Upstream PR #: 1086441 parent 3d219f3 commit 682d10f
1 file changed
Lines changed: 12 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
463 | 463 | | |
464 | 464 | | |
465 | 465 | | |
| 466 | + | |
| 467 | + | |
466 | 468 | | |
467 | 469 | | |
468 | 470 | | |
| 471 | + | |
469 | 472 | | |
470 | | - | |
471 | | - | |
| 473 | + | |
| 474 | + | |
472 | 475 | | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
481 | 480 | | |
482 | 481 | | |
483 | 482 | | |
484 | 483 | | |
485 | | - | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
486 | 487 | | |
487 | 488 | | |
488 | 489 | | |
| |||
0 commit comments