aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2010-01-29 16:02:41 +0000
committerNick Clifton <nickc@redhat.com>2010-01-29 16:02:41 +0000
commit99b253c5147a1fbe848d5f797666a1b546d300de (patch)
tree15ca00e8102905a2ac8442957a78f4e6d88d0137 /gas/config
parent02961d7edf828bea7c52ead5af36e6135bc2ccfb (diff)
downloadgdb-99b253c5147a1fbe848d5f797666a1b546d300de.zip
gdb-99b253c5147a1fbe848d5f797666a1b546d300de.tar.gz
gdb-99b253c5147a1fbe848d5f797666a1b546d300de.tar.bz2
PR 11136
* config/tc-arm.c (neon_check_type): Handle a neon_shape value of NS_NULL. * gas/arm/neon-omit.s: Add instruction that causes crash. * gas/arm/neon-omit.d: Add expected disassembly.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-arm.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index d5a0ec4..7bf5416 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -12043,8 +12043,17 @@ neon_check_type (unsigned els, enum neon_shape ns, ...)
{
if ((thisarg & N_VFP) != 0)
{
- enum neon_shape_el regshape = neon_shape_tab[ns].el[i];
- unsigned regwidth = neon_shape_el_size[regshape], match;
+ enum neon_shape_el regshape;
+ unsigned regwidth, match;
+
+ /* PR 11136: Catch the case where we are passed a shape of NS_NULL. */
+ if (ns == NS_NULL)
+ {
+ first_error (_("invalid instruction shape"));
+ return badtype;
+ }
+ regshape = neon_shape_tab[ns].el[i];
+ regwidth = neon_shape_el_size[regshape];
/* In VFP mode, operands must match register widths. If we
have a key operand, use its width, else use the width of
@@ -12193,9 +12202,8 @@ try_vfp_nsyn (int args, void (*pfn) (enum neon_shape))
pfn (rs);
return SUCCESS;
}
- else
- inst.error = NULL;
+ inst.error = NULL;
return FAIL;
}