aboutsummaryrefslogtreecommitdiff
path: root/tccasm.c
diff options
context:
space:
mode:
authorMichael Matz <matz@suse.de>2016-06-29 17:22:05 +0200
committerMichael Matz <matz@suse.de>2016-12-15 17:47:07 +0100
commit63e3ff7cca5437518f540261b34170ce80a47686 (patch)
tree91d21b9427b2c19349d61f4a2c482d565df89d65 /tccasm.c
parent8e4da42384164d6eb862665d907b3b1138da2f94 (diff)
downloadtinycc-63e3ff7cca5437518f540261b34170ce80a47686.tar.gz
tinycc-63e3ff7cca5437518f540261b34170ce80a47686.tar.bz2
tccasm: Accept .balign
Diffstat (limited to 'tccasm.c')
-rw-r--r--tccasm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tccasm.c b/tccasm.c
index 27645a8..6a46417 100644
--- a/tccasm.c
+++ b/tccasm.c
@@ -368,6 +368,7 @@ static void asm_parse_directive(TCCState *s1)
sec = cur_text_section;
switch(tok) {
case TOK_ASMDIR_align:
+ case TOK_ASMDIR_balign:
case TOK_ASMDIR_p2align:
case TOK_ASMDIR_skip:
case TOK_ASMDIR_space:
@@ -381,7 +382,7 @@ static void asm_parse_directive(TCCState *s1)
n = 1 << n;
tok1 = TOK_ASMDIR_align;
}
- if (tok1 == TOK_ASMDIR_align) {
+ if (tok1 == TOK_ASMDIR_align || tok1 == TOK_ASMDIR_balign) {
if (n < 0 || (n & (n-1)) != 0)
tcc_error("alignment must be a positive power of two");
offset = (ind + n - 1) & -n;