From 82ad584fb8be01bc0d3902912c8233322860d4a8 Mon Sep 17 00:00:00 2001 From: andrew Date: Fri, 3 Oct 2014 15:07:43 +0000 Subject: Allow vld and vst instructions to use the canonical form from ARM ARM when including an alignment. Previously binutils would only allow instructions in the form "vld1.64 {d0, d1}, [r0, :128]" where the final comma should not be there, instead the above instruction should be "vld1.64 {d0, d1}, [r0:128]". This change duplicates the alignment code from within the function to handle this case. --- contrib/binutils/gas/config/tc-arm.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/contrib/binutils/gas/config/tc-arm.c b/contrib/binutils/gas/config/tc-arm.c index a57d1ba..1d9e27c 100644 --- a/contrib/binutils/gas/config/tc-arm.c +++ b/contrib/binutils/gas/config/tc-arm.c @@ -4688,6 +4688,23 @@ parse_address_main (char **str, int i, int group_relocations, return PARSE_OPERAND_FAIL; } } + else if (skip_past_char (&p, ':') == SUCCESS) + { + /* FIXME: '@' should be used here, but it's filtered out by generic + code before we get to see it here. This may be subject to + change. */ + expressionS exp; + my_get_expression (&exp, &p, GE_NO_PREFIX); + if (exp.X_op != O_constant) + { + inst.error = _("alignment must be constant"); + return PARSE_OPERAND_FAIL; + } + inst.operands[i].imm = exp.X_add_number << 8; + inst.operands[i].immisalign = 1; + /* Alignments are not pre-indexes. */ + inst.operands[i].preind = 0; + } if (skip_past_char (&p, ']') == FAIL) { -- cgit v1.1