Unified · Split
| @@ -368,6 +368,7 @@ static void asm_parse_directive(TCCState *s1) · 367 unmodified lines | ||
| 368 | 368 | sec = cur_text_section; |
| 369 | 369 | switch(tok) { |
| 370 | 370 | case TOK_ASMDIR_align: |
| 371 | + case TOK_ASMDIR_balign: | |
| 371 | 372 | case TOK_ASMDIR_p2align: |
| 372 | 373 | case TOK_ASMDIR_skip: |
| 373 | 374 | case TOK_ASMDIR_space: |
| @@ -381,7 +382,7 @@ static void asm_parse_directive(TCCState *s1) · 7 unmodified lines | ||
| 381 | 382 | n = 1 << n; |
| 382 | 383 | tok1 = TOK_ASMDIR_align; |
| 383 | 384 | } |
| 384 | − if (tok1 == TOK_ASMDIR_align) { | |
| 385 | + if (tok1 == TOK_ASMDIR_align || tok1 == TOK_ASMDIR_balign) { | |
| 385 | 386 | if (n < 0 || (n & (n-1)) != 0) |
| 386 | 387 | tcc_error("alignment must be a positive power of two"); |
| 387 | 388 | offset = (ind + n - 1) & -n; |
| @@ -305,6 +305,7 @@ · 304 unmodified lines | ||
| 305 | 305 | DEF_ASMDIR(byte) /* must be first directive */ |
| 306 | 306 | DEF_ASMDIR(word) |
| 307 | 307 | DEF_ASMDIR(align) |
| 308 | + DEF_ASMDIR(balign) | |
| 308 | 309 | DEF_ASMDIR(p2align) |
| 309 | 310 | DEF_ASMDIR(skip) |
| 310 | 311 | DEF_ASMDIR(space) |
| @@ -11,6 +11,7 @@ · 10 unmodified lines | ||
| 11 | 11 | .align 8 |
| 12 | 12 | .byte 1 |
| 13 | 13 | /* .align 16, 0x90 gas is too clever for us with 0x90 fill */ |
| 14 | + .balign 4, 0x92 | |
| 14 | 15 | .align 16, 0x91 /* 0x91 tests the non-clever behaviour */ |
| 15 | 16 | .skip 3 |
| 16 | 17 | .skip 15, 0x90 |