This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
NEON gas undefined symbol bug
- From: Paul Brook <paul at codesourcery dot com>
- To: binutils at sourceware dot org
- Date: Fri, 28 Mar 2008 18:13:44 +0000
- Subject: NEON gas undefined symbol bug
The ARM NEON instruction "vmov d0, d1" incorrectly causes the output file to
contain an undefined symbol "d1".
parse_neon_mov checks for Dn, #imm before it checks for Dn, Dm. The immediate
parsing routine uses expression() via parse_big_immediate and my_get
expression. This routine also parses symbols, which remain even after
parse_big_immediate rejects the expression.
The fix is to check for the register case first.
Applied to CVS head.
Paul
2008-03-28 Paul Brook <paul@codesourcery.com>
gas/
* config/tc-arm.c (parse_neon_mov): Parse register before immediate
to avoid spurious symbols.
Index: gas/config/tc-arm.c
===================================================================
--- gas/config/tc-arm.c (revision 198036)
+++ gas/config/tc-arm.c (working copy)
@@ -5211,16 +5211,6 @@ parse_neon_mov (char **str, int *which_o
inst.operands[i].present = 1;
}
}
- else if (parse_qfloat_immediate (&ptr, &inst.operands[i].imm) == SUCCESS)
- /* Case 2: VMOV<c><q>.<dt> <Qd>, #<float-imm>
- Case 3: VMOV<c><q>.<dt> <Dd>, #<float-imm>
- Case 10: VMOV.F32 <Sd>, #<imm>
- Case 11: VMOV.F64 <Dd>, #<imm> */
- inst.operands[i].immisfloat = 1;
- else if (parse_big_immediate (&ptr, i) == SUCCESS)
- /* Case 2: VMOV<c><q>.<dt> <Qd>, #<imm>
- Case 3: VMOV<c><q>.<dt> <Dd>, #<imm> */
- ;
else if ((val = arm_typed_reg_parse (&ptr, REG_TYPE_NSDQ, &rtype,
&optype)) != FAIL)
{
@@ -5260,6 +5250,16 @@ parse_neon_mov (char **str, int *which_o
inst.operands[i++].present = 1;
}
}
+ else if (parse_qfloat_immediate (&ptr, &inst.operands[i].imm) == SUCCESS)
+ /* Case 2: VMOV<c><q>.<dt> <Qd>, #<float-imm>
+ Case 3: VMOV<c><q>.<dt> <Dd>, #<float-imm>
+ Case 10: VMOV.F32 <Sd>, #<imm>
+ Case 11: VMOV.F64 <Dd>, #<imm> */
+ inst.operands[i].immisfloat = 1;
+ else if (parse_big_immediate (&ptr, i) == SUCCESS)
+ /* Case 2: VMOV<c><q>.<dt> <Qd>, #<imm>
+ Case 3: VMOV<c><q>.<dt> <Dd>, #<imm> */
+ ;
else
{
first_error (_("expected <Rm> or <Dm> or <Qm> operand"));