Commit ab7ae90
committed
Ensure stack is always aligned with 8 bytes
In dynamic linking mode, consider external functions may use data types
such as 'long long int' or other equivalents. The program may encounter
a Bus error if external functions access 8-byte data on the stack that
is not properly aligned.
To prevent the aforementioned issue, these changes adjust the Arm code
generator to ensure that the program's stack is always aligned with 8
bytes.
Since the RISC-V architecture does not yet support dynamic linking, the
corresponding code generator is not modified in this commit.1 parent 57ea0a2 commit ab7ae90
2 files changed
+23
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
225 | | - | |
226 | | - | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
227 | 228 | | |
228 | 229 | | |
229 | 230 | | |
| |||
349 | 350 | | |
350 | 351 | | |
351 | 352 | | |
352 | | - | |
353 | | - | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
354 | 356 | | |
355 | 357 | | |
356 | 358 | | |
| |||
500 | 502 | | |
501 | 503 | | |
502 | 504 | | |
| 505 | + | |
| 506 | + | |
503 | 507 | | |
504 | 508 | | |
505 | 509 | | |
| |||
535 | 539 | | |
536 | 540 | | |
537 | 541 | | |
538 | | - | |
539 | | - | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
540 | 545 | | |
541 | 546 | | |
542 | 547 | | |
| |||
547 | 552 | | |
548 | 553 | | |
549 | 554 | | |
550 | | - | |
551 | | - | |
| 555 | + | |
| 556 | + | |
552 | 557 | | |
553 | 558 | | |
554 | 559 | | |
| |||
582 | 587 | | |
583 | 588 | | |
584 | 589 | | |
585 | | - | |
586 | | - | |
| 590 | + | |
| 591 | + | |
587 | 592 | | |
588 | 593 | | |
589 | 594 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
95 | 103 | | |
96 | 104 | | |
97 | 105 | | |
| |||
0 commit comments