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