Fix an internal error in GAS when assembling a bogus piece of source code.
gas PR 18256 * config/tc-arm.c (encode_arm_cp_address): Issue an error message if the operand is neither a register nor a vector. tests * gas/arm/pr18256.s: New file: Test case. * gas/arm/pr18256.l: New file: Expected assembler output. * gas/arm/pr18256.d: New file: Test driver.
This commit is contained in:
parent
43c1d34c31
commit
99b2a2dd3c
6 changed files with 31 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
2015-04-29 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR 18256
|
||||
* config/tc-arm.c (encode_arm_cp_address): Issue an error message
|
||||
if the operand is neither a register nor a vector.
|
||||
|
||||
2015-04-29 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* doc/as.texinfo (Set): Note that a symbol cannot be set multiple
|
||||
|
|
|
@ -7891,7 +7891,12 @@ encode_arm_cp_address (int i, int wb_ok, int unind_ok, int reloc_override)
|
|||
{
|
||||
if (!inst.operands[i].isreg)
|
||||
{
|
||||
gas_assert (inst.operands[0].isvec);
|
||||
/* PR 18256 */
|
||||
if (! inst.operands[0].isvec)
|
||||
{
|
||||
inst.error = _("invalid co-processor operand");
|
||||
return FAIL;
|
||||
}
|
||||
if (move_or_literal_pool (0, CONST_VEC, /*mode_3=*/FALSE))
|
||||
return SUCCESS;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
2015-04-29 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR gas/18265
|
||||
* gas/arm/pr18256.s: New file: Test case.
|
||||
* gas/arm/pr18256.l: New file: Expected assembler output.
|
||||
* gas/arm/pr18256.d: New file: Test driver.
|
||||
|
||||
2015-04-28 Renlin Li <renlin.li@arm.com>
|
||||
|
||||
* gas/arm/thumb2_vpool_be.d: Adjust the desired output.
|
||||
|
|
9
gas/testsuite/gas/arm/pr18256.d
Normal file
9
gas/testsuite/gas/arm/pr18256.d
Normal file
|
@ -0,0 +1,9 @@
|
|||
# name: PR18256 - Bad code triggers internal error
|
||||
#as:
|
||||
#error-output: pr18256.l
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
2
gas/testsuite/gas/arm/pr18256.l
Normal file
2
gas/testsuite/gas/arm/pr18256.l
Normal file
|
@ -0,0 +1,2 @@
|
|||
[^:]*: Assembler messages:
|
||||
[^:]*:1: Error: invalid co-processor operand -- `ldc p0,c0,=.'
|
1
gas/testsuite/gas/arm/pr18256.s
Normal file
1
gas/testsuite/gas/arm/pr18256.s
Normal file
|
@ -0,0 +1 @@
|
|||
LDC p0, c0, =.
|
Loading…
Add table
Reference in a new issue